Re: [Jython-users] Support for Windows 2003
by other posts by this author
Mar 19 2004 8:57PM messages near this date
Re: [Jython-users] Support for Windows 2003
|
Re: [Jython-users] Support for Windows 2003
Hi Oti
Thanks for the response. You're right that I could probably change the
script and get it to work, however the script is not something I wrote. It
is part of the "os" module, and ships inside jython-lib.jar in Jython 2.1.
I don't think the license lets us modify the jar and redistribute it. The
other issue of course is that there may be many places where such a change
is needed, and I would much rather something "official" came out of
www.jython.org rather than us trying to hack something together!
Thanks
Ravi
Oti <ohumbel@[...].com> wrote on 03/19/2004 03:52:08 PM:
> [ 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
|