maybe something from the platform module ? http://docs.python.org/library/platform.html
platform.system() Returns the system/OS name, e.g. 'Linux', 'Windows', or 'Java'. An empty string is returned if the value cannot be determined. 2011/2/16 Hans-Peter Jansen <[email protected]> > > On Tuesday 15 February 2011, 17:57:01 mw wrote: > > import os > > os.name > > > > http://docs.python.org/library/os.html > > > > On Tue, Feb 15, 2011 at 8:51 AM, todd rme <[email protected]> > wrote: > > > Is there any way inside pyqt, or in python, to determine what > > > platform you are using? Specifically, I want to know if the widget > > > is done in x11. I don't think I can check for x11 environment > > > variables since I at least think mac can have x11 installed without > > > using it for Qt. I need to know if the actual pyqt4 window is > > > using X11. > > Just try to instantiate e.g. QtGui.QX11Info(), it will throw an > NameError exception, if this platform isn't X11 aware. This call will > succeed even if X isn't running, btw. You might check that with > QtGui.QX11Info.appRootWindow(). > > This procedure will fail, it somebody builds PyQt with a X11 disabled > Qt, but that's pretty unlikely.. > > Pete > _______________________________________________ > PyQt mailing list [email protected] > http://www.riverbankcomputing.com/mailman/listinfo/pyqt _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
