Example of how it works now and then how I think should work:
>>> a = 'def test():\n\tprint "test2"\n\t\tprint "test3"\n\tprint "test4"\n'
>>> try:
... t = compile(a,'from a','exec')
... except SyntaxError, msg:
... print msg
...
('invalid syntax', (None, 0, 29, 'def test():\012\011print "test2"\012\011\011print "test3"\012\011print "test4"\012'))
>>>
>>> a = 'def test():\n\tprint "test2"\n\t\tprint "test3"\n\tprint "test4"\n'
>>> try:
... t = compile(a,'from a','exec')
... except SyntaxError, msg:
... print msg
...
('invalid syntax', (None, 2, 2, '\011\011print "test3"\012'))
>>>
Can this be done easily? I have not looked at the code yet, but I
imagine it should not be too hard to do...
-- Lance Ellinghouse lance@fox.com