Re: is there a way to get the encoding of python file

2010-09-13 Thread Thomas Jollans
On Monday 13 September 2010, it occurred to Robert Kern to exclaim: > On 9/13/10 2:00 PM, Stef Mientki wrote: > > On 12-09-2010 19:28, Robert Kern wrote: > >> On 9/12/10 4:14 AM, Stef Mientki wrote: > >>>hello, > >>> > >>> Is it possible to get the encoding of a python file from the first >

Re: is there a way to get the encoding of python file

2010-09-13 Thread Robert Kern
On 9/13/10 2:00 PM, Stef Mientki wrote: On 12-09-2010 19:28, Robert Kern wrote: On 9/12/10 4:14 AM, Stef Mientki wrote: hello, Is it possible to get the encoding of a python file from the first source line, (if there's any), after importing it ( with '__import__' ) # -*- coding: windows-

Re: is there a way to get the encoding of python file

2010-09-13 Thread Stef Mientki
On 12-09-2010 19:28, Robert Kern wrote: > On 9/12/10 4:14 AM, Stef Mientki wrote: >> hello, >> >> Is it possible to get the encoding of a python file from the first source >> line, >> (if there's any), >> after importing it ( with '__import__' ) >> >> # -*- coding: windows-1252 -*- > > The regu

Re: is there a way to get the encoding of python file

2010-09-12 Thread Robert Kern
On 9/12/10 4:14 AM, Stef Mientki wrote: hello, Is it possible to get the encoding of a python file from the first source line, (if there's any), after importing it ( with '__import__' ) # -*- coding: windows-1252 -*- The regular expression used to match the encoding declaration is given her