py_compile vs. IndentationError

Discussion in 'Python' started by Mr. Magoo, Mar 26, 2005.

  1. Mr. Magoo

    Mr. Magoo Guest

    Why does py_compile print IndentationError in a different format than
    SyntaxError? It makes it harder to parse the output in a non-python
    program.

    Sorry: IndentationError: ('unindent does not match any outer indentation
    level', ('foo.py', 19, 17, '\t\t\t return 0.0 \n'))

    instead of

    File "foo.py", line 19
    zreturn 0.0

    for example.

    Is there a way for me to wrap this up in a script and transform the
    output on the way out?

    Magoo
    Mr. Magoo, Mar 26, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Frank Bechmann
    Replies:
    2
    Views:
    744
    Frank Bechmann
    Dec 29, 2003
  2. Replies:
    6
    Views:
    29,488
    heiNey
    Apr 5, 2008
  3. Vyacheslav Sotnikov
    Replies:
    0
    Views:
    436
    Vyacheslav Sotnikov
    Nov 8, 2006
  4. Borse, Ganesh
    Replies:
    1
    Views:
    989
  5. dhyams
    Replies:
    7
    Views:
    113
    Neil Cerutti
    Jun 12, 2013
Loading...

Share This Page