Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /leo/plugins/ipython.py

leo
Discussion topic

Back to topic list

CVS update: /leo/plugins/ipython.py

Author vivainio
Full name Ville M. Vainio
Date 2008-02-14 08:08:08 PST
Message User: vivainio
Date: 2008-02-14 08:08:08-0800
Log:
 ipython bridge more simplification

File Changes:

Directory: /leo/plugins/
========================

File [changed]: ipython.py
Url: http://leo.tigris.or​g/source/browse/leo/​plugins/ipython.py?r​1=1.12&r2=1.13
Delta lines: +4 -11
--------------------
--- ipython.py 2008-02-14 07:54:49-0800 1.12
+++ ipython.py 2008-02-14 08:08:06-0800 1.13
@@ -66,9 +66,6 @@
 # an idle-time handler.
 #
 # If it is possible several more settings would be possible.
-#
-# - Allow get-ipython-results to store actual objects using Leo's uA
-# mechanism.
 #@-at
 #@nonl
 #@-node:ekr.20080203​092534:<< to do >>
@@ -150,10 +147,7 @@
 
         self.c = c
 
- self.leoxName = c.config.getString('​ipython-interface-ob​ject-name') or 'leox'
-
         # Set by .startIPython...
- self.api = None
         self.ip = None # The _ip var returned by ipshell.IP.getapi()
 
         self.createCommands()
@@ -190,13 +184,13 @@
             c = self.c
             #self.ipshell = IPShellEmbed() # Create object to be bound to .api.
 
- self.api = api = IPython.ipapi
+ api = IPython.ipapi
             self.message('creating IPython shell...')
             gIPythonStarted = True # Do this *before* calling ipshell.
             leox = leoInterface(c,g) # inject leox into the namespace.
- my_ns = { self.leoxName:leox }
- ses = self.api.make_session(my_ns)
- self.ip = ip = ses.IP.getapi()
+ my_ns = { 'leox': leox }
+ ses = api.make_session(my_ns)
+ self.ip = ses.IP.getapi()
             try:
                 self.ip.ex('import ipy_leo')
             except ImportError:
@@ -247,7 +241,6 @@
             except AttributeError:
                 # ipython has not defined 'push' (old version?). Just execute the node
                 self.error("Your IPython version is obsolete, please upgrade!")
- pass
 
             # The rest of this is probably never executed with up-to-date IPython
             # Get the script.

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /leo/plugins/ipython.py vivainio Ville M. Vainio 2008-02-14 08:08:08 PST
Messages per page: