##// END OF EJS Templates
Using igrid with wxPyhon 2.6 and -wthread should work now....
Using igrid with wxPyhon 2.6 and -wthread should work now. igrid.display() simply tries to create a frame without an application. Only if this fails an application is created.

File last commit:

r568:b134c8fa
r574:fd8c3c21
Show More
ipy_gnuglobal.py
38 lines | 927 B | text/x-python | PythonLexer
vivainio
ipy_gnuglobal provides %global magic and completer for users of GNU Global TAGS system
r567 #!/usr/bin/env python
"""
Add %global magic for GNU Global usage.
http://www.gnu.org/software/global/
"""
import IPython.ipapi
ip = IPython.ipapi.get()
import os
# alter to your liking
global_bin = 'd:/opt/global/bin/global'
def global_f(self,cmdline):
simple = 0
if '-' not in cmdline:
cmdline = '-rx ' + cmdline
simple = 1
vivainio
%global eat unnecessary newline
r568 lines = [l.rstrip() for l in os.popen( global_bin + ' ' + cmdline ).readlines()]
vivainio
ipy_gnuglobal provides %global magic and completer for users of GNU Global TAGS system
r567 if simple:
parts = [l.split(None,3) for l in lines]
lines = ['%s [%s]\n%s' % (p[2].rjust(70),p[1],p[3].rstrip()) for p in parts]
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')