Re: [Jython-users] Support for Windows 2003
by Oti other posts by this author
Mar 19 2004 8:52PM messages near this date
[Jython-users] Support for Windows 2003
|
Re: [Jython-users] Support for Windows 2003
[ Ravi Mundoli ]
> We are trying to run some scripts on a Win2k3 box using Jython 2.1
> and
> running into problems because this OS doesn't seem to be supported,
> atleast in some of the modules. For example, in javaos.py there is a
> line
>
> os = java.lang.System.getProperty("os.name")
>
> which results in os being set to "Windows 2003" on Win2k3.
> Subsequently,
> there is a check for OS in the function and because it doesn't
> recognize
> Win2k3, it tries to run a "sh" shell which fails on Windows. Our
> current
> workaround is to install Cygwin so that "sh" works on a Windows
> machine.
>
> I was wondering if anyone knows what to do to resolve this issue. Is
> there
> a version of Jython that has been ported to work on win2k3 or is
> there one
> planned?
>
> Thanks for any information.
>
> Ravi
>
> PS.
>
> From javaos.py
>
> def _getOsType( os=None ):
> """Select the OS behavior based on os argument, 'python.os' registry
> setting and 'os.name' Java property.
> os: explicitly select desired OS. os=None to autodetect, os='None' to
> disable
> """
> 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)" ),
> ( "dos", r"(dos)|(Windows 95)|(Windows 98)|(Windows ME)" ),
> ( "mac", r"(mac)|(MacOS.*)|(Darwin)" ),
> ( "None", r"(None)" ),
> ( "posix", r"(.*)" ), # default - posix seems to vary mast widely
> )
Hi Ravi,
I can't see anything preventing you from inserting "Windows 2003" into
this map, e.g.:
_osTypeMap = (
( "nt", r"(nt)|(Windows NT)|(Windows NT 4.0)|(WindowsNT)|"
r"(Windows 2000)|(Windows 2003)|(Windows XP)|(Windows CE)"
),
( "dos", r"(dos)|(Windows 95)|(Windows 98)|(Windows ME)" ),
( "mac", r"(mac)|(MacOS.*)|(Darwin)" ),
( "None", r"(None)" ),
( "posix", r"(.*)" ), # default - posix seems to vary mast widely
)
Since Jython is running on a java virtual machine, it should also run
on Win3k.
Best wishes,
Oti.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Jython-users mailing list
Jython-users@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-users
Thread:
Oti
Oti
|