***************************************************************************

IPython post-mortem report

IPython version: 0.8.4 

SVN revision   : 128 

Platform info  : os.name -> posix, sys.platform -> linux2

***************************************************************************

Current user configuration structure:

{'__allownew': True, 'args': None, 'opts': None}

***************************************************************************

Crash traceback:

---------------------------------------------------------------------------
KeyboardInterrupt                             Python 2.5.2: /usr/bin/python
                                                   Mon Feb 15 09:31:57 2010
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.

/usr/bin/ipython in <module>()
     12 IPython.Shell.IPShell().mainloop(sys_exit=1)
     13 
     14 [or simply IPython.Shell.IPShell().mainloop(1) ]
     15 
     16 and IPython will be your working environment when you start python. The final
     17 sys.exit() call will make python exit transparently when IPython finishes, so
     18 you don't have an extra prompt to get out of.
     19 
     20 This is probably useful to developers who manage multiple Python versions and
     21 don't want to have correspondingly multiple IPython versions. Note that in
     22 this mode, there is no way to pass IPython any command-line options, as those
     23 are trapped first by Python itself.
     24 """
     25 
     26 import IPython.Shell
---> 27 IPython.Shell.start().mainloop()
        global IPython.Shell.start.mainloop = undefined
     28 
     29 
     30 
     31 
     32 
     33 
     34 
     35 
     36 
     37 
     38 
     39 
     40 
     41 
     42 

/var/lib/python-support/python2.5/IPython/Shell.pyc in start(user_ns=None)
   1205             th_mode = special_opts.pop()
   1206         except KeyError:
   1207             th_mode = 'tkthread'
   1208         return th_shell[th_mode]
   1209 
   1210 
   1211 # This is the one which should be called by external code.
   1212 def start(user_ns = None):
   1213     """Return a running shell instance, dealing with threading options.
   1214 
   1215     This is a factory function which will instantiate the proper IPython shell
   1216     based on the user's threading choice.  Such a selector is needed because
   1217     different GUI toolkits require different thread handling details."""
   1218 
   1219     shell = _select_shell(sys.argv)
-> 1220     return shell(user_ns = user_ns)
   1221 
   1222 # Some aliases for backwards compatibility
   1223 IPythonShell = IPShell
   1224 IPythonShellEmbed = IPShellEmbed
   1225 #************************ End of file <Shell.py> ***************************
   1226 
   1227 
   1228 
   1229 
   1230 
   1231 
   1232 
   1233 
   1234 
   1235 

/var/lib/python-support/python2.5/IPython/Shell.pyc in __init__(self=<IPython.Shell.IPShell instance at 0x7fd3a8c24998>, argv=None, user_ns=None, user_global_ns=None, debug=1, shell_class=<class 'IPython.iplib.InteractiveShell'>)
     66 # Tag when runcode() is active, for exception handling
     67 CODE_RUN = None
     68 
     69 #-----------------------------------------------------------------------------
     70 # This class is trivial now, but I want to have it in to publish a clean
     71 # interface. Later when the internals are reorganized, code that uses this
     72 # shouldn't have to change.
     73 
     74 class IPShell:
     75     """Create an IPython instance."""
     76     
     77     def __init__(self,argv=None,user_ns=None,user_global_ns=None,
     78                  debug=1,shell_class=InteractiveShell):
     79         self.IP = make_IPython(argv,user_ns=user_ns,
     80                                user_global_ns=user_global_ns,
---> 81                                debug=debug,shell_class=shell_class)
        global This = undefined
        global functionality = undefined
        global was = undefined
        global inspired = undefined
        global by = undefined
        global a = undefined
        global posting = undefined
        global on = undefined
        global comp.lang.python = undefined
        global cmkl = undefined
     82 
     83     def mainloop(self,sys_exit=0,banner=None):
     84         self.IP.mainloop(banner)
     85         if sys_exit:
     86             sys.exit()
     87 
     88 #-----------------------------------------------------------------------------
     89 def kill_embedded(self,parameter_s=''):
     90     """%kill_embedded : deactivate for good the current embedded IPython.
     91 
     92     This function (after asking for confirmation) sets an internal flag so that
     93     an embedded IPython will never activate again.  This is useful to
     94     permanently disable a shell that is being called inside a loop: once you've
     95     figured out what you needed from it, you may then kill it and the program
     96     will then continue to run without the interactive shell interfering again.

/var/lib/python-support/python2.5/IPython/ipmaker.pyc in make_IPython(argv=['/usr/bin/ipython'], user_ns=None, user_global_ns=None, debug=1, rc_override=None, shell_class=<class 'IPython.iplib.InteractiveShell'>, embedded=False, **kw={})
    420                                         msg_err,msg_sep,debug),
    421                  logplay   = OutputTrap('Log Loader',msg_out,
    422                                         msg_err,msg_sep,debug),
    423                  summary = ''
    424                  )
    425 
    426     #-------------------------------------------------------------------------
    427     # Process user ipythonrc-type configuration files
    428 
    429     # turn on output trapping and log to msg.config
    430     # remember that with debug on, trapping is actually disabled
    431     msg.config.trap_all()
    432 
    433     # look for rcfile in current or default directory
    434     try:
--> 435         opts_all.rcfile = filefind(opts_all.rcfile,opts_all.ipythondir)
    436     except IOError:
    437         if opts_all.debug:  IP.InteractiveTB()
    438         warn('Configuration file %s not found. Ignoring request.'
    439              % (opts_all.rcfile) )
    440 
    441     # 'profiles' are a shorthand notation for config filenames
    442     profile_handled_by_legacy = False
    443     if opts_all.profile:
    444             
    445         try:
    446             opts_all.rcfile = filefind('ipythonrc-' + opts_all.profile
    447                                        + rc_suffix,
    448                                        opts_all.ipythondir)
    449             profile_handled_by_legacy = True
    450         except IOError:

/var/lib/python-support/python2.5/IPython/genutils.pyc in filefind(fname='ipythonrc', alt_dirs='/home/andre/.ipython')
    540     exists, or in a specified list of directories.
    541 
    542     ~ expansion is done on all file and directory names.
    543 
    544     Upon an unsuccessful search, raise an IOError exception."""
    545 
    546     if alt_dirs is None:
    547         try:
    548             alt_dirs = get_home_dir()
    549         except HomeDirError:
    550             alt_dirs = os.getcwd()
    551     search = [fname] + list_strings(alt_dirs)
    552     search = map(os.path.expanduser,search)
    553     #print 'search list for',fname,'list:',search  # dbg
    554     fname = search[0]
--> 555     if os.path.isfile(fname):
        global If = undefined
        global default = undefined
        global given = undefined
        global one = undefined
        global of = undefined
        global it = undefined
        global used = undefined
        global the = undefined
        global user = undefined
        global input = undefined
    556         return fname
    557     for direc in search[1:]:
    558         testname = os.path.join(direc,fname)
    559         #print 'testname',testname  # dbg
    560         if os.path.isfile(testname):
    561             return testname
    562     raise IOError,'File' + `fname` + \
    563           ' not found in current or supplied directories:' + `alt_dirs`
    564 
    565 #----------------------------------------------------------------------------
    566 def file_read(filename):
    567     """Read a file and close it.  Returns the file source."""
    568     fobj = open(filename,'r');
    569     source = fobj.read();
    570     fobj.close()

/usr/lib/python2.5/posixpath.pyc in isfile(path='ipythonrc')
    193     """Test whether a path is a directory"""
    194     try:
    195         st = os.stat(path)
    196     except os.error:
    197         return False
    198     return stat.S_ISDIR(st.st_mode)
    199 
    200 
    201 # Is a path a regular file?
    202 # This follows symbolic links, so both islink() and isfile() can be true
    203 # for the same path.
    204 
    205 def isfile(path):
    206     """Test whether a path is a regular file"""
    207     try:
--> 208         st = os.stat(path)
    209     except os.error:
    210         return False
    211     return stat.S_ISREG(st.st_mode)
    212 
    213 
    214 # Are two filenames really pointing to the same file?
    215 
    216 def samefile(f1, f2):
    217     """Test whether two pathnames reference the same actual file"""
    218     s1 = os.stat(f1)
    219     s2 = os.stat(f2)
    220     return samestat(s1, s2)
    221 
    222 
    223 # Are two open files really referencing the same file?

KeyboardInterrupt: 

***************************************************************************

History of session input:

*** Last line of input (may not be in above history):
