os.system() doesn't execute command

   3997   4   1
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
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!

Attachments:
Screen Shot 2014-07-10 at 1.34.29 pm.png (29.9 KB)

User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
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!
User Avatar
Member
8161 posts
Joined: July 2005
Offline
I think it's a platform difference for Python's os.system() method, consult the Python documentation.
User Avatar
Member
392 posts
Joined: Nov. 2008
Offline
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]
User Avatar
Member
479 posts
Joined: Dec. 2009
Offline
thank you very much! I'll try subprocess
  • Quick Links