[python-win32] Serious bug in pywin32?
Mark Tolonen
metolone+gmane at gmail.com
Fri Jan 30 16:13:39 CET 2009
"Dahlstrom, Roger" <rdahlstrom at directedge.com> wrote in message
news:70D9B06B9E99EE4E98E4893703ADA1411199A3EAAA at EXCHANGE1.global.knight.com...
> Tried it in a few versions on a couple computers, and was unable to
> reproduce.
>
> -----Original Message-----
> From: python-win32-bounces+rdahlstrom=directedge.com at python.org
> [mailto:python-win32-bounces+rdahlstrom=directedge.com at python.org] On
> Behalf Of Mark Tolonen
> Sent: Friday, January 30, 2009 9:16 AM
> To: python-win32 at python.org
> Subject: [python-win32] Serious bug in pywin32?
>
> Today I ran PythonWin and accidentally typed 'python' at the interactive
> prompt out of habit, since I often use the cmd prompt instead. PythonWin
> immediately crashed. I re-ran PythonWin and tried again. Same crash.
> Ran
> again...typed 'import os'. No crash, but the interactive prompt hung.
> Anything typed at the interactive prompt now hangs.
>
> I have removed and reinstalled pywin32. I even removed and reinstalled my
> entire Python 2.6.1 installation (including deleting any Python-related
> keys
> in the registry). It still doesn't work :'(
>
> Python itself (run from the command line) gives the expected:
>
> Python 2.6.1 (r261:67517, Dec 4 2008, 16:51:00) [MSC v.1500 32 bit
> (Intel)]
> on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> python
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> NameError: name 'python' is not defined
>
> Any ideas how to get PythonWin working again? Anyone else see the same
> issue (don't try this on your favorite system). I will file a bug on
> SourceForge.
I tracked down the source of the problem.
I am using Windows XP, SP3. Two days ago I changed Control Panel, Regional
and Language Options, Advanced tab, "Select a language to match the language
version of the non-Unicode programs you want to use:" from "English (United
States)" to "Chinese (PRC)" to work with Python 2.6 and 3.0 Unicode scripts
dealing with Chinese characters at the console prompt. I was able to fix
the problem by returning the setting to English, and reproduce the problem
by setting it back to Chinese. It turns out typing any command that throws
an exception will crash PythonWin with this setting, and any valid command
hangs the interactive prompt.
I thought I'd used PythonWin since making the change, but it was probably on
another computer. Does PythonWin normally work on Chinese Windows, where
this setting would be the default? I imagine any Chinese programmer
wouldn't use PythonWin since it doesn't support Unicode to begin with,
although that may change for the eventual 3.0 release.
Anybody willing to try to reproduce this scenario before I file a bug?
-Mark
More information about the python-win32
mailing list