How to know if a system command doesn't exist?

Nicolas Fleury nid_oizo at yahoo.com_remove_the_
Mon Jan 12 17:15:02 CET 2004


Nicolas Fleury wrote:

> Hi,
>     How can I know if a system command doesn't exist?  All the ways I 
> have tried behave like if the system command was existing but returning 
> one.  I don't want to sound provocative, but open in Perl returns an 
> error in a command doesn't exist, so I'm sure we could have an exception 
> in the same case for popen in Python?

Small correction, as far as I can see, Perl's open returns the same 
error if the command returns 1 or doesn't exist.  Same problem there...




More information about the Python-list mailing list