home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- import os
- import sys
- import ipy_rehashdir
- import glob
- from ipy_rehashdir import selflaunch, PyLauncher
-
- def pylaunchers():
- fs = glob.glob('*.py') + glob.glob('*.ipy')
- for f in fs:
- l = PyLauncher(f)
- n = os.path.splitext(f)[0]
- ip.defalias(n, l)
- ip.magic('store ' + n)
-
-
-
- def exta_imports():
- import distutils.dir_util as distutils
-
-
- def kitroot():
- return os.environ.get('IPYKITROOT', None)
-
-
- def main():
- if not kitroot():
- print "Can't configure ipykit, IPYKITROOT should be set."
- return None
- os.environ['PATH'] = os.environ['PATH'] + ';' + kitroot() + '\\bin;'
- ip.to_user_ns('pylaunchers')
- cmds = ip.db.get('syscmdlist', None)
- if cmds is None:
- ip.magic('rehashx')
- cmds = ip.db.get('syscmdlist', [])
-
- if 'sc1' in cmds:
- print 'Default editor: Sc1'
- import ipy_editors
- ipy_editors.scite('sc1')
-
- import ipy_fsops
-
- greeting = '\n\n === Welcome to ipykit ===\n\n%quickref - learn quickly about IPython.\n\n'
-
- def ipython_firstrun(ip):
- print 'First run of ipykit - configuring'
- ip.defalias('py', selflaunch)
- ip.defalias('d', 'dir /w /og /on')
- ip.magic('store py')
- ip.magic('store d')
- bins = kitroot() + '/bin'
- print greeting
-
-
- def init_ipython(ipy):
- global ip
- ip = ipy
- main()
-
-