Creating an EXE for XLRD + WIN32COM + wxWidgets application - Help request
I've started learninhg Python and have developed a small Python app that imports Excel data into an Access mdb/jet database. This application has dependencies on the following: XLRD - http://cheeseshop.python.org/pypi/xlrd/0.5.2 - (to read Excel files) Python windows extensions - http://starship.python.net/crew/mhammond/win32/ - to use ADO wxPython GUI toolkit - http://www.wxpython.org/ - for the GUI interface Ideally I'd like to create a standalone app that I can deliver to a client who can will run this on a Windows system that has Access installed. (Python will not be installed on this system). I'm planning to use P2YEXE for the build - however I'm not sure if it is possible to include all the required components for this in a package. I imagine there may be a few 'gotchas' with this. Any suggestions on how to do this and are there some additional issues I might run into? Thx in advance BrendanC -- http://mail.python.org/mailman/listinfo/python-list
Inspecting the Instance Vars in a class/object - How?
I'm trying to understand reflection/introspection in Python. How can I identify the the type of attribute (e.g. instance var) in a class? The following returns all the class attributes (methods and instance vars). However I'm interested in identifying the type of value for each case - (e.g. I'd like to identify the instance variables separately). (The Inspect module has an ismethod method, but not an isinstancevariable method). e.g. In the following example I'd like to extract the class vars strvar and intNum and ignore the methods/other attribute types. What is the best way to do this? class test: # Dummy Class for reflection testing strVar = '1234' intNum = 0 def nullmethod(): pass def addmethod(self,v1, v2): v = v1 + v2 return v if __name__ == "__main__": mytest = test() for key in dir(mytest): value = getattr(object, key) print 'Key: %s ; Value %s ' % (str(key) ,str(value)) -- http://mail.python.org/mailman/listinfo/python-list
