os.system('someCommand /user_data/some_file.txt')Traceback (most recent call last):
File "/server/scripts/someCommand", line 6, in <module>
import os
ImportError: No module named os--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/97fa1bf8-0ada-4f1f-a6c2-f1e72b8940c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
So if you have a script that does nothing except "maya.standalone.initialize()" and "import os", you are seeing this import error?Are you doing anything to modify the PYTHONPATH?Justin
On Tue, May 16, 2017 at 12:44 PM likage <dissid...@gmail.com> wrote:
--Hi everyone, I am trying to run a terminal command while using maya.standalone and run into some problems.There is this terminal command in which if I run `someCommand my_file.txt`, it works correctly, as I expecting it to be.When I tried to incorporate it into my script:os.system('someCommand /user_data/some_file.txt')I was prompted with the following error when I tried to execute it with Mayapy command:Traceback (most recent call last):
File "/server/scripts/someCommand", line 6, in <module>
import os
ImportError: No module named osTried using `subprocess` but same error persists. How can I rectify this and why is it that `os` module error occurs?In my python file, `os` is working for sure..
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/97fa1bf8-0ada-4f1f-a6c2-f1e72b8940c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0QBiLWZE9Pc0OWr0mOKTzumHvkimgR0kXHm%3DJhWHoiOA%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.