Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    compile existed before and is nowhere the full compiler module. ast is closer. Commented Aug 7, 2012 at 22:08
  • But compile wants filenames and such. I just want to check a string, not read or write to any files. Commented Aug 7, 2012 at 22:13
  • Just pass something like <string> as filename. Full details in the linked docs. Commented Aug 7, 2012 at 22:15
  • Aside from that, the compile function has a few quirks (requires specific newline characters, and raises a TypeError out of friggin' nowhere when there are NUL bytes in the input) other options don't have. Commented Aug 7, 2012 at 22:19