, Windows Vista Jython 2.5.1, Eclipse/PyDev. javaos.py, "Windows Vista" OR getOsType;
. ( Tracker PyDev SourceForge.)
:
I installed the full version of Jython and it did not help. I also tried editing the registry file in the Jython tree. It didn’t help either.
Then I looked at the files in:
C:\eclipse-platform-3.5-win32\eclipse\plugins\org.python.pydev.jython_1.4.8.2881\Lib
to find "javaos.py" and added some code to read:
def _getOsType( os=None ):
os = os or sys.registry.getProperty( "python.os" ) or \
java.lang.System.getProperty( "os.name" )
_osTypeMap = (
( "nt", r"(nt)|(Windows NT)|(Windows NT 4.0)|(WindowsNT)|"
r"(Windows 2000)|(Windows XP)|(Windows CE)|(Windows Vista)" ),
( "dos", r"(dos)|(Windows 95)|(Windows 98)|(Windows ME)" ),
( "mac", r"(mac)|(MacOS.*)|(Darwin)" ),
( "None", r"(None)" ),
( "posix", r"(.*)" ),
)
for osType, pattern in _osTypeMap:
if re.match( pattern, os ):
break
return osType
source
share