On Tue, 17 Dec 2019 13:28:34 -0800 (PST)
Matt Wilkie <[email protected]> wrote:

> it could be made portable with 
> 
> import leo.core.leoGlobals as g
> @path = g.computeHomeDir() # yields '/home/slitt' or 'C:\Users\slitt'
> 
> Also, if it's a Leo script (as distinct from a python script that
> could be run without Leo) this will print to both the starting
> console (stdout) and to Leo's log pane:
> 
> g.es_print('Hello World') 
> 
> -matt

Thanks matt,

Your solution ran perfectly when I highlighted line "@clean
helloclean.py" and pressed Ctrl+b, but when I ran the program created
by Leo, /home/slitt/helloclean.py, I got the following error trace:

Traceback (most recent call last):
  File "helloclean.py", line 2, in <module>
    import leo.core.leoGlobals as g
ModuleNotFoundError: No module named 'leo'

The best I could find after 15 minutes of web searching was:

* Rename pyproject.toml or otherwise 

* At any rate, editing sys.path was the fix (commit d3a6494).

So I renamed pyproject.toml, and I put an import sys before importing
leo.core.leoGlobals, but same symptom.

I installed from your git page, the latest master, and I installed in
~/build, so /home/slitt/build/leo-editor-master/leo-core.cfg is a file.
In ~/.leo I could find nothing that referenced
/home/slitt/build/leo-editor-master , and I have a hunch that's the
problem but I can't figure it out farther.

Thanks,

SteveT

Steve Litt 
December 2019 featured book: Rapid Learning for the 21st Century
http://www.troubleshooters.com/rl21

-- 
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/20191217204838.608d7309%40mydesk.domain.cxm.

Reply via email to