[IPython-user] IPython looks great *but*....
Michael Foord
mike at pcblokes.com
Fri Apr 23 16:36:37 CDT 2004
IPython looks great - in fact it looks like it could be something I've been
looking for for a long time - a repalcement shell for windoze with the power of
python.
Unfortunately it doesn't seem to work on my XP windoze box. (python 2.3.3).
I eventually discovered the IPython crash report (when run, IPython just flickers up
and then vanishes).
I'm posting the crash report in the help that someone may be able to see the
cause of the problem (an attribute error - would seem to be pretty fundamental...) :
***************************************************************************
IPython post-mortem report
IPython version: 0.5.0
Platform info : os.name -> nt, sys.platform -> win32
***************************************************************************
Current user configuration structure:
{'Version': 0,
'alias': [],
'args': [],
'autocall': 1,
'autoindent': 0,
'automagic': 1,
'banner': 1,
'c': '',
'cache_size': 1000,
'classic': 0,
'color_info': 1,
'colors': 'NoColor',
'confirm_exit': 1,
'debug': 0,
'deep_reload': 0,
'editor': '0',
'execfile': [],
'execute': [],
'help': 0,
'ignore': 0,
'import_all': [],
'import_mod': [],
'import_some': [[]],
'include': [],
'ipythondir': 'C:\\Documents and Settings\\Voidspace\\.ipython',
'log': 0,
'logfile': '',
'logplay': '',
'magic_docstrings': 0,
'messages': 1,
'nosep': 0,
'opts': Struct({}),
'pdb': 0,
'pprint': 1,
'profile': '',
'prompt_in1': 'In [%n]:',
'prompt_in2': ' .%n.:',
'prompt_out': 'Out[%n]:',
'quick': 0,
'rcfile': 'ipythonrc.ini',
'readline': 1,
'readline_omit__names': 0,
'readline_parse_and_bind': ['tab: complete',
'"\\C-l": possible-completions',
'set show-all-if-ambiguous on',
'"\\C-o": tab-insert',
'"\\M-i": " "',
'"\\M-o": "\\d\\d\\d\\d"',
'"\\M-I": "\\d\\d\\d\\d"',
'"\\C-r": reverse-search-history',
'"\\C-s": forward-search-history',
'"\\C-p": history-search-backward',
'"\\C-n": history-search-forward'],
'readline_remove_delims': '\'"[]{}-/~',
'screen_length': 0,
'separate_in': '\\n',
'separate_out': '0',
'separate_out2': '0',
'upgrade': 0,
'xmode': 'Context'}
***************************************************************************
Crash traceback:
---------------------------------------------------------------------------
AttributeError Python 2.3.3: C:\Python23\python.exe
Thu Apr 22 23:05:50 2004
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:\Program Files\IPython\IPython_shell.py
-3 """
-2
-1 import IPython
0 IPython.Shell.IPShell().mainloop()
C:\Python23\Lib\site-packages\IPython\Shell.py in __init__(self=<IPython.Shell.IPShell instance at 0x009F1CD8>, argv=[r'C:\Program Files\IPython\IPython_shell.py'], user_ns=None, debug=0)
26 from ipmaker import make_IPython
27 from genutils import qw
28 import ultraTB
29
30 #-----------------------------------------------------------------------------
31 # This class is trivial now, but I want to have it in to publish a clean
32 # interface. Later when the internals are reorganized, code that uses this
33 # shouldn't have to change.
34
35 class IPShell:
36 """Create an IPython instance."""
37
38 def __init__(self,argv=None,user_ns=None,debug=0):
39 if argv is None:
40 argv = sys.argv
---> 41 self.IP = make_IPython(argv,user_ns=user_ns,debug=debug)
self = <IPython.Shell.IPShell instance at 0x009F1CD8>, global IP = undefined, global make_IPython = <function make_IPython at 0x00A06F70>, argv = [r'C:\Program Files\IPython\IPython_shell.py'], user_ns = None, debug = 0
42
43 def mainloop(self,sys_exit=0):
44 self.IP.mainloop()
45 if sys_exit:
46 sys.exit()
47
48 # alias for backwards compatibility
49 IPythonShell = IPShell
50
51 #-----------------------------------------------------------------------------
52 class IPShellEmbed:
53 """Allow embedding an IPython shell into a running program.
54
55 Instances of this class are callable, with the __call__ method being an
56 alias to the embed() method of an InteractiveShell instance.
C:\Python23\Lib\site-packages\IPython\ipmaker.py in make_IPython(argv=[r'C:\Program Files\IPython\IPython_shell.py'], user_ns=None, debug=0, rc_override=None)
476 # wouldn't worry about this stuff!
477
478 if IP.rc.classic:
479 IP.rc.quick = 1
480 IP.rc.cache_size = 0
481 IP.rc.pprint = 0
482 IP.rc.prompt_in1 = '>>> '
483 IP.rc.prompt_in2 = '... '
484 IP.rc.prompt_out = ''
485 IP.rc.separate_in = IP.rc.separate_out = IP.rc.separate_out2 = '0'
486 IP.rc.colors = 'NoColor'
487 IP.rc.xmode = 'Plain'
488
489 # configure readline
490 if IP.rc.readline:
--> 491 IP.init_readline()
IP = <IPython.iplib.InteractiveShell instance at 0x00A01198>, global init_readline = undefined
492
493 # update exception handlers with rc file status
494 otrap.trap_out() # I don't want these messages ever.
495 IP.magic_xmode(IP.rc.xmode)
496 otrap.release_out()
497
498 # activate logging if requested and not reloading a log
499 if IP.rc.logplay:
500 IP.magic_logstart(IP.rc.logplay + ' append')
501 elif IP.rc.logfile:
502 IP.magic_logstart(IP.rc.logfile)
503 elif IP.rc.log:
504 IP.magic_logstart()
505
506 # find user editor so that it we don't have to look it up constantly
C:\Python23\Lib\site-packages\IPython\iplib.py in init_readline(self=<IPython.iplib.InteractiveShell instance at 0x00A01198>)
588 #print '*** Reading readline history' # dbg
589 readline.read_history_file(self.histfile)
590 except IOError:
591 pass # It doesn't exist yet.
592
593 atexit.register(self.savehist)
594 del atexit
595
596 except ImportError,msg:
597 self.has_readline = 0
598 # no point in bugging windows users with this every time:
599 if os.name == 'posix':
600 warn('Readline services not available on this platform.')
601
602 except KeyError:
--> 603 pass # under windows, no environ['term'] key
604
605 # Configure auto-indent for all platforms
606 self.set_autoindent(self.rc.autoindent)
607
608 def showsyntaxerror(self, filename=None):
609 """Display the syntax error that just occurred.
610
611 This doesn't display a stack trace because there isn't one.
612
613 If a filename is given, it is stuffed in the exception instead
614 of what was there before (because Python's parser always uses
615 "<string>" when reading from a string).
616 """
617 type, value, sys.last_traceback = sys.exc_info()
618 sys.last_type = type
C:\Python23\Lib\site-packages\IPython\iplib.py in __init__(self=<IPython.iplib.MagicCompleter instance at 0x00A6A580>, namespace={'In': ['\n'], 'Out': {}, '__IP': <IPython.iplib.InteractiveShell instance at 0x00A01198>, '__builtins__': <module '__builtin__' (built-in)>, '__name__': '__main__', '_dh': [r'C:\Program Files\IPython'], '_ih': ['\n'], '_oh': {}, 'help': Type help() for interactive help, or help(object) for help about object.}, omit__names=0)
86
87 class MagicCompleter(FlexCompleter.Completer):
88 """Extension of the completer class to work on @-prefixed lines."""
89
90 def __init__(self, namespace = None, omit__names = 0):
91 """MagicCompleter(namespace = None, omit__names = 0) -> completer
92
93 Return a completer object suitable for use by the readline library
94 via readline.set_completer().
95
96 The optional omit__names parameter sets the completer to omit the
97 'magic' names (__magicname__) for python objects unless the text
98 to be completed explicitly starts with one or more underscores."""
99
100 FlexCompleter.Completer.__init__(self,namespace)
--> 101 delims = FlexCompleter.readline.get_completer_delims()
delims = undefined, global FlexCompleter = <module 'IPython.FlexCompleter' from 'C:\Python23\Lib\site-packages\IPython\FlexCompleter.pyc'>, global readline = undefined, global get_completer_delims = undefined
102 delims = delims.replace('@','')
103 FlexCompleter.readline.set_completer_delims(delims)
104 self.omit__names = omit__names
105
106 # Code contributed by Alex Schmolck, for ipython/emacs integration
107 def all_completions(self, text):
108 """Return all possible completions for the benefit of emacs."""
109
110 completions = []
111 try:
112 for i in xrange(sys.maxint):
113 res = self.complete(text, i)
114
115 if not res: break
116
AttributeError: 'module' object has no attribute 'get_completer_delims'
***************************************************************************
History of session input:
*** Last line of input (may not be in above history):
Regards,
Fuzzy
http://www.voidspace.org.uk/atlantibots/pythonutils.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/ipython-user/attachments/20040423/ef561b25/attachment.html
More information about the IPython-user
mailing list