branch : pmacs2
This commit is contained in:
moculus 2008-05-27 22:11:55 +00:00
parent b38628d474
commit a2b8913d04
1 changed files with 10 additions and 16 deletions

View File

@ -424,16 +424,16 @@ class IperlBuffer(Buffer):
return True
class IperlBuffer2(Buffer):
def get_ipython_name(parent):
def get_iperl_name(parent):
if hasattr(parent, 'path'):
return '*IPython:%s*' % parent.name()
return '*IPerl:%s*' % parent.name()
else:
return '*IPython*'
get_ipython_name = classmethod(get_ipython_name)
btype = 'ipython'
modename = 'ipython'
return '*IPerl*'
get_iperl_name = classmethod(get_iperl_name)
btype = 'iperl'
modename = 'iperl'
readre = re.compile('^([A-Z]+):(.*)\n$')
_name = '*IPython*'
_name = '*IPerl*'
def __init__(self, parent):
if hasattr(parent, 'path'):
self.parent = parent
@ -445,14 +445,14 @@ class IperlBuffer2(Buffer):
self.prompt = '***'
self.clear()
self.pipe_read()
self._name = get_ipython_name(parent)
self._name = get_iperl_name(parent)
def name(self):
return self._name
def get_cmd(self):
if self.parent:
return ('epython', '-p', self.parent.path)
return ('iperl', '-p', self.parent.path)
else:
return ('epython',)
return ('iperl',)
def pipe_readline(self):
line = self.pipe.stdout.readline()
m = self.readre.match(line)
@ -487,9 +487,6 @@ class IperlBuffer2(Buffer):
self.set_data('', force=True)
def changed(self):
return False
def close(self):
global ipython
ipython = None
def readonly(self):
return True
@ -557,9 +554,6 @@ class IpythonBuffer(Buffer):
self.set_data('', force=True)
def changed(self):
return False
def close(self):
global ipython
ipython = None
def readonly(self):
return True