This Engineering Notebook post discusses integrating Leo with IPython. 
Similar remarks apply to Jupyter and SageMath.

To summarize: *thought experiments doom all such projects.*

*Bypass IPython's event loop?*

Suppose Leo avoids creating IPython's event loop. Doing so would avoid 
hanging Leo when accessing IPython's features. This idea implies bypassing 
IPython's repl.

*Bypass IPython's repl?*

Suppose Leo provides IPython's features by accessing them via IPython's 
API. However, experiments (and a review of IPython's code) show that 
IPython's features require IPython's repl!

Indeed, IPython's *BaseIPythonApplication *class contains this description:

    "IPython: an enhanced interactive Python shell."

*Create a bespoke client-server architecture?*

Suppose Leo accesses IPython's features by accessing a running instance of 
IPython via a client-server architecture. Leo would be the client. It would 
be straightforward to start this server when IPython starts.

But what, exactly, would Leo ask IPython to do? And why would anyone care? 
There seems to be no answers to this question!

*Conclusion*

The thought experiments presented here suggest that Leo gains nothing by 
attempting to work closely with IPython. There are no scenarios in which 
Leo gains from accessing IPython's features from within Leo.

This surprising conclusion is good news. It's always good to abandon 
mistaken ideas!

After clearing our heads, we can see that this conclusion makes sense. Leo 
needs no help from IPython and vice versa. Why did we ever think otherwise?

*Summary*

Leo's IPython integration does not work and probably has not worked for 
years. Yet nobody seems to have noticed!

Integrating Leo and IPython presents insurmountable problems. All attempts 
would likely be complex and fragile, as indeed leoIPython.py has proven to 
be.

Leo gains nothing by attempting to work closely with IPython. All recent 
comments from Leonistas support this conclusion.

Unless I hear convincing counter-arguments, a new PR (scheduled for 6.8.2) 
will remove leoIPython.py and Leo's valuespace plugin. There will be no 
need to add IPython or Jupyter to Leo's requirements.

All your comments and questions are welcome. There is plenty of time for 
further discussion.

Edward 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/be57173b-9383-4e18-86e4-89f3de6ae303n%40googlegroups.com.

Reply via email to