Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / argv missing in sys module
  RSS 2.0 ATOM  

argv missing in sys module
Rate this thread
 
32158
 
Permlink of this thread  
avatar
  • cmassey
  • Posted: 16 July 2009 10:54 PM
  • Total Posts: 11
  • Joined: 05 June 2009 05:27 AM

If you run
--
import sys
dir (sys)
--

within the Python shell in 2009, you get

[’__displayhook__’, ‘__doc__’, ‘__excepthook__’, ‘__name__’, ‘__stderr__’, ‘__stdin__’, ‘__stdout__’, ‘_current_frames’, ‘_getframe’, ‘api_version’, ‘builtin_module_names’, ‘byteorder’, ‘call_tracing’, ‘callstats’, ‘copyright’, ‘displayhook’, ‘dllhandle’, ‘exc_clear’, ‘exc_info’, ‘exc_type’, ‘excepthook’, ‘exec_prefix’, ‘executable’, ‘exit’, ‘exitfunc’, ‘getcheckinterval’, ‘getdefaultencoding’, ‘getfilesystemencoding’, ‘getrecursionlimit’, ‘getrefcount’, ‘getwindowsversion’, ‘hexversion’, ‘last_traceback’, ‘last_type’, ‘last_value’, ‘maxint’, ‘maxunicode’, ‘meta_path’, ‘modules’, ‘path’, ‘path_hooks’, ‘path_importer_cache’, ‘platform’, ‘prefix’, ‘setcheckinterval’, ‘setdefaultencoding’, ‘setprofile’, ‘setrecursionlimit’, ‘settrace’, ‘stderr’, ‘stdin’, ‘stdout’, ‘subversion’, ‘version’, ‘version_info’, ‘warnoptions’, ‘winver’]

where if you run up a python 2.5.1 shell outside Mobu, and call the same lines, you get

[’__displayhook__’, ‘__doc__’, ‘__excepthook__’, ‘__name__’, ‘__stderr__’, ‘__stdin__’, ‘__stdout__’, ‘_current_frames’, ‘_getframe’, ‘api_version’, ‘argv’, ‘builtin_module_names’, ‘byteorder’, ‘call_tracing’, ‘callstats’, ‘copyright’, ‘displayhook’, ‘dllhandle’, ‘exc_clear’, ‘exc_info’, ‘exc_traceback’, ‘exc_type’, ‘exc_value’, ‘excepthook’, ‘exec_prefix’, ‘executable’, ‘exit’, ‘getcheckinterval’, ‘getdefaultencoding’, ‘getfilesystemencoding’, ‘getrecursionlimit’, ‘getrefcount’, ‘getwindowsversion’, ‘hexversion’, ‘maxint’, ‘maxunicode’, ‘meta_path’, ‘modules’, ‘path’, ‘path_hooks’, ‘path_importer_cache’, ‘platform’, ‘prefix’, ‘setcheckinterval’, ‘setprofile’, ‘setrecursionlimit’, ‘settrace’, ‘stderr’, ‘stdin’, ‘stdout’, ‘subversion’, ‘version’, ‘version_info’, ‘warnoptions’, ‘winver’]

Any suggestions as to what’s happening? I’m trying to find a nice way to pass variables into a script called from within the mobu Python shell. This difference in the versions of the sys module make it a little harder.

Cheers



Replies: 1
/img/forum/dark/default_avatar.png

Just found
http://area.autodesk.com/for...sysargv-in-motionbuilder/

which I found in Google’s cache, not by using the search tools within the AREA! ;-)

Might be what I need. Would still be good to know why it’s missing.

- After a quick look, I don’t think that will work. You can get the path, but not sure how to get any arguments passed.

Author: cmassey

Replied: 16 July 2009 11:05 PM