Pyzo file browser within Leo

70 views
Skip to first unread message

lewis

unread,
May 17, 2019, 7:44:29 PM5/17/19
to leo-editor
Running this script:
c.pyzoController.open_file_browser()

to run Pyzo from within Leo I get this traceback:

exception executing script
Traceback (most recent call last):

  File "N:\git\leo-editor\leo\core\leoCommands.py", line 644, in executeScript
c.executeScriptHelper(args, define_g, define_name, namespace, script)

  File "N:\git\leo-editor\leo\core\leoCommands.py", line 693, in executeScriptHelper
exec(compile(script, scriptFile, 'exec'), d)

  File "C:/Users/lewis/.leo/scriptFile.py", line 25, in <module>
c.pyzoController.open_file_browser()

AttributeError: 'Commands' object has no attribute 'pyzoController'

--------------------
  line 24:
* line 25: c.pyzoController.open_file_browser()
  line 26: #@-leo
  line 27:
 [end]

I'm running commit 77564be
Leo Log Window
Leo 6.0-devel, devel branch
Python 3.7.3, PyQt version 5.12.3
Windows 10 AMD64 (build 10.0.17134) SP0

I have plugin pyzo_support.py enabled.

Regards
Lewis

Chris George

unread,
May 17, 2019, 9:24:43 PM5/17/19
to leo-e...@googlegroups.com
Hi Lewis,

Try disabling the pyzo_support.py plugin.

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 post to this group, send email to leo-e...@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/8d57cd68-3865-497c-b639-4b8043092d2c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

lewis

unread,
May 18, 2019, 12:21:39 AM5/18/19
to leo-editor
I need pyzo_support.py enabled to use Pyzo

If I start leo with pyzo_support.py disabled, I need to
1. enable pyzo_support in myLeoSettings
2. reload-settings command
3. open leo file, run script:
   c.pyzoController.open_file_browser()
   (I get the same traceback)
4. close the leo file.
5. now re-open leo file which contains the script, and the PFB launches.

The PFB and Leo can now be used independently.

Edward K. Ream

unread,
May 18, 2019, 7:41:55 AM5/18/19
to leo-editor
On Fri, May 17, 2019 at 6:44 PM lewis <lewi...@operamail.com> wrote:
Running this script:
c.pyzoController.open_file_browser()

to run Pyzo from within Leo I get this traceback:

[snip]

AttributeError: 'Commands' object has no attribute 'pyzoController'

You must enable the pyzo_support.py plugin.

Edward

Edward K. Ream

unread,
May 18, 2019, 7:46:19 AM5/18/19
to leo-editor
On Sat, May 18, 2019 at 6:41 AM Edward K. Ream <edre...@gmail.com> wrote:

You must enable the pyzo_support.py plugin.

BTW, my next project is #1095, which aims to provide the pyzo file browser even if pyzo itself is not available.  This will involve copying parts of pyzo into the leo/external folder.  It should be done in a day or so.  The API will likely remain unchanged:  c.pyzoController.open_file_browser()

Edward

lewis

unread,
May 19, 2019, 9:10:02 AM5/19/19
to leo-editor
Can you explain what the Pyzo file browser experience was meant to be within leo?

If I start leo with pyzo_support.py enabled in myLeoSettings, Leo simply starts Pyzo and leo is not visible at all.
Only If I start the PFB as described in steps 1-5 above, does it run as a separate gui alongside leo.

Thanks
Lewis

Edward K. Ream

unread,
May 19, 2019, 10:48:40 AM5/19/19
to leo-editor
On Sun, May 19, 2019 at 8:10 AM lewis <lewi...@operamail.com> wrote:
Can you explain what the Pyzo file browser experience was meant to be within leo?

It was supposed to be a drop-in replacement for Leo's Open Outline dialog.  It has nothing to do with pyzo_support, and I explained earlier today, it wasn't worth doing.  Otoh, the pyzo_support plugin will support pyzo's file browser as it supports the other pyzo windows.

Edward
Reply all
Reply to author
Forward
0 new messages