[python-win32] scripting pythonwin

Mark Hammond mhammond at skippinet.com.au
Sun Jul 13 18:53:48 CEST 2008


> I'd like to have this program run each time I start the IDE. How do I
> do that?

Check out pywin.framework.intpyapp - you will find almost all the pythonwin
"app" framework there, including sys.argv handing.  Specifically, "/run"
might be the option you want (and alternatively, patches that get a bit
closer to what you need are obviously welcome)

> I'd also like to save window settings when I close the IDE. How do I
> capture the quit event? How do I enumerate the open windows?

I'm not sure how simple that would be, but extra code in intpyapp's
ExitInstance might make sense.

> I have started reading the MFC documentation. It is not easy reading!
> It
> is hard to tell which methods are actually available, and what the
> parameters mean.

Yep - that hasn't changed in over 10 years ;)

> I assume if I had the appropriate header file I'd have access to the
> values of the named constants. How do I get that file?

What file?  Win32ui has most constants you should need.  Otherwise, see
h2py.py (somewhere in your Python's scripts/tools directory)

> Is there a tutorial re MFC that might make it easier?

Not that I'm aware of (but things may have changed in the 10 years since I
last looked ;)

Cheers,

Mark





More information about the python-win32 mailing list