Pythonwin - advise sought
MHammond at skippinet.com.au
Fri Jun 11 00:26:03 CEST 1999
Colin J. Williams wrote in message <375FA468.98976DDF at connection.com>...
>I am looking at Pythonwin as an alternative to Tk and would appreciate
>the following three questions.
>The Pythonwin documentation points to MFC documents as a source of
>The MSDN site has:
>Q1: Are there better sources which can be recommended?
Not buy me. Ive been doing MFC for years now and never owned a book on it
>The code fragment below:
> code1= "win32ui.CreateFileDialog(1)"
> fd= eval(code)
print repr(win32ui.CreateFileDialog(1)) :-)
> object 'PyCFileDialog' - assoc is 007CC240, vf=False,
> notify=0,ch/u=0/0, mh=0,kh=0
These are really for debugging:
assoc is: The address of the MFC object wrapped (ie, the CFileDialog)
vf=false: Is there a .py class associated with this C+ object?
notify=0: How many HookNotify() calls have been made on the object
ch/i=0/0: Can't remember - use the source :-)
mh=0: How many HookMessage calls.
kh=0: How many keyboard handlers.
>Q3. Is there some way that one can test that fd is an instance of some
FD is not a class, it is a type. There are no good examples for a file
dialog, but consider:
object 'PyCPropertySheet' - assoc is 01102980, vf=False, notify=0,ch/u=0/0,
Same as your example. Now lets create a property sheet using a Python
<pywin.mfc.dialog.PropertySheet instance at 1103080>
Now it is a Python class. We can get the win32ui type object by looking at
_obj_ - ie:
object 'PyCPropertySheet' - assoc is 01104F10, vf=True, notify=0,ch/u=0/0,
Note in this example we have "mh=1" indicating that the
pywin.dialog.PropertySheet class hooked a single windows message.
Hope this helps...
More information about the Python-list