Search - User list
Full Version: os.system() doesn't execute command
Root » Houdini Indie and Apprentice » os.system() doesn't execute command
oat
i couldn't use os.system() to execute a command as it is in the terminal.

I only get a return value of 256 and the file “scene.oct” is not generated from the “oconv” command string.

the error message is shown below.

Can anybody advise on the source of the error?

Thank you!
oat
there's no such error when i try on Windows7.

Is it related to the python i have on my Mac?

Advices are greatly appreciated!
edward
I think it's a platform difference for Python's os.system() method, consult the Python documentation.
pezetko
I don't know if it will work better with OSX but you can try: subprocess.call()
http://www.pythonforbeginners.com/os/subprocess-for-system-administrators [pythonforbeginners.com]
oat
thank you very much! I'll try subprocess
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB