home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- import IPython.ipapi as IPython
- ip = IPython.ipapi.get()
- import os
- import sys
- from IPython.genutils import *
-
- def magic_rehash(self, parameter_s = ''):
- path = filter(os.path.isdir, os.environ.get('PATH', '').split(os.pathsep))
- alias_table = self.shell.alias_table
- for pdir in path:
- for ff in os.listdir(pdir):
- alias_table[ff] = (0, ff)
-
-
- self.shell.alias_table_validate()
- self.shell.init_auto_alias()
-
- ip.expose_magic('rehash', magic_rehash)
-
- def magic_Quit(self, parameter_s = ''):
- self.shell.ask_exit()
-
- ip.expose_magic('Quit', magic_Quit)
-
- def magic_p(self, parameter_s = ''):
- exec 'print ' + parameter_s in self.shell.user_ns
-
- ip.expose_magic('p', magic_p)
-