Difficulty with "inconsistent use of tabs and spaces in indentation" in file called <string>
Steve Holden
steve at holdenweb.com
Mon Feb 11 20:35:26 EST 2008
ibloom wrote:
> My main problem is, I don't know where to find the file:
> File "<string>", line 628
>
> As in I don't know what code it is refering to by <string> ??
> It isn't code that I wrote, its something from python or pyObjC
>
You'll typically see that in code that's being executed from a
dynamically created string in the code, which is going to make it *very*
difficult to debug.
>>> exec "1/0"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 1, in <module>
ZeroDivisionError: integer division or modulo by zero
>>> eval('1/0')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 1, in <module>
ZeroDivisionError: integer division or modulo by zero
>>>
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list
mailing list