From: vsoler on
Hi all,

I just installed python 3.1.2 where I used to have python 2.6.4. I'm
working on Win7.

The IDLE GUI works, but I get the following message when trying to
open *.py files written for py 2.6

The Application cannot locate win32ui.pyd (or Python) (126)

Should I change the PATH in Windows? Should I change the PYTHONPATH? I
am a bit lost. Everything worked fine with 2.6.

Moreover, when I try to open an old *.py file, I sometimes get a
message saying that the file should be converted to UTF-8. What does
this mean?

I'm also trying to use the 2to3 converter, but I cannot see where the
converted files are written to!

Any help is highly appreciated.

Vicente Soler
From: Alex Willmer on
On Aug 4, 2:35 pm, vsoler <vicente.so...(a)gmail.com> wrote:
> Hi all,
>
> I just installed python 3.1.2 where I used to have python 2.6.4. I'm
> working on Win7.
>
> The IDLE GUI works, but I get the following message when trying to
> open *.py files written for py 2.6
>
>         The Application cannot locate win32ui.pyd (or Python) (126)
>

win32ui is part of the PyWin32 package. Most likely you have a version
of PyWin32 for Python 2.6 installed, you should uninstall that and
install PyWin32 for Python 3.1. Downloads are at
http://sourceforge.net/projects/pywin32/files/

You should do the same for any other third party packages that are
installed.

> Moreover, when I try to open an old *.py file, I sometimes get a
> message saying that the file should be converted to UTF-8. What does
> this mean?

Those files contain non-ascii characters (e.g. £, €, æ). Non-ascii
characters must be encoded when saved using and encoding. UTF-8 is one
such encoding, and it was chosen as the default .py encoding for
Python 3.x. Those files are probably in iso8859, cp432, or perhaps
UTF-16 (aka UCS-2). You can save them in UTF-8 using your favourite
text editor, or declare the encoding so Python 3 knows it. More info:

http://www.joelonsoftware.com/articles/Unicode.html
http://docs.python.org/howto/unicode

> I'm also trying to use the 2to3 converter, but I cannot see where the
> converted files are written to!

I think 2to3 prints a diff of the file changes to the console. The -w
command line option should modify files in place.
From: vsoler on
On Aug 4, 5:41 pm, Alex Willmer <a...(a)moreati.org.uk> wrote:
> On Aug 4, 2:35 pm, vsoler <vicente.so...(a)gmail.com> wrote:
>
> > Hi all,
>
> > I just installed python 3.1.2 where I used to have python 2.6.4. I'm
> > working on Win7.
>
> > The IDLE GUI works, but I get the following message when trying to
> > open *.py files written for py 2.6
>
> >         The Application cannot locate win32ui.pyd (or Python) (126)
>
> win32ui is part of the PyWin32 package. Most likely you have a version
> of PyWin32 for Python 2.6 installed, you should uninstall that and
> install PyWin32 for Python 3.1. Downloads are athttp://sourceforge.net/projects/pywin32/files/
>
> You should do the same for any other third party packages that are
> installed.
>
> > Moreover, when I try to open an old *.py file, I sometimes get a
> > message saying that the file should be converted to UTF-8. What does
> > this mean?
>
> Those files contain non-ascii characters (e.g. £, €, æ). Non-ascii
> characters must be encoded when saved using and encoding. UTF-8 is one
> such encoding, and it was chosen as the default .py encoding for
> Python 3.x. Those files are probably in iso8859, cp432, or perhaps
> UTF-16 (aka UCS-2). You can save them in UTF-8 using your favourite
> text editor, or declare the encoding so Python 3 knows it. More info:
>
> http://www.joelonsoftware.com/articles/Unicode.htmlhttp://docs.python.org/howto/unicode
>
> > I'm also trying to use the 2to3 converter, but I cannot see where the
> > converted files are written to!
>
> I think 2to3 prints a diff of the file changes to the console. The -w
> command line option should modify files in place.

Thank you Alex for your detailes reply.

Before switching to Python 3.1.2 I removed all my Python 2.6 packages
(python, pywin32, numpy, wxpython). However, the removal was not
complete since some files could not be removed. Additionally, I still
see my C:\python26 directory which is suposed not to exist any longer.

If I go to the Control Panel, I cannot see any of the above suposedly
removed programs as pending of removal, so I really do not know what
more to do. I was even thinking of removing the C:\python26 directory
with the Supr key, but I always heard that it is not a good idea, the
Registry could become inconsistent. Additionally, I have not found in
my Win7 system nay utility for fixing it, should it become corrupt.

Perhaps my questions concern a bit more the Operating system (windows)
than they do python, but since I am fond of python and I definitely
would like to become somehow proficient at it, I would like to solve
the problem that I have.

I would not like to take a lot of your time, but, do you have any
hints as to what I should do to 'tune' my PC?

Thank you very much for your help.

Vicente Soler

From: Alex Willmer on
On Aug 4, 5:19 pm, vsoler <vicente.so...(a)gmail.com> wrote:
> On Aug 4, 5:41 pm, Alex Willmer <a...(a)moreati.org.uk> wrote:
>
>
>
>
>
> > On Aug 4, 2:35 pm, vsoler <vicente.so...(a)gmail.com> wrote:
>
> > > Hi all,
>
> > > I just installed python 3.1.2 where I used to have python 2.6.4. I'm
> > > working on Win7.
>
> > > The IDLE GUI works, but I get the following message when trying to
> > > open *.py files written for py 2.6
>
> > >         The Application cannot locate win32ui.pyd (or Python) (126)
>
> > win32ui is part of the PyWin32 package. Most likely you have a version
> > of PyWin32 for Python 2.6 installed, you should uninstall that and
> > install PyWin32 for Python 3.1. Downloads are athttp://sourceforge.net/projects/pywin32/files/
>
> > You should do the same for any other third party packages that are
> > installed.
>
> > > Moreover, when I try to open an old *.py file, I sometimes get a
> > > message saying that the file should be converted to UTF-8. What does
> > > this mean?
>
> > Those files contain non-ascii characters (e.g. £, €, æ). Non-ascii
> > characters must be encoded when saved using and encoding. UTF-8 is one
> > such encoding, and it was chosen as the default .py encoding for
> > Python 3.x. Those files are probably in iso8859, cp432, or perhaps
> > UTF-16 (aka UCS-2). You can save them in UTF-8 using your favourite
> > text editor, or declare the encoding so Python 3 knows it. More info:
>
> >http://www.joelonsoftware.com/articles/Unicode.htmlhttp://docs.python...
>
> > > I'm also trying to use the 2to3 converter, but I cannot see where the
> > > converted files are written to!
>
> > I think 2to3 prints a diff of the file changes to the console. The -w
> > command line option should modify files in place.
>
> Thank you Alex for your detailes reply.
>
> Before switching to Python 3.1.2 I removed all my Python 2.6 packages
> (python, pywin32, numpy, wxpython). However, the removal was not
> complete since some files could not be removed. Additionally, I still
> see my C:\python26 directory which is suposed not to exist any longer.

It probably contains one or two files the installers weren't aware of.
E.g. a module you added manually, a log, a .pyc

> I would not like to take a lot of your time, but, do you have any
> hints as to what I should do to 'tune' my PC?

Take a backup then either delete the Python26 directory, or rename it.
Any problems, reverse the process.

From: vsoler on
On Aug 4, 7:52 pm, Alex Willmer <a...(a)moreati.org.uk> wrote:
> On Aug 4, 5:19 pm, vsoler <vicente.so...(a)gmail.com> wrote:
>
>
>
> > On Aug 4, 5:41 pm, Alex Willmer <a...(a)moreati.org.uk> wrote:
>
> > > On Aug 4, 2:35 pm, vsoler <vicente.so...(a)gmail.com> wrote:
>
> > > > Hi all,
>
> > > > I just installed python 3.1.2 where I used to have python 2.6.4. I'm
> > > > working on Win7.
>
> > > > The IDLE GUI works, but I get the following message when trying to
> > > > open *.py files written for py 2.6
>
> > > >         The Application cannot locate win32ui.pyd (or Python) (126)
>
> > > win32ui is part of the PyWin32 package. Most likely you have a version
> > > of PyWin32 for Python 2.6 installed, you should uninstall that and
> > > install PyWin32 for Python 3.1. Downloads are athttp://sourceforge.net/projects/pywin32/files/
>
> > > You should do the same for any other third party packages that are
> > > installed.
>
> > > > Moreover, when I try to open an old *.py file, I sometimes get a
> > > > message saying that the file should be converted to UTF-8. What does
> > > > this mean?
>
> > > Those files contain non-ascii characters (e.g. £, €, æ). Non-ascii
> > > characters must be encoded when saved using and encoding. UTF-8 is one
> > > such encoding, and it was chosen as the default .py encoding for
> > > Python 3.x. Those files are probably in iso8859, cp432, or perhaps
> > > UTF-16 (aka UCS-2). You can save them in UTF-8 using your favourite
> > > text editor, or declare the encoding so Python 3 knows it. More info:
>
> > >http://www.joelonsoftware.com/articles/Unicode.htmlhttp://docs.python....
>
> > > > I'm also trying to use the 2to3 converter, but I cannot see where the
> > > > converted files are written to!
>
> > > I think 2to3 prints a diff of the file changes to the console. The -w
> > > command line option should modify files in place.
>
> > Thank you Alex for your detailes reply.
>
> > Before switching to Python 3.1.2 I removed all my Python 2.6 packages
> > (python, pywin32, numpy, wxpython). However, the removal was not
> > complete since some files could not be removed. Additionally, I still
> > see my C:\python26 directory which is suposed not to exist any longer.
>
> It probably contains one or two files the installers weren't aware of.
> E.g. a module you added manually, a log, a .pyc
>
> > I would not like to take a lot of your time, but, do you have any
> > hints as to what I should do to 'tune' my PC?
>
> Take a backup then either delete the Python26 directory, or rename it.
> Any problems, reverse the process.

Thank you very much Alex