wwwtyro / latexyt

A clone of the popular Mac OS program latexit for GTK/linux.
3 stars 4 forks source link

False test for pdflatex #1

Open lynchs61 opened 11 years ago

lynchs61 commented 11 years ago

On my system the line os.system("which pdflatex 1> /dev/null 2> /dev/null") returns 0, even though pdflatex exists. Therefore the script always exits with "It looks like you don't have pdflatex installed. Aborting."

>>> import os
>>> os.system("which pdflatex")
/usr/bin/pdflatex
0
>>> os.system("which pdflatex 1> /dev/null 2> /dev/null")
0
erikbrinkman commented 11 years ago

0 indicates that it ran successfully, meaning your system has pdflatex. Since python treats 0 as False the conditional should fail, and and latexyt should run normally. Can you give more information as to why it's not working? My only thought is that perhaps you're running latexyt in a different environment, and in that environment the which call is failing.