Threaded for loop

parallelpython at gmail.com parallelpython at gmail.com
Sun Jan 14 10:32:57 CET 2007


John wrote:
> Thanks. Does it matter if I call shell commands os.system...etc in
> calculate?
>
> Thanks,
> --j

The os.system command neglects important changes in the environment
(redirected streams) and would not work with current version of ppsmp.
Although there is a very simple workaround:
print os.popen("yourcommand").read()
instead of os.system("yourcommand")


Here is a complete working example of that code:
http://www.parallelpython.com/component/option,com_smf/Itemid,29/topic,13.0




More information about the Python-list mailing list