*************************************************************************** IPython post-mortem report IPython version: 0.9.1 SVN revision : 1143 Platform info : os.name -> nt, sys.platform -> win32 *************************************************************************** Current user configuration structure: {'Version': 0, '__allownew': True, 'alias': [], 'args': [], 'autocall': 1, 'autoedit_syntax': 0, 'autoexec': [], 'autoindent': 1, 'automagic': 1, 'banner': 0, 'c': '', 'cache_size': 1000, 'classic': 0, 'color_info': 1, 'colors': 'Linux', 'confirm_exit': 1, 'debug': 0, 'deep_reload': 0, 'editor': 'C:\\Program\\TextPad 4\\TextPad.exe', 'embedded': False, 'execfile': [], 'execute': [], 'gthread': 0, 'help': 0, 'import_all': [], 'import_mod': [], 'import_some': [[]], 'include': [], 'interact': 0, 'ipythondir': 'c:\\documents and settings\\jorgenst\\_ipython', 'log': 0, 'logfile': '', 'logplay': '', 'magic_docstrings': 0, 'messages': 1, 'multi_line_specials': 1, 'nosep': 0, 'object_info_string_level': 0, 'opts': Struct({'pylab': 1, '__allownew': True}), 'pdb': 0, 'pprint': 1, 'profile': '', 'prompt_in1': 'In [\\#]: ', 'prompt_in2': ' .\\D.: ', 'prompt_out': 'Out[\\#]: ', 'prompts_pad_left': 1, 'pydb': 0, 'pylab': 1, 'pylab_import_all': 1, 'q4thread': 0, 'qthread': 0, 'quick': 0, 'quiet': 0, 'rcfile': 'ipythonrc.ini', 'readline': 1, 'readline_merge_completions': 1, 'readline_omit__names': 0, 'readline_parse_and_bind': [], 'readline_remove_delims': '-/~', 'screen_length': -2, 'separate_in': '\n', 'separate_out': '\n', 'separate_out2': '', 'system_header': 'IPython system call: ', 'system_verbose': 0, 'term_title': 1, 'tk': 0, 'upgrade': 0, 'wildcards_case_sensitive': 1, 'wthread': 0, 'wxversion': '0', 'xmode': 'Context'} *************************************************************************** Crash traceback: --------------------------------------------------------------------------- TypeError Python 2.4.3: C:\Python24\python.exe Fri Jan 09 10:50:29 2009 A problem occured executing Python code. Here is the sequence of function calls leading up to the error, with the most recent (innermost) call last. c:\python24\scripts\ipython.py 1 2 3 4 5 6 #!/usr/bin/env python 7 # -*- coding: utf-8 -*- 8 """IPython -- An enhanced Interactive Python 9 10 The actual ipython script to be installed with 'python setup.py install' is ---> 11 in './scripts' directory. This file is here (ipython source root directory) IPython.Shell.start.mainloop = undefined 12 to facilitate non-root 'zero-installation' (just copy the source tree 13 somewhere and run ipython.py) and development. """ 14 15 import IPython.Shell 16 IPython.Shell.start().mainloop() 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 c:\python\external\ipython\IPython\Shell.pyc in start(user_ns=None) 1229 th_mode = special_opts.pop() 1230 except KeyError: 1231 th_mode = 'tkthread' 1232 return th_shell[th_mode] 1233 1234 1235 # This is the one which should be called by external code. 1236 def start(user_ns = None): 1237 """Return a running shell instance, dealing with threading options. 1238 1239 This is a factory function which will instantiate the proper IPython shell 1240 based on the user's threading choice. Such a selector is needed because 1241 different GUI toolkits require different thread handling details.""" 1242 1243 shell = _select_shell(sys.argv) -> 1244 return shell(user_ns = user_ns) 1245 1246 # Some aliases for backwards compatibility 1247 IPythonShell = IPShell 1248 IPythonShellEmbed = IPShellEmbed 1249 #************************ End of file *************************** 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 c:\python\external\ipython\IPython\Shell.pyc in __init__(self=, argv=None, user_ns=None, user_global_ns=None, debug=1) 1094 ip = IPython.ipapi.get() 1095 if ip.options.pylab_import_all: 1096 ip.ex("from matplotlib.pylab import *") 1097 ip.IP.user_config_ns.update(ip.user_ns) 1098 1099 1100 class IPShellMatplotlib(IPShell): 1101 """Subclass IPShell with MatplotlibShell as the internal shell. 1102 1103 Single-threaded class, meant for the Tk* and FLTK* backends. 1104 1105 Having this on a separate class simplifies the external driver code.""" 1106 1107 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1): 1108 IPShell.__init__(self,argv,user_ns,user_global_ns,debug, -> 1109 shell_class=MatplotlibShell) 1110 _load_pylab(self.IP.user_ns) 1111 1112 class IPShellMatplotlibGTK(IPShellGTK): 1113 """Subclass IPShellGTK with MatplotlibMTShell as the internal shell. 1114 1115 Multi-threaded class, meant for the GTK* backends.""" 1116 1117 def __init__(self,argv=None,user_ns=None,user_global_ns=None,debug=1): 1118 IPShellGTK.__init__(self,argv,user_ns,user_global_ns,debug, 1119 shell_class=MatplotlibMTShell) 1120 _load_pylab(self.IP.user_ns) 1121 1122 class IPShellMatplotlibWX(IPShellWX): 1123 """Subclass IPShellWX with MatplotlibMTShell as the internal shell. 1124 c:\python\external\ipython\IPython\Shell.pyc in __init__(self=, argv=None, user_ns=None, user_global_ns=None, debug=1, shell_class=) 63 # Default timeout for waiting for multithreaded shells (in seconds) 64 GUI_TIMEOUT = 10 65 66 #----------------------------------------------------------------------------- 67 # This class is trivial now, but I want to have it in to publish a clean 68 # interface. Later when the internals are reorganized, code that uses this 69 # shouldn't have to change. 70 71 class IPShell: 72 """Create an IPython instance.""" 73 74 def __init__(self,argv=None,user_ns=None,user_global_ns=None, 75 debug=1,shell_class=InteractiveShell): 76 self.IP = make_IPython(argv,user_ns=user_ns, 77 user_global_ns=user_global_ns, ---> 78 debug=debug,shell_class=shell_class) global For = undefined global more = undefined global details = undefined global see = undefined global the = undefined global __call__ = undefined global method = undefined global below. = undefined 79 80 def mainloop(self,sys_exit=0,banner=None): 81 self.IP.mainloop(banner) 82 if sys_exit: 83 sys.exit() 84 85 #----------------------------------------------------------------------------- 86 def kill_embedded(self,parameter_s=''): 87 """%kill_embedded : deactivate for good the current embedded IPython. 88 89 This function (after asking for confirmation) sets an internal flag so that 90 an embedded IPython will never activate again. This is useful to 91 permanently disable a shell that is being called inside a loop: once you've 92 figured out what you needed from it, you may then kill it and the program 93 will then continue to run without the interactive shell interfering again. c:\python\external\ipython\IPython\ipmaker.pyc in make_IPython(argv=[r'c:\python24\scripts\ipython.py', '-pylab'], user_ns=None, user_global_ns=None, debug=1, rc_override=None, shell_class=, embedded=False, **kw={}) 765 IP_rc.banner = 0 766 if IP_rc.banner: 767 BANN_P = IP.BANNER_PARTS 768 else: 769 BANN_P = [] 770 771 if IP_rc.profile: BANN_P.append('IPython profile: %s\n' % IP_rc.profile) 772 773 # add message log (possibly empty) 774 if msg.summary: BANN_P.append(msg.summary) 775 # Final banner is a string 776 IP.BANNER = '\n'.join(BANN_P) 777 778 # Finalize the IPython instance. This assumes the rc structure is fully 779 # in place. --> 780 IP.post_config_initialization() 781 782 return IP 783 #************************ end of file ************************** 784 785 786 787 788 789 790 791 792 793 794 795 c:\python\external\ipython\IPython\iplib.pyc in post_config_initialization(self=) 649 This is called after the configuration files have been processed to 650 'finalize' the initialization.""" 651 652 rc = self.rc 653 654 # Object inspector 655 self.inspector = OInspect.Inspector(OInspect.InspectColors, 656 PyColorize.ANSICodeColors, 657 'NoColor', 658 rc.object_info_string_level) 659 660 self.rl_next_input = None 661 self.rl_do_indent = False 662 # Load readline proper 663 if rc.readline: --> 664 self.init_readline() global to = undefined global be = undefined global true = undefined global IPython = global errors. = undefined 665 666 667 # local shortcut, this is used a LOT 668 self.log = self.logger.log 669 670 # Initialize cache, set in/out prompts and printing system 671 self.outputcache = CachedOutput(self, 672 rc.cache_size, 673 rc.pprint, 674 input_sep = rc.separate_in, 675 output_sep = rc.separate_out, 676 output_sep2 = rc.separate_out2, 677 ps1 = rc.prompt_in1, 678 ps2 = rc.prompt_in2, 679 ps_out = rc.prompt_out, c:\python\external\ipython\IPython\iplib.pyc in init_readline(self=) 1364 # save this in sys so embedded copies can restore it properly 1365 sys.ipcompleter = self.Completer.complete 1366 self.set_completer() 1367 1368 # Configure readline according to user's prefs 1369 # This is only done if GNU readline is being used. If libedit 1370 # is being used (as on Leopard) the readline config is 1371 # not run as the syntax for libedit is different. 1372 if not readline.uses_libedit: 1373 for rlcommand in self.rc.readline_parse_and_bind: 1374 readline.parse_and_bind(rlcommand) 1375 1376 # remove some chars from the delimiters list 1377 delims = readline.get_completer_delims() 1378 delims = delims.translate(string._idmap, -> 1379 self.rc.readline_remove_delims) 1380 readline.set_completer_delims(delims) 1381 # otherwise we end up with a monster history after a while: 1382 readline.set_history_length(1000) 1383 try: 1384 #print '*** Reading readline history' # dbg 1385 readline.read_history_file(self.histfile) 1386 except IOError: 1387 pass # It doesn't exist yet. 1388 1389 atexit.register(self.atexit_operations) 1390 del atexit 1391 1392 # Configure auto-indent for all platforms 1393 self.set_autoindent(self.rc.autoindent) 1394 TypeError: translate() takes exactly one argument (2 given) *************************************************************************** History of session input: *** Last line of input (may not be in above history):