[Tutor] Python for Windows: module re, re.LOCALE different fo r Idle and p ython shell? (original) (raw)
Steve lonetwin at gmail.com
Thu Jul 29 15:20:25 CEST 2004
- Previous message: [Tutor] Python for Windows: module re, re.LOCALE different fo r Idle and p ython shell?
- Next message: [Tutor] Efficiency?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Ralf,
On Thu, 29 Jul 2004 13:22:11 +0200, Steckel, Ralf <ralf.steckel at atosorigin.com> wrote:
thanx for your suggestion (what actually made me to improve my script by opening the file via codecs), but this doesn't fix the problem.
You are welcome.
<...snip...>
By using the codecs.open with encoding = 'iso-8859-1' my basic problem (re doesn't recognize German Umlaute as valid characters in re in Python shell) still exists.
Oh ok. Well unfortunately, I am reading this using the gmail webinterface and I ran your script on my linux box, and so I can't reproduce the behaviour that you are experiencing. In any case, this seems to be (like you, yourself mentioned) a problem with the environment rather than with python, so here's another shot in the dark. ....have you considered setting a default locale for the script by using the 'locale' module ??
ie: import locale locale.setlocale(locale.LC_ALL, 'de_DE')
HTH Steve
- Previous message: [Tutor] Python for Windows: module re, re.LOCALE different fo r Idle and p ython shell?
- Next message: [Tutor] Efficiency?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]