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
||Methods defined here:|
- __init__(self, editwin)
- check_module_event(self, event)
- checksyntax(self, filename)
- colorize_syntax_error(self, msg, lineno, offset)
- errorbox(self, title, message)
- 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.
- run_module_event(self, event)
- 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.
- tabnanny(self, filename)
Data and other attributes defined here:
- menudefs = [('run', [None, ('Check Module', '<<check-module>>'), ('Run Module', '<<run-module>>')])]
||IDENTCHARS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'|
idleConf = <idlelib.configHandler.IdleConf instance>
indent_message = 'Error: Inconsistent indentation detected!\n\nThis ...lowed by Untabify Region (both in the Edit menu).'