The prototype below can be run from within Leo itself. It creates a 
partially working pyzo "Shell" window.  It's incomplete, but useful.

'''Run the pyzo "Shell" window inside Leo'''
g.cls()
#
# The import shim.
import pyzo
from leo.core.leoQt import QtWidgets
from pyzo.core.shellStack import ShellStackWidget
from pyzo.core.main import callLater, loadIcons, loadAppIcons
from pyzo.core import menu
d = g.app.permanentScriptDict
#
# Instantiate the Shell window. From MainWindow._populate
mw = QtWidgets.QMainWindow()
pyzo.main = mw # From MainWindow.__init__
#
# From MainWindow._populate.  
loadIcons()
loadAppIcons()
#
# Prepare to create the window.
pyzo.editors = g.NullObject()
pyzo.command_history = g.NullObject()
pyzo.toolManager = g.NullObject()
pyzo.keyMapper = menu.KeyMapper()
#
# Create the window and show it.
pyzo.shells = w = ShellStackWidget(parent=mw)
w._debugActions = [g.NullObject()]
w.menu = g.NullObject()
w._shellButton.menu = g.NullObject()
callLater(w.addShell)
mw.show()
w.show()

*Discussion*

This incomplete prototype is a major step forward. Each use of g.NullObject 
marks an incomplete part of the init logic.  Next, I'll find where (and 
when!) pyzo actually inits these vars. A finished prototype will call pyzo 
methods/functions init all these vars, and potentially others.  It will 
happen soon.

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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to