i just got a bug for pymel related to calling platform.system()
running Maya 2008 Ext 2 32-bit running on Vista 64 bit. the error is :
# SYSTEM = platform.system()
# File "C:\Program Files (x86)\Autodesk\Maya2008\bin\python25.zip
\platform.py", line 1042, in system
# return uname()[0]
# File "C:\Program Files (x86)\Autodesk\Maya2008\bin\python25.zip
\platform.py", line 960, in uname
# release,version,csd,ptype = win32_ver()
# File "C:\Program Files (x86)\Autodesk\Maya2008\bin\python25.zip
\platform.py", line 479, in win32_ver
# from win32con import HKEY_LOCAL_MACHINE,VER_PLATFORM_WIN32_NT,\
# ImportError: No module named win32con #
can any of you windows folks help me out on this? how can i safely get
the system on windows, and why has this not been a problem for other
windows users?
i'd be very interested to know what these lines return on windows xp
32/64 and vista 32/64 under 2008x32, 2008x64, 2009x32, 2009x64:
import os, sys
print os.uname()
print sys.platform
import win32con
here's why i'm interested in these values. this is some code from
platform.py on 2008:
# Get some infos from the builtin os.uname API...
try:
system,node,release,version,machine = os.uname()
except AttributeError:
# Hmm, no uname... we'll have to poke around the system then.
system = sys.platform
release = ''
version = ''
node = _node()
machine = ''
processor = ''
use_syscmd_ver = 1
# Try win32_ver() on win32 platforms
if system == 'win32':
release,version,csd,ptype = win32_ver() # <--imports
win32con
i'm thinking that usually os.uname() succeeds on windows, but in this
case it's failing and resulting in the import of win32con.
-chad
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---