return idleConf.GetExtensions(editor_only=True)
def load_extension(self, name):
- mod = __import__(name, globals(), locals(), [])
+ try:
+ mod = __import__(name, globals(), locals(), [])
+ except ImportError:
+ print "\nFailed to import extension: ", name
+ return
cls = getattr(mod, name)
keydefs = idleConf.GetExtensionBindings(name)
if hasattr(cls, "menudefs"):
methodname = methodname + "_event"
if hasattr(ins, methodname):
self.text.bind(vevent, getattr(ins, methodname))
- return ins
def apply_bindings(self, keydefs=None):
if keydefs is None:
*Release date: XX-XXX-2005*
+- If an extension can't be loaded, print warning and skip it instead of
+ erroring out.
+
- The GUI was hanging if the shell window was closed while a raw_input()
was pending. Restored the quit() of the readline() mainloop().
http://mail.python.org/pipermail/idle-dev/2004-December/002307.html
*Release date: 29-Jul-2003*
-- Added a banner to the shell discussimg warnings possibly raised by personal
+- Added a banner to the shell discussing warnings possibly raised by personal
firewall software. Added same comment to README.txt.