Re: Locale confusion

2005-01-12 Thread Jorgen Grahn
On 11 Jan 2005 05:49:32 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Jorgen Grahn wrote: > [snip] > >> >> frailea> cat foo >> import locale >> print locale.getlocale() >> locale.setlocale(locale.LC_CTYPE) >> print locale.getlocale() ... >> When I run it as a script it isn't though, and

Re: Locale confusion

2005-01-11 Thread Serge . Orlov
Jorgen Grahn wrote: [snip] > > frailea> cat foo > import locale > print locale.getlocale() > locale.setlocale(locale.LC_CTYPE) > print locale.getlocale() > > When I paste it into an interactive Python session, the locale is already > set up correctly (which is what I suppose interactive mode /shou

Locale confusion

2005-01-07 Thread Jorgen Grahn
[Long posting due to the examples, but pretty simple question.] I'm sitting here with a Debian Linux 'Woody' system with the default Python 2.2 installation, and I want the re module to understand that re.compile(r'\W+'. re.LOCALE) doesn't match my national, accented characters. I don't quite und