os.system()

Heiko Wundram modelnine at ceosg.de
Mon Mar 7 08:41:35 EST 2005


On Monday 07 March 2005 14:24, Joerg Schuster wrote:
> Well, I can give you the string, but that will not help:
>
> transduce abc info_dic comp_dic input_file output_file

Several variables like PATH "normally" get reset even when running a non-login 
subshell to the standard values from /etc/profile (on Gentoo /etc/env.d/*), 
so I guess that you're just having a problem finding the executable for 
transduce if that program isn't installed in a path which is always on $PATH.

At least I know this behaviour from some older versions of SuSE; Gentoo with 
bash 3.0-r8 and baselayout 1.11.9-r1 does as I would presume and doesn't 
reset it (there goes my example). What you might try:

export PATH="/does/not/exist:$PATH"
echo $PATH
--- Path here ---
python
>>> import os
>>> os.system("echo $PATH")
--- Path here, different? ---

and check whether they are any different. You could also do this for other 
important variables, such as LD_LIBRARY_PATH. But, all of this is stabbing in 
the dark, maybe you can just send the actual error message along next time.

HTH!

-- 
--- Heiko.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050307/6f525e68/attachment.sig>


More information about the Python-list mailing list