Module for generic platform information: platform.py
M.-A. Lemburg
mal at lemburg.com
Thu Oct 28 05:23:41 EDT 1999
John Farrell wrote:
>
> "M.-A. Lemburg" wrote:
> > "Barry A. Warsaw" wrote:
> > >
> > > Very neat:
> > >
> > > % jpython /tmp/platform.py
> > > java1.2.1
> > >
> > > Probably sufficient (certainly appropriate) for the JPython platform,
> > > since nothing else matters when you're running on Java right? :)
> >
> > Well, there must be more infos lying around in the JRE :-)
> >
> > Does the JRE provide some kind of uname interface which I could hook
> > into a special platform.py function ? It would probably be interesting
> > to have some information about JVM version and vendor.
>
> I've attached an image of an inspection tool I happened to be running
> which lists all Java system properties. You can get any value in the
> right column by calling System.getProperty() with the string parameter
> in the left column.
>
> John
>
> [Image]
Do I have to import anything special to get the System symbol into
the current namespace or is System a builtin in JPython ? E.g.
would
def java_vendor():
return System.getProperty('java.vendor')
work out of the box on JPython ? (Don't have a working jpython
installation here at the moment to test this myself.)
Thanks,
--
Marc-Andre Lemburg
______________________________________________________________________
Y2000: 64 days left
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/
More information about the Python-list
mailing list