Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

learn if program is installed from Python

Name: Anonymous 2008-01-07 20:40

I just ran a small Python script of mine on a new computer and I got an error message that xsltproc isn't found. So I want to modify the script to test whether xsltproc is installed. (I should probably do this with several other scripts too.)

However, I don't know how to do this. How do I learn, from a Python script running on Linux, whether a program is installed?

Name: Anonymous 2008-01-07 21:51

>>1
You could always run `which xsltproc`, however that's done in Python. If it returns 1, it's not found, if 0 then all is well.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List