Syntax Check

  • Daniel Pozmanter

    Ok, so here's what's up with the syntax checking:

    tabnanny sends the output to stdout.  Less than ideal, but very workable.

    tabnanny only checks indentation errors.

    I figure if this is worth doing, it is worth doing whole hog.

    What I am looking at doing now, is simply running "compile", then grabbing the output, and parsing that.

    Would that miss anything that tabnanny picks up?

    • Daniel Pozmanter

      Apparently yes.  The solution was to hack tabnanny to return a result string, and run that after running compile too.

    • Franz Steinhaeusler

      Hm, i tried this already with SPE - Stani's Python Editor.

      I couldn't find anything, tabnann find, what
      isn't found by the python compile command.

    • Daniel Pozmanter

      I've found that tabnanny can find mixed indentation errors, such as
      ->def func:
      -> x = 1


Log in to post a comment.