Hi All,
I am taking a closer examination of some of the wxPython objects (the reason will be clear in a few days), and I stumbled across wx.TheBrushList (and other wx.The…) “classes”.
While trying to inspect what kind of object these things are, I found out that the “inspect” module doesn’t know what they are and I am not good enough at Python to find a way to describe them by code.
Please consider this example:
import wx
import inspect
import types
my_object = wx.TheBrushList
string_object = “wx.TheBrushList”
print “\n\nWhat the hell %s is?\n\n”%string_object
for method in dir(inspect):
if method.startswith("is"):
exec_method = getattr(inspect, method)
print "%-25s %s"%(method, exec_method(my_object))
result = isinstance(my_object, (type, types.ClassType))
print “%-25s %s\n\n”%(“istype or isclasstype”, result)
This prints the following:
What the hell wx.TheBrushList is?
isbuiltin False
isclass False
iscode False
isdatadescriptor False
isframe False
isfunction False
isgetsetdescriptor False
ismemberdescriptor False
ismethod False
ismethoddescriptor False
ismodule False
isroutine False
istraceback False
istype or isclasstype False
What am I missing? How can I find out what these objects are (via inspect or other means)?
Thank you in advance for your suggestions.
Andrea.
“Imagination Is The Only Weapon In The War Against Reality.”
http://xoomer.alice.it/infinity77/
import PyQt4.QtGui
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named PyQt4.QtGui
import pygtk
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named pygtk
···
import wx