is there a way to get the encoding of python file

Stef Mientki stef.mientki at gmail.com
Sun Sep 12 11:14:34 CEST 2010


 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 -*-

thanks,
Stef





More information about the Python-list mailing list