[wxPython-users] application hinstance & module name

Enrico Bortolazzi enrico.bortolazzi at infinito.it
Fri Nov 23 09:14:48 PST 2007


At 10.50 23/11/2007 -0600, Chris Mellon wrote:

>You can't just change the hinstance. It's what ties a window with a
>specific running process.

Yeah, this was what I knew, and you confirm! I also don't like to do 
something very dirty, it opens the door to future problems.


> > But my question is: there's a way to change the module name? Probably
> > changing the histance associated to the main window could be a
> > solution, but how to do it in Python? Or other ideas?
> >
>
>If you package your application with py2exe, it's quite possible that
>you'd get the name of your packaged executable. In fact, I'm quite
>surprised that whatever it's doing resolves to the wxPython .pyd and
>not to python.exe. Have you confirmed that a config file for
>python.exe isn't picked up?

To discover which config file is picked up is quite easy, inside my 
application I type a specific key combination and the screenreader 
try to open a _core_ file (in case it doesn't find it you get an 
empty file ready to be written).
I used also py2exe but nothing changed. The package executable name 
is associated with the main process (the same as for python.exe if 
run form the py) but the main window is 'associated' to _core_.py. If 
you download WinExplorer you can see it. It took me a long time to 
understand where was the problem, but now I have no solution :-)
I wrote to the screenreader producer but at the moment I got no answer.

Anyway, many thanks for your attention,
Enrico








More information about the wxpython-users mailing list