Adapting code to multiple platforms
Peter Hansen
peter at engcorp.com
Sat Mar 12 08:06:59 EST 2005
Simon John wrote:
> If you're using a GUI, then that may help you decode the platform too -
> for example wxPython has wx.Platform, there's also platform.platform()
> , sys.platform and os.name
>
> You could try import win32api and checking for an exception ;-)
(Winky noted) Just in case anyone thinks that last is a
useful idea, keep in mind that win32api is not installed
(with the standard distribution) but must be installed
with a separate download of the pywin32 package by Mark
Hammond.
-Peter
More information about the Python-list
mailing list