Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias Assign NameStore BinOpAdd BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign NameStore Str ClassDef bases body Assign NameStore ListLoad TupleLoad Str ListLoad NameLoad TupleLoad Str Str TupleLoad Str Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore NameLoad If NameLoad body If Call AttributeLoad NameLoad attr NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Str orelse Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign NameStore Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Str TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Assign TupleStore NameStore TupleStore NameStore NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Str BinOpMod Str NameLoad Return NameLoad ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad If BoolOpAnd NameLoad CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore BinOpAdd NameLoad Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Str Str TryFinally body TryExcept body Return Call NameLoad NameLoad NameLoad Str handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body TryExcept body Assign TupleStore NameStore TupleStore NameStore NameStore NameStore NameStore NameLoad If UnaryOpNot NameLoad body Assign AttributeStore NameLoad attr TupleLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad handlers ExceptHandler body Assign NameStore BinOpAdd Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str BinOpAdd Str NameLoad Return NameLoad finalbody Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BinOpMod Str TupleLoad BinOpSub NameLoad Num BinOpSub NameLoad Num Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str BinOpAdd NameLoad Str NameLoad If CompareEq Str Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad orelse Expr Call AttributeLoad NameLoad attr Str BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Return Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad NameLoad attr Str Str Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Str keyword Num keyword Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If BoolOpAnd NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If BoolOpOr NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr orelse Assign NameStore NameLoad orelse If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore BinOpAdd BinOpAdd Str BinOpMult Num Str Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list decorator_list
N/A N/A Extension to execute code outside the Python shell window.

This adds the following commands:

- Check module does a full syntax check of the current module.
  It also runs the tabnanny to catch any inconsistent tabs.

- Run module executes the module's code in the __main__ namespace.  The window
  must have been saved previously. The module is added to sys.modules, and is
  also added to the __main__ namespace.

XXX GvR Redesign this interface (yet again) as follows:

- Present a dialog box for ``Run Module''

- Allow specify command line arguments in the dialog box

 N/A os N/A re N/A string N/A tabnanny N/A tokenize N/A tkMessageBox N/A PyShell configHandler idleConf N/A IDENTCHARS N/A N/A N/A string ascii_letters N/A string digits _ N/A indent_message Error: Inconsistent indentation detected!

1) Your indentation is outright incorrect (easy to fix), OR

2) Your indentation mixes tabs and spaces.

To fix case 2, change all tabs to spaces by using Edit->Select All followed by Format->Untabify Region and specify the number of columns used by each tab.
 ScriptBinding N/A N/A N/A menudefs N/A N/A run N/A None N/A Check Module <<check-module>> N/A Run Module <<run-module>> __init__ N/A N/A self editwin N/A N/A N/A N/A self editwin editwin N/A N/A self flist N/A N/A self editwin flist N/A N/A self root N/A N/A self editwin root N/A _cleanup_temp N/A N/A self filename is_temp N/A True N/A N/A is_temp N/A N/A N/A N/A N/A N/A os unlink filename N/A N/A N/A OSError N/A N/A N/A check_module_event N/A N/A self event N/A N/A N/A N/A filename is_temp N/A N/A self getfilename N/A ret None N/A filename N/A N/A N/A N/A self checksyntax filename N/A N/A N/A N/A N/A self tabnanny filename N/A N/A ret break N/A N/A ret break N/A N/A N/A self _cleanup_temp filename is_temp N/A N/A ret break N/A ret N/A tabnanny N/A N/A self filename N/A N/A N/A f N/A open filename r N/A N/A N/A N/A N/A tabnanny process_tokens N/A N/A tokenize generate_tokens N/A f readline N/A N/A N/A N/A tokenize TokenError N/A msg N/A N/A N/A msgtxt N/A lineno start msg N/A N/A N/A N/A self editwin gotoline lineno N/A N/A N/A self errorbox Tabnanny Tokenizing Error N/A Token Error: %s msgtxt N/A False N/A N/A N/A tabnanny NannyNag N/A nag N/A N/A N/A N/A N/A self editwin gotoline N/A N/A nag get_lineno N/A N/A N/A self errorbox Tab/space error indent_message N/A False N/A True N/A checksyntax N/A N/A self filename N/A N/A N/A N/A self shell shell N/A N/A N/A self flist open_shell N/A saved_stream N/A N/A shell get_warning_stream N/A N/A N/A shell set_warning_stream N/A shell stderr N/A f N/A open filename r N/A source N/A N/A f read N/A N/A N/A f close N/A N/A source N/A N/A source N/A N/A re sub \r\n source N/A source N/A N/A re sub \r source N/A N/A source N/A N/A source N/A -1 N/A N/A source N/A source N/A text N/A N/A self editwin text N/A N/A N/A text tag_remove ERROR 1.0 end N/A N/A N/A N/A N/A N/A compile source filename exec N/A N/A N/A N/A SyntaxError OverflowError N/A err N/A N/A N/A N/A N/A msg N/A errorfilename lineno offset line err N/A N/A errorfilename N/A N/A N/A err args N/A msg N/A filename lineno offset line N/A N/A err filename filename N/A N/A N/A self colorize_syntax_error msg lineno offset N/A N/A N/A N/A msg N/A ***  N/A str err N/A N/A N/A self errorbox Syntax error N/A There's an error in your program:
 msg N/A False N/A N/A N/A N/A shell set_warning_stream saved_stream N/A colorize_syntax_error N/A N/A self msg lineno offset N/A N/A N/A text N/A N/A self editwin text N/A pos N/A 0.0 + %d lines + %d chars N/A N/A lineno 1 N/A offset 1 N/A N/A N/A text tag_add ERROR pos N/A char N/A N/A text get pos N/A N/A char N/A char IDENTCHARS N/A N/A N/A N/A text tag_add ERROR N/A pos  wordstart pos N/A N/A N/A N/A text get pos N/A N/A N/A N/A text mark_set insert pos N/A N/A N/A N/A text mark_set insert N/A pos +1c N/A N/A N/A text see pos N/A run_module_event N/A N/A self event N/A N/A N/A Run the module after setting up the environment.

        First check the syntax.  If OK, make sure the shell is active and
        then transfer the arguments, set the run environment's working
        directory to the directory of the module being executed and also
        add that directory to its sys.path if not already included.

         N/A N/A filename is_temp N/A N/A self getfilename N/A N/A filename N/A N/A break N/A code N/A N/A self checksyntax filename N/A N/A code N/A N/A N/A N/A self _cleanup_temp filename is_temp N/A break N/A N/A N/A N/A self tabnanny filename N/A N/A N/A N/A self _cleanup_temp filename is_temp N/A break N/A shell N/A self shell N/A interp N/A shell interp N/A N/A PyShell use_subprocess N/A N/A N/A N/A shell restart_shell N/A dirname N/A N/A N/A os path dirname filename N/A N/A N/A interp runcommand N/A if 1:
            _filename = %r
            import sys as _sys
            from os.path import basename as _basename
            if (not _sys.argv or
                _basename(_sys.argv[0]) != _basename(_filename)):
                _sys.argv = [_filename]
            import os as _os
            _os.chdir(%r)
            del _filename, _sys, _basename, _os
            
 N/A filename dirname N/A N/A N/A interp prepend_syspath filename N/A is_temp N/A N/A N/A N/A interp runcode code filename N/A N/A N/A N/A interp tkconsole append_cleanup_func N/A self _cleanup_temp filename N/A N/A N/A N/A interp runcode code N/A break N/A getfilename N/A N/A self N/A N/A N/A Get source filename.  If not saved, offer to save (or create) file

        The debugger requires a source file.  Make sure there is one, and that
        the current version of the source buffer has been saved.  If the user
        declines to save or cancels the Save As dialog, return None.

        If the user has configured IDLE for Autosave, the file will be
        silently saved if it already exists and is dirty.

         N/A filename N/A N/A N/A self editwin io filename N/A is_temp False N/A N/A N/A N/A N/A self editwin get_saved N/A N/A autosave N/A N/A idleConf GetOption main General autosave type bool N/A save_before_run N/A N/A idleConf GetOption main General save-before-run default 1 type bool N/A io N/A N/A self editwin io N/A N/A filename autosave N/A N/A N/A N/A io save None N/A N/A N/A filename save_before_run N/A N/A reply N/A N/A self ask_save_dialog N/A N/A N/A N/A N/A self editwin text focus_set N/A N/A reply ok N/A N/A N/A N/A io save None N/A filename N/A N/A N/A self editwin io filename N/A N/A filename None N/A N/A N/A save_before_run N/A N/A filename N/A N/A io save_as_temp prefix IDLE_rtmp_ N/A is_temp True N/A N/A filename is_temp N/A ask_save_dialog N/A N/A self N/A N/A N/A msg N/A N/A Source Must Be Saved
 N/A 5 OK to Save? N/A mb N/A N/A tkMessageBox Message title Save Before Run or Check message msg icon N/A tkMessageBox QUESTION type N/A tkMessageBox OKCANCEL default N/A tkMessageBox OK master N/A N/A self editwin text N/A N/A N/A mb show N/A errorbox N/A N/A self title message N/A N/A N/A N/A N/A tkMessageBox showerror title message master N/A N/A self editwin text N/A N/A N/A N/A N/A self editwin text focus_set N/A N/A