List Info

Thread: Pure Python Pythonwin.exe




Pure Python Pythonwin.exe
user name
2006-06-20 09:40:38
Hello all,

Pythonwin the IDE has many fans, and I would like to get it
working with
Movable Python [#]_.

Pythonwin is launched with 'pythonwin.exe'. Presumably (I
speak from
ignorance here) this uses the registry to determine the
installed Python.

When I run Pythonwin.exe on a computer with no installed
Python (but a
working Movpy setup) I get the message :

    The application can not locate win32ui.pyd (or python)
(126)
    The specified  module could not be found.

This is after putting the Pythonwin directory on the path
[#]_ - and
win32ui.pyd exists in the current directory (same directory
as
pythonwin.exe).

I see that the Pythonwin source code is C++, so I guess
there is no way
of creating a Pure Python version. 

Is there anyway I can tell Pythonwin which Python
interpreter to use,
without having to make registry settings ?

All the best,

Fuzzyman
http:/
/www.voidspace.org.uk/python/index.shtml

.. [#] http://www.
voidspace.org.uk/python/movpy/
.. [#] This was necessary to get it to find mfc71.dll
_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32
Pure Python Pythonwin.exe
user name
2006-06-21 23:50:37
> Pythonwin the IDE has many fans, and I would like to
get it
> working with
> Movable Python [#]_.

Great!

> Pythonwin is launched with 'pythonwin.exe'.
Presumably (I speak from
> ignorance here) this uses the registry to determine the
> installed Python.

Nope - it uses some old code that really should die.

>
> When I run Pythonwin.exe on a computer with no
installed Python (but a
> working Movpy setup) I get the message :
>
>     The application can not locate win32ui.pyd (or
python) (126)
>     The specified  module could not be found.
>
> This is after putting the Pythonwin directory on the
path [#]_ - and
> win32ui.pyd exists in the current directory (same
directory as
> pythonwin.exe).

That surprises me.  win32ui.pyd next to pythonwin.exe should
work fine -
that is the first thing checked by the code (which FYI is in
pythonwin/win32uiHostGlue.h)

> I see that the Pythonwin source code is C++, so I guess
there
> is no way
> of creating a Pure Python version. 

But there is 

import sys
import win32ui
# importing 'intpyapp' automatically registers an app
object.
from pywin.framework import intpyapp

# Remove this script name from sys.argv, else Pythonwin will
try and open
it!
sys.argv = sys.argv[:-1]
# Get the MFC "app" object and boot it up.
app = win32ui.GetApp()
app.InitInstance()
app.Run()
app.ExitInstance()

The above code should boot a fully functioning Pythonwin -
just execute it
from pythonw.exe and you should be good to go.  The only
reason I haven't
moved to something like this is that (a) pythonwin.exe
already exists, and
(b) having a .exe makes it more obvious to a casual user...

Cheers,

Mark

_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )