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
- global_bin = 'd:/opt/global/bin/global'
-
- def global_f(self, cmdline):
- simple = 0
- if '-' not in cmdline:
- cmdline = '-rx ' + cmdline
- simple = 1
-
- lines = [ l.rstrip() for l in os.popen(global_bin + ' ' + cmdline).readlines() ]
- print '\n'.join(lines)
-
- ip.expose_magic('global', global_f)
-
- def global_completer(self, event):
- compl = [ l.rstrip() for l in os.popen(global_bin + ' -c ' + event.symbol).readlines() ]
- return compl
-
- ip.set_hook('complete_command', global_completer, str_key = '%global')
-