Difficulty with "inconsistent use of tabs and spaces in indentation" in file called <string>

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Feb 13 02:29:46 EST 2008


En Wed, 13 Feb 2008 03:01:31 -0200, greg <greg at cosc.canterbury.ac.nz>  
escribi�:

> ibloom wrote:
>> Of course I didn't understand that py2app was trying to compile my own
>> python source code and when I switched to Xcode as my new editor, I
>> started mixing in tabs. So <string> was in fact my code.
>
> Seems like py2app could be a bit friendlier about reporting
> syntax errors in the code it's trying to compile!

Yes, but the standard "compiler" package (used by py2app) is somewhat  
guilty too. The parseFile function is called with a file name, but such  
info is lost and the filename isn't used in the error messages. Compare  
with the builtin "compile" function, which *does* use the supplied file  
name to report meaningful errors.

-- 
Gabriel Genellina




More information about the Python-list mailing list