The leo_in_pyzo plugin is ready for testing!

90 views
Skip to first unread message

Edward K. Ream

unread,
Aug 28, 2019, 11:20:17 AM8/28/19
to leo-editor
As of rev a0c34f4 in the pyzo branch...

The pyzo_in_leo.py plugin requires --global-docks and the qt gui, which is Leo's default.  It is incompatible with --no-dock.

Pretty much everything "just works".  The plugin properly loads all pyzo docks in Leo's main window only once, at "start2 time".  You should see an Outlines dock, containing one tab per opened .leo file.  You should also see all of Pyzo's docks.

You can close any pyzo dock or relocate any pyzo dock within the top-level window only.  Leo will remember the configuration. The next time you reload Leo you will see the pyzo docks as they were.

The pyzo docks are completely independent of Leo.  In essence, pyzo is a guest within Leo.  Pyzo itself knows nothing about Leo.  Leo knows just a bit about pyzo, and all such knowledge is confined to the pyzo_in_leo plugin.

Testing

You will not see any of the brightly colored test docks.  I am interested in knowing whether any drawing "artifacts" appear in any dock.  I don't see any, but then I never have...

To do

The plugin doesn't remember the contents of pyzo's Files dock. More generally, the plugins close handler should probably use Leo's configuration code to save any required data.  This will likely be a "project".

Opening a .leo file with pyzo's file browser should open the outline within a new tab in Leo's Outlines dock.

It remains to be seen what other changes will be desirable.

Summary

Another phase of #1093 is complete. Pyzo is now an almost completely functional guest within Leo.

The next phase will be to further integrate pyzo within the Leonine world.

Edward

Chris George

unread,
Aug 28, 2019, 11:58:18 AM8/28/19
to leo-editor
Once a pyzo dock is closed using x or unchecking it, it is gone and cannot be reopened. The "Editors" and "Shells" docks behave correctly ie. they can be opened and closed using the right-click pop-up titlebar method. Restarting Leo restores the docks to the pop-up menu and opening them using the right-click puts them right back where they had been positioned before unchecking them. Unchecking them again causes them to vanish.

I can hardly wait to tie into theming the new objects. :-)

The artifacts still persist.

HTH,

Chris



--
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 leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/a005711e-7256-4f31-ae2b-2f8c425f36da%40googlegroups.com.

Edward K. Ream

unread,
Aug 28, 2019, 2:27:49 PM8/28/19
to leo-editor
On Wed, Aug 28, 2019 at 10:58 AM Chris George <techn...@gmail.com> wrote:

Once a pyzo dock is closed using x or unchecking it, it is gone and cannot be reopened. The "Editors" and "Shells" docks behave correctly ie. they can be opened and closed using the right-click pop-up titlebar method. Restarting Leo restores the docks to the pop-up menu and opening them using the right-click puts them right back where they had been positioned before unchecking them. Unchecking them again causes them to vanish.

Yes, I see this.  Some/all of this may be the result of the most recent work.

Hehe, I saw all this, and more, when showing off my work to Rebecca.  Sure enough, demos always fail.

If you revert to rev 2364cd0d you will see different behavior.  It doesn't suffer the bugs you have reported, but alas, it can't be the basis for future work.  I'll get to the bottom of this next.

I can hardly wait to tie into theming the new objects. :-)

Glad you mentioned this.  The latest work attempted to get rid of c everywhere. That won't work, because we need a commander to get theme settings. The new code will use g.app.commanders()[0]. It is the commander of the first loaded .leo file

The artifacts still persist.

Please send a screenshot.

This might be a gotcha.  Nesting QMainWindows inside other QMainWindows might stress Qt beyond the breaking point on some platforms.

HTH,

It helps a lot.  Please remind me what platform you are using.

Summary

I'm a bit surprised by these newly-reported bugs.  Fixing them should be possible, but I'm not sure how long it will take.

Chris, please send a screen shot showing the "artifact", and remind me what platform you are on.  It's time for me to test on Linux.

Edward

Chris George

unread,
Aug 28, 2019, 5:09:45 PM8/28/19
to leo-editor
Further testing shows that the artifacts only exist transiently but do not persist between sessions.

They seem to be caused by activity that moves, nests, resizes etc. widgets.

Closing Leo and reopening makes them go away and they do not reappear until you move, nest or resize a widget. They appear pretty much wherever you are doing something with the widget.

I suggest opening a Leo file and then moving stuff. Then open another Leo file. It looks like it uses the splitter colour to draw the artifact.




Please send a screenshot.

This might be a gotcha.  Nesting QMainWindows inside other QMainWindows might stress Qt beyond the breaking point on some platforms.

HTH,

It helps a lot.  Please remind me what platform you are using.

Leo 6.1-devel, devel branch, build 05e1e94daf
2019-08-28 02:48:56 -0500
Python 3.6.8, PyQt version 5.12.3
linux

Chris George

unread,
Aug 28, 2019, 5:11:25 PM8/28/19
to leo-editor
Oh,

I forgot to mention that I deleted the cache before testing and this makes pretty much any operation leave the artifact. Closing and opening Leo seems to make it less prevalent.

Chris

Matt Wilkie

unread,
Aug 28, 2019, 6:42:28 PM8/28/19
to leo-editor
It helps a lot.  Please remind me what platform you are using.

Leo 6.1-devel, devel branch, build 05e1e94daf
2019-08-28 02:48:56 -0500
Python 3.6.8, PyQt version 5.12.3
linux


I think he meant also which linux distribution.

-matt

Chris George

unread,
Aug 28, 2019, 6:52:57 PM8/28/19
to leo-editor
Neon which is the official KDE distro. It is built on Ubuntu 18.04.

Chris

Matt Wilkie

unread,
Aug 28, 2019, 7:10:15 PM8/28/19
to leo-editor
The pyzo_in_leo.py plugin requires --global-docks and the qt gui, which is Leo's default.  It is incompatible with --no-dock.

git checkout devel
git pull
leo
# add pyzo_in_leo.py to @enabled-plugins node in myLeoSettings.leo
# save, exit
leo
--global-docks

On load the Outline panel is completely blank. The Body panel contains text of enabled-plugins node. Alt-{arrow-up/down} changes content of Body but Outline remains empty. On switching to a different .leo tab the Outline is normal again. This seems stable throughout the session.

Exiting Leo and restarting with same parameter: Outline is empty again. The position and size of the Leo window sets and changes 3 times during open. I repeated half a dozen times with no change in behaviour.

Now I notice you said to use pyzo branch. Trying again.

Pretty cool! No problems with a blank Outline. It'll take some time to figure out how I would or wouldn't use the Pyzo panels. [Workspace] will definitely be in my favourites list.

I closed [History] and there doesn't seem to be a way to get it back again. It's no in the list when r-clicking on Pyzo panel title. The first time I clicked on a link in [Web browser] the whole interface blocked (spinny circle) while the page loaded. There doesn't seem to be a way to get [Editor] to load Body content, but I imagine this is something on the roadmap already.





Matt Wilkie

unread,
Aug 28, 2019, 7:20:23 PM8/28/19
to leo-editor
I closed [History] and there doesn't seem to be a way to get it back again. It's no in the list when r-clicking on Pyzo panel title.

Ahhh, this seems to true for all of the pyzo panels: after close they are removed from the title context-menu. Exiting and restarting Leo brings them back to the context-menu. Another data point: [Alt] >> Pyzo >> File >> ...:  the Run and Tools sub-menus are identical. (Tools shows Run contents of "Run file as main script" etc. instead of it's own "File browser", "History viewer", etc.).


In the master window frame and Task Bar the Pyzo icon is used instead of Leo's icon. The window title is "python".

Leo 6.1-devel, pyzo branch, build 1300abc3e8
2019-08-28 10:14:18 -0500
Python 3.7.1, PyQt version 5.13.0
Windows 10 AMD64 (build 10.0.17134) SP0

-matt

Edward K. Ream

unread,
Aug 28, 2019, 8:16:54 PM8/28/19
to leo-editor
On Wed, Aug 28, 2019 at 6:20 PM Matt Wilkie <map...@gmail.com> wrote:
I closed [History] and there doesn't seem to be a way to get it back again. It's no in the list when r-clicking on Pyzo panel title.

Ahhh, this seems to true for all of the pyzo panels: after close they are removed from the title context-menu.

Right.  I'm on it.

Edward

Edward K. Ream

unread,
Aug 30, 2019, 9:44:04 AM8/30/19
to leo-editor
On Wed, Aug 28, 2019 at 4:09 PM Chris George <techn...@gmail.com> wrote:
Further testing shows that the artifacts only exist transiently but do not persist between sessions.

Thanks for this.

Edward

Edward K. Ream

unread,
Aug 30, 2019, 9:54:54 AM8/30/19
to leo-editor
On Wed, Aug 28, 2019 at 5:42 PM Matt Wilkie <map...@gmail.com> wrote:

I think he meant also which linux distribution.

That would help.  I do my testing on ubuntu, and I see no problems.

Edward

Chris George

unread,
Aug 30, 2019, 9:59:06 AM8/30/19
to leo-editor
KDE is based on Qt. There may be some interactions there. I will set-up a virtualbox with vanilla Ubuntu and see what happens.

Chris

--
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 leo-editor+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages