os.system() doesn't execute command

   3540   4   1
User Avatar
Member
479 posts
Joined: 12月 2009
オフライン
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: 12月 2009
オフライン
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
8077 posts
Joined: 7月 2005
オフライン
I think it's a platform difference for Python's os.system() method, consult the Python documentation.
User Avatar
Member
392 posts
Joined: 11月 2008
オフライン
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: 12月 2009
オフライン
thank you very much! I'll try subprocess
  • Quick Links