Re: Detecting OS platform in Python
- From: MrJean1 <MrJean1@xxxxxxxxx>
- Date: Fri, 11 Jan 2008 09:53:12 -0800 (PST)
On Jan 10, 7:53 pm, Benjamin <musiccomposit...@xxxxxxxxx> wrote:
On Jan 10, 8:37 pm, Devraj <dev...@xxxxxxxxx> wrote:> Hi everyone,
My Python program needs reliably detect which Operating System its
being run on, infact it even needs to know which distribution of say
Linux its running on. The reason being its a GTK application that
needs to adapt itself to be a Hildon application if run on devices
like the N800.
platform.dist might help you. It's not very complete at all, though.
(This is supposed to improve in 2.6, though)
Better yet, first use sys.platform. If that is 'linux2', then use
platform.dist().
/Jean Brouwers
I have been searching around for an answer to this, and did find some
messages on a lists that suggested the use of sys.platform to detect
platform, with counter posts saying that it didn't work on Windows
etc.
Can anyone please shed some light on this?
Thanks a lot.
.
- References:
- Detecting OS platform in Python
- From: Devraj
- Re: Detecting OS platform in Python
- From: Benjamin
- Detecting OS platform in Python
- Prev by Date: Re: Python too slow?
- Next by Date: Re: Python too slow?
- Previous by thread: Re: Detecting OS platform in Python
- Next by thread: Analyzing Python GC output - what is a "cell", and what information is available about it.
- Index(es):
Relevant Pages
|
|