Re: Leo's 5.7 docs are complete

2018-02-02 Thread Matt Wilkie
I took a stab at "this could be improved". Some things are better but it's 
not 'all good'.  Pushed to ec8cd249b 


Here's a snapshot of the outline (wishlist: copy and paste headline 
structure only from Leo into other apps):



The biggest internal changes are in *Anaconda *and *Install in pieces* 
sections:

_The smoothest route, with the same recipe working across Linux, MacOS and 
Windows._

The `Anaconda`_ scientific computing environment includes Python, NumPy, 
SciPy, PyQt, and over a thousand other tools, packages and libraries. It's 
a 500+ MB download but you're guaranteed to have everything needed.

To install Leo do this from an Anaconda console::

pip install leo

The `Miniconda`_ environment includes just Python and the `conda` package 
management tool. A 60 MB download and then pick and choose from the full 
Anaconda ecosystem.

To install Leo do this from an Anaconda console::

conda install pyqt5
pip install leo


Proceed to `Desktop integration`_ 


*Install in pieces* (only the overview bit here):

_If the all inclusive install methods don't work for your situation, here's 
the component breakdown._

1. Install `Python`_ (v3 preferred, but Leo is backwards compatible to v2.6)
2. Install `PyQt5`_ (preferred) or `PyQt4`_
3. Install `pip`_ (if needed)
4. Install Leo with pip, either from PyPi or GitHub source.
   a. Pip will include optional but recommended packages fom `Dependencies`_
5. Install optional packages
6. Desktop integration

matt


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


Re: No pyinstaller files for Windows

2018-02-02 Thread Matt Wilkie


> ​Windows and Linux are fully supported.  MacOS less so because I've never 
> gotten a brew recipe to work.
>

Are there any Mac users who can attempt installing via Mini- or Anaconda 
and report on that? Maybe they've solved the problems for us. 


matt

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


Re: No pyinstaller files for Windows

2018-02-02 Thread Matt Wilkie


> The pyinstaller2 script fails on Windows 10 with this message:
>
> PyInstaller.compat.FileNotFoundError: Path or glob
> "C:\anaconda2\Library\bin\qml\Qt" not found or matches no files.
>

For me on Win10 pyinstaller "just worked". Invocation:

 pyinstaller --clean --win-private-assemblies launchLeo-unified.spec

I'm running a Mini Anaconda venv that is relatively clean. I started with 
bare python 3 and then `pip install --editable` from Leo git checkout. That 
was before Christmas though and some other stuff may have crept in in the 
meantime. I just installed Pyinstaller half an hour ago (using pip).

matt

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


Saving to a file that is open somewhere else

2018-02-02 Thread Israel Hands
I often find myself working on a file in dropbox that is open somewhere 
else. The result being that when I save I get a 'copy of the file'.  And 
using file compare I can generally work out what changes need to be merged 
to get everything back in sync.  I'm sure there is a Git solution but I 
wondered if a node based option would be handy.

So I'm working on a node - Agenda for next meeting -  and let us assume 
this is the only node that has been changed, then when I hit save then Leo 
saves the file but makes a duplicate node at exactly the same level with 
the name 'CUSTOM TEXT Agenda for the next meeting' 

This keeps all the available options together and makes the changes easy to 
find?

ta

IH

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


Re: An avalanche of new thoughts

2018-02-02 Thread Edward K. Ream
On Thursday, February 1, 2018 at 1:40:22 PM UTC-6, Joe Orr wrote:

Not sure I understand what you mean by use browser as graphics backend, 
> just wanted to note that it is definitely possible to make a desktop app 
> with browser technology (Electron).  Just need to wrap the backend in node.
>

I have just created #684: Create a browser gui for Leo 
. This issue explains 
how to use browser technology in a desktop version of Leo. Most of the 
steps apply to *any *gui for Leo.

As this year's work on the console gui shows, it is possible to create a 
new gui for Leo without changing Leo's core in *any *significant way.  This 
makes a browser gui for Leo feasible.  Only the gui code itself will be 
aware of web/LeoVue technology.  The rest of Leo will remain as a pure 
python desktop application.

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


Leo now supports TreePad files

2018-02-02 Thread Edward K. Ream
Rev b47c3e3 completes #674: Add a treepad importer 
. 

Leo now has TreePad importer and writer plugins, so @auto whatever.hjt 
works for TreePad files.

The code has been only slightly tested. Please reopen the issue if 
necessary.

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


An better way to find issues

2018-02-02 Thread Edward K. Ream
In some previous post, don't remember where, I said that I focus on 
immediate tasks by filtering *out *various tasks:

is:issue is:open -label:Waiting -label:lvl:minor etc.

There is an easier way:

is:issue is:open milestone:5.8

This works because I only add a milestone to issues that I definitely work 
on in the near future.  It is now my bookmarked bugs page.

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


Re: NEW: geotag.py

2018-02-02 Thread lewis
For my own learning I have used an example to show that I can change a str 
type to bytes with
b = g.toEncodedString(my_string)
and confirmed the change with the type() function. 

But from the log I can't recognise what the str is that needs changing in 
line 184:
  [snip]
  File "N:\git\leo-editor\leo\plugins\pygeotag\pygeotag.py", line 184, in 
do_GET
os.path.join(self.owner.basedir,self.staticMap[path[0]])).read())
  File 
"C:\Users\lewis\AppData\Local\Programs\Python\Python36\lib\socketserver.py", 
line 775, in write
self._sock.sendall(b)
TypeError: a bytes-like object is required, not 'str'

Can you explain how to identify the str structure so I can apply the 
change? 

Regards
Lewis


On Saturday, January 27, 2018 at 12:25:41 AM UTC+11, Edward K. Ream wrote:
>
> In Leo, the best way (usually) to convert from a string to bytes type is 
> with:
>
>   b = g.toEncodedString(aString)
>
> This handles differences between python 2 and 3, and handles error 
> checking when aString.encode throws an exception. It also works when 
> aString is already a bytes object.
>
> Similarly, g.toUnicode(obj) is the best way to convert from bytes to 
> unicode.
>
>

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


Re: NEW: geotag.py

2018-02-02 Thread Edward K. Ream
On Friday, February 2, 2018 at 7:03:53 AM UTC-6, lewis wrote:
 

>   File 
> "C:\Users\lewis\AppData\Local\Programs\Python\Python36\lib\socketserver.py", 
> line 775, in write
> self._sock.sendall(b)
> TypeError: a bytes-like object is required, not 'str'
>
> Can you explain how to identify the str structure so I can apply the 
> change? 
>

The culprit appears to be that b is a str, not a bytes. 

The great thing about Python is that you have full access to most of the 
Python libs. Open socketserver.py in your favorite text editor, and look at 
the context of the error.  That may be enough.

Otherwise, you can add debugging code to socketserver.py as follows:

1. Before changing anything, init a git repo for the folder containing 
socketserver.py.  Git will give you diffs, and you can revert your changes 
later with git checkout socketserver.py.  This is important protection for 
your system.

2. In socketserver.py, replace:

self._sock.sendall(b)

with:

try:
   self._sock.sendall(b)
except Exception:
import leo.core.leoGlobals g # make *sure *g does not occur in the 
file!!
g.trace(repr(b), g.callers())
g.pdb()

HTH.

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


Re: Leo's 5.7 docs are complete

2018-02-02 Thread Edward K. Ream
On Fri, Feb 2, 2018 at 12:00 AM, Matt Wilkie  wrote:

Installing Leo with Pip section has Python 2 and Python 3 mixed up. I
> created a branch, `
> ​​
> i
> ​​
> nstall-docs-mhw` and committed an alternative wording
>

​Matt, this is brilliant!  You have created a new workflow that eliminates
the need for cumbersome text descriptions:

 open LeoDocs.leo in master
 git checkout -b install-docs-mhw2
 open LeoDocs.leo with --no-cache. Ignore the "File may be open" warning.

Now we should have of seeing the changes in Leo itself!

However, I am not getting this to work. I don't see any changes in
LeoDocs.leo.

I wonder what can be going on...

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


Re: Mermaid flowcharts from Leo subtree in Leo Vue

2018-02-02 Thread Joe Orr
Forgot to add, the examples are kind of contrived. I don't have any good 
real world examples yet but I think I eventually will. If anyone can 
suggest better examples that would be great.

Joe

On Thursday, February 1, 2018 at 2:50:26 PM UTC-5, Joe Orr wrote:
>
> Added a new feature which might be worth a look.
>
> Mermaid is a markup language for creating and viewing diagrams such as 
> flowcharts and Gannt charts. Leo Vue already support Mermaid, but I added a 
> new directive that will create an interactive flowchart from the subtree of 
> a node. Because of Leo's clone nodes, these flowcharts can be more complex 
> than simple trees. 
>
> 1.5 min overview video 
>
> Also added couple more things: Kanban summary nodes, inherit language 
> directives.
>
> Joe Orr
>
>
>
>
>

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


Re: [QA]Advices for Leo documentation in Chinese translated version?

2018-02-02 Thread OMlalala
Dear @Edward K. Ream and @Matt Wilkie,

You are so kind, thank you all. 

When I finished first step, I will reply this mail :)

--
OMlalala

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


Re: NEW: geotag.py

2018-02-02 Thread Terry Brown
On Fri, 2 Feb 2018 05:30:12 -0800 (PST)
"Edward K. Ream"  wrote:

> > "C:\Users\lewis\AppData\Local\Programs\Python\Python36\lib\socketserver.py",
> >  
> > line 775, in write
> > self._sock.sendall(b)
> > TypeError: a bytes-like object is required, not 'str'
> >
> > Can you explain how to identify the str structure so I can apply
> > the change? 
> >  
> 
> The culprit appears to be that b is a str, not a bytes. 
> 
> The great thing about Python is that you have full access to most of
> the Python libs. Open socketserver.py in your favorite text editor,
> and look at the context of the error.  That may be enough.
> 
> Otherwise, you can add debugging code to socketserver.py as follows:
> 
> 1. Before changing anything, init a git repo for the folder
> containing socketserver.py.  Git will give you diffs, and you can
> revert your changes later with git checkout socketserver.py.  This is
> important protection for your system.

Going to go out on a limb here and suggest the problem may lie
in a ten year old Leo plugin that never considered Python 3, rather
than in one of the Python core libraries (@Edward ;-)  So rather than
altering Python core libraries on your system, look for str / byte
issues further up the traceback.

  File 
"/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/plugins/pygeotag/pygeotag.py", 
line 184, in do_GET
os.path.join(self.owner.basedir,self.staticMap[path[0]])).read())

Python is truncating the excessively long line, which in full reads:

self.wfile.write(open(

os.path.join(self.owner.basedir,self.staticMap[path[0]])).read())

and should read

self.wfile.write(g.toEncodedString(open(

os.path.join(self.owner.basedir,self.staticMap[path[0]])).read()))

although turns out that module doesn't know about Leo / import g, so instead:

self.wfile.write(open(

os.path.join(self.owner.basedir,self.staticMap[path[0]])).read().encode('utf-8'))

I've made the necessary changes in 
https://github.com/leo-editor/leo-editor/commit/9057d5b

Thanks Lewis for reminding me about this plugin, it's kind of cool -
glad the google API part still works, had wondered if that might no
longer be supported on the google end.

Cheers -Terry


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


Re: [QA]Advices for Leo documentation in Chinese translated version?

2018-02-02 Thread Zoom.Quiet
On Fri, Feb 2, 2018 at 12:44 AM, Edward K. Ream  wrote:
> On Thu, Feb 1, 2018 at 8:28 AM, OMlalala  wrote:
>
>> I want to make Chinese version Doc for spread the perfect Leo, any advice?
>
>
> That's great news.  Please tell us when you have the docs ready.  I'll put a
> link to them on Leo's home page.
>
> Please feel free to ask any question you may have.  All of Leo's devs want
> to help you in any way we can.
>

Wow, thanx OMlalala
i spread Leo in China many years,
but nobody want to deep in doc.
in fact, i'm try to translate LeoDocs.leo in 2005...
quickly i like read original version, so stop the project.

now, we restart, for Chinese Pythonista.




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



-- 
life is pathetic, go Pythonic! 人生苦短, Python当歌!
俺: http://zoomquiet.io
授: http://creativecommons.org/licenses/by-sa/2.5/cn/
怒: 冗余不做,日子甭过!备份不做,十恶不赦!
KM keep growing environment culture which promoting organization learning!

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


Installing virtualenv has destroyed my python 3 installation

2018-02-02 Thread Edward K. Ream
My original system contains c:\Anaconda2 and c:\Anaconda3.  I installed 
virtualenv with both pip2 and pip3.

I did a virtualenv c:\Env\Test which only partially worked as expected.  No 
scripts were installed.  No obvious way to do deactivate.

Worse, C:\Anaconda3 no longer contains python.exe.  My paths look unchanged.

This is totally unacceptable.  Does anyone have any ideas what might be 
happening?

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


Re: Installing virtualenv has destroyed my python 3 installation

2018-02-02 Thread Edward K. Ream

On Friday, February 2, 2018 at 12:11:19 PM UTC-6, Edward K. Ream wrote:

My original system contains c:\Anaconda2 and c:\Anaconda3.  I installed 
> virtualenv with both pip2 and pip3.
>
> I did a virtualenv c:\Env\Test which only partially worked as expected.  
> No scripts were installed.  No obvious way to do deactivate.
>

I did find deactivate scripts in c:\Anaconda2\scripts and 
c:\Anaconda3\scripts, but neither appears to have done anything.

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


Re: Installing virtualenv has destroyed my python 3 installation

2018-02-02 Thread Terry Brown
On Fri, 2 Feb 2018 10:11:19 -0800 (PST)
"Edward K. Ream"  wrote:

> My original system contains c:\Anaconda2 and c:\Anaconda3.  I
> installed virtualenv with both pip2 and pip3.

Hmm, if Anaconda's the source of Python on your system, not sure if it
makes sense to install virtualenv "in" Anaconda.  conda can manage
environments itself, like virtualenv, and I'd expect things to get
weird if you mix them.  On a linux system with a "system" python I
think you can use virtualenv and conda environments side by side, which
is different than one in the other.

> I did a virtualenv c:\Env\Test which only partially worked as
> expected.  No scripts were installed.  No obvious way to do
> deactivate.

Exit the shell and start a new one?

> Worse, C:\Anaconda3 no longer contains python.exe.  My paths look
> unchanged.
> 
> This is totally unacceptable.  Does anyone have any ideas what might
> be happening?

Guess I'd google "virtualenv in (ana)conda"

But unless you really need virtualenv for something, use conda
environments:

https://conda.io/docs/user-guide/tasks/manage-environments.html

If you end up rebuilding, I would not install anaconda at all, just
miniconda.  You don't need Python 2 and Python 3 installs, as both
Python 2 and Python 3 installs can create environments that use the
other version of Python, i.e. a Python 3 environment can be created by
Python 2 based conda, and visa versa.

Good luck.

Cheers -Terry

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


Re: Installing virtualenv has destroyed my python 3 installation

2018-02-02 Thread Edward K. Ream
On Fri, Feb 2, 2018 at 12:43 PM, Terry Brown  wrote:

Hmm, if Anaconda's the source of Python on your system, not sure if it
> makes sense to install virtualenv "in" Anaconda.  conda can manage
> environments itself, like virtualenv, and I'd expect things to get
> weird if you mix them.


​Ah.  I see.  Thanks for this.

Guess I'd google
> ​​
> "virtualenv in (ana)conda"
>

​The consensus is that virtualenv and Anaconda don't mix. ​


>
> But unless you really need virtualenv for something, use conda
> environments:
>
> https://conda.io/docs/user-guide/tasks/manage-environments.html


​Ok.  I'll put that on the list of things to study.​


If you end up rebuilding, I would not install anaconda at all, just
> miniconda.  You don't need Python 2 and Python 3 installs, as both
> Python 2 and Python 3 installs can create environments that use the
> other version of Python, i.e. a Python 3 environment can be created by
> Python 2 based conda, and visa versa.
>

​This is fascinating. ​It would be a major change for me.

Won't I have to install lots of packages if I use miniconda?

It appears I have no option but to rebuild my Python 3 environment.  Now
would be a good time to play with various install options.

Many thanks for your help, Terry.

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


Re: Installing virtualenv has destroyed my python 3 installation

2018-02-02 Thread Terry Brown
On Fri, 2 Feb 2018 12:53:12 -0600
"Edward K. Ream"  wrote:

> Won't I have to install lots of packages if I use miniconda?

I guess it would be interesting to know exactly what's on the list of
packages you'd need.

I think the recommended way to install them is

conda install -c conda-forge 

which selects the conda-forge source which I think is more
comprehensive and perhaps more open sourcey than the default.

I wouldn't expect a very long list, PyQt, pyenchant, etc.

And when conda install fails you can use pip.

Cheers -Terry

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


Re: Installing virtualenv has destroyed my python 3 installation

2018-02-02 Thread Terry Brown
On Fri, 2 Feb 2018 12:53:12 -0600
"Edward K. Ream"  wrote:

> > Python 2 and Python 3 installs can create environments that use the
> > other version of Python, i.e. a Python 3 environment can be created
> > by Python 2 based conda, and visa versa.
> 
> ​This is fascinating. ​It would be a major change for me.

p.s. I just recently saw a tweet that claimed you could create a
Python 1.0 environment, which prompted a "Wait, what?" tweet from
Guido, but I'm not sure if that's true or an old April Fool's gag.

Cheers -Terry

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


Re: Installing virtualenv has destroyed my python 3 installation

2018-02-02 Thread Edward K. Ream
On Fri, Feb 2, 2018 at 12:58 PM, Terry Brown  wrote:

>
> > Won't I have to install lots of packages if I use miniconda?
>
> I guess it would be interesting to know exactly what's on the list of
> packages you'd need.
>

​ it would indeed be good to know what the minimal packages are​ .


> I think the recommended way to install them is
>
> conda install -c conda-forge 
>

​I've used pip install without problems, or so I though ;-)

This is a good time to play with this, while installations instructions are
on our minds.

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


Re: Installing virtualenv has destroyed my python 3 installation

2018-02-02 Thread Edward K. Ream
On Fri, Feb 2, 2018 at 1:00 PM, Terry Brown  wrote:

p.s. I just recently saw a tweet that claimed you could create a
> Python 1.0 environment, which prompted a "Wait, what?" tweet from
> Guido, but I'm not sure if that's true or an old April Fool's gag.
>

​Hehe.

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


Which mailing list?

2018-02-02 Thread Terry Brown
Leo has two mailing lists, the one most everyone uses:

leo-editor 

and

leo-editor-users 

I notice the difference because for some odd reason I only see my own
posts on the latter.  No matter.

But I wonder if there's any useful distinction between them?  Inkscape
has inkscape-user and inkscape-devel, with a more obvious intended
split.

Maybe we don't need to do anything, but apart from a recent series of
posts on leo-editor-users it hasn't been used since 2016, I think.

Cheers -Terry

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


Re: Which mailing list?

2018-02-02 Thread Edward K. Ream
On Fri, Feb 2, 2018 at 1:41 PM, Terry Brown  wrote:

> Leo has two mailing lists, the one most everyone uses:
>
> leo-editor 
>
> and
>
> leo-editor-users 
>

​I think the unused group should be deleted.

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


Re: Installing virtualenv has destroyed my python 3 installation

2018-02-02 Thread Edward K. Ream
On Friday, February 2, 2018 at 12:11:19 PM UTC-6, Edward K. Ream wrote:

> This is totally unacceptable.

Heh.  This has turned into a lucky break. 

I replaced both Anaconda2 and Anaconda3 with (32-bit) Miniconda3.  I chose 
32-bit so that the spell checker will work.

I created python2 and python3 environments within Miniconda3, using 
activate to switch between them.  I'll define a2 and a3 abbreviations for 
`activate -n python2` and `activate -n python3` :-)

This is great stuff, because now I only need one version of scripts--they 
just work in whatever environment is in effect.  So another "sclerosis" has 
been fixed.  All scripts should work in all environments, and I can create 
as many environments as I like.

The only strange thing so far is that the Miniconda installer recommended 
*not* putting Miniconda3 on the path.  Actually, it's essential to do so, 
unless you use the Miniconda console.  And you have to put both Miniconda3 
and Miniconda3/scripts on the path.

I've just started to install packages.  I'll report any glitches here for 
future reference. 

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


Re: Installing virtualenv has destroyed my python 3 installation

2018-02-02 Thread Terry Brown
On Fri, 2 Feb 2018 14:02:08 -0800 (PST)
"Edward K. Ream"  wrote:

> The only strange thing so far is that the Miniconda installer
> recommended *not* putting Miniconda3 on the path.  Actually, it's
> essential to do so, unless you use the Miniconda console.  And you
> have to put both Miniconda3 and Miniconda3/scripts on the path.

Perhaps it feels it's impolite to modify the path and block access to
the "system" Python, e.g. as installed by a download from python.org.
In Linux it seems to make sense not to put it on the path, I just

export PATH=/home/tbrown/miniconda2:$PATH

when I want to activate a conda environment.

Cheers -Terry

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


Re: Mermaid flowcharts from Leo subtree in Leo Vue

2018-02-02 Thread Offray Vladimir Luna Cárdenas
Joe,

This is really cool. Leo Vue is so cool that I think it should be
renamed Leo Web, because it's exploring what can be done when the ideas
behind Leo start a deep talk with the web technologies, including
improved interactivity and rendering, a search that many of us have
been  looking for so long. I have even thought in a non distant future
where the Leo website, is "just" a Leo outline, showed as a Leo Vue
instance.

Maybe the best place to talk about the search improved interactivity
(liveness) and outlining, particularly in Leo, is the thread titles "An
avalanche of new thoughts". As soon as I have more time I will do it.
But your explorations are pretty worthy and inspiring.

Cheers,

Offray


On 01/02/18 14:50, Joe Orr wrote:
> Added a new feature which might be worth a look.
>
> Mermaid is a markup language for creating and viewing diagrams such as
> flowcharts and Gannt charts. Leo Vue already support Mermaid, but I
> added a new directive that will create an interactive flowchart from
> the subtree of a node. Because of Leo's clone nodes, these flowcharts
> can be more complex than simple trees. 
>
> 1.5 min overview video 
>
> Also added couple more things: Kanban summary nodes, inherit language
> directives.
>
> Joe Orr
>
>
>
>
> -- 
> 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+unsubscr...@googlegroups.com
> .
> To post to this group, send email to leo-editor@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.

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


Re: NEW: geotag.py

2018-02-02 Thread lewis
Hi Terry,

Thanks for the fix. I see you also updated the encoding for the Quit button 
("TERMINATING SERVER"). I thought I might be spending an afternoon learning 
how to use git diff :) Maybe soon
I have updated the docstring using the instructions from this thread and 
attached the file. Please feel free to change any terminology or style if 
required.

Regards
Lewis

On Saturday, February 3, 2018 at 3:38:49 AM UTC+11, Terry Brown wrote:
>
>
> I've made the necessary changes in 
> https://github.com/leo-editor/leo-editor/commit/9057d5b 
>
> Cheers -Terry 
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.
#@+leo-ver=5-thin
#@+node:tbrown.20091214233510.5347: * @file geotag.py
'''  

A web app to obtain geotagging location data, and tag nodes with latitude and longitude.

There are 3 commands available via Alt-X or from the plugin's submenu. 

`geotag-open-server-page`

- Opens a browser web app to view the Geotagger map.

`geotag-tag-node`

- Sets Leo to wait for a geotag to be sent from the geotagging web app.  **IMPORTANT** this blocks (stops leo) until it gets a response (i.e. 
  you click 'Send' in the geotagging web app.)  So you should (a) save 
  your outline before using it, and (b) do geotag-open-server-page, so 
  the web app. is available.

`geotag-show-node`

- show the node's location/geotag data in the map.

There are 2 buttons in the browser web App: 
[Send]  [Quit]

Usage
--

Issue the `geotag-open-server-page` command to open the web app. 

In Leo create a node associated with a place.
>From the node, issue the `geotag-tag-node` command. 

In the browser window, set the map pin to desired location.
Click the [Send] button to send coordinate information to leo, where it's stored in the headline of the @LatLng child node. 

To close the server, click [Quit]

'''

#@@language python
#@@tabwidth -4

#@+<< imports >>
#@+node:tbrown.20091214233510.5349: ** << imports >>
import leo.core.leoGlobals as g

from leo.plugins.pygeotag import pygeotag

import socket
#@-<< imports >>
__version__ = "0.1"

#@+others
#@+node:tbrown.20091214233510.5351: ** init
def init():
'''Return True if the plugin has loaded successfully.'''
if not hasattr(g, 'pygeotag'):
try:
g.pygeotag = pygeotag.PyGeoTag(synchronous=True)
g.pygeotag.start_server()
g.registerHandler('after-create-leo-frame',onCreate)
g.registerHandler('end1',onQuit)
g.plugin_signon(__name__)
except socket.error:
g.es('Geotag plugin init failed, perhaps port in use')
return True
#@+node:tbrown.20091214233510.5352: ** onCreate
def onCreate (tag,key):

c = key.get('c')

geotag_Controller(c)
#@+node:tbrown.20101103145611.5658: ** onQuit
def onQuit(tag,key):
g.pygeotag.stop_server()
#@+node:tbrown.20091214233510.5353: ** class geotag_Controller
class geotag_Controller(object):

'''A per-commander class that manages geotagging.'''

#@+others
#@+node:tbrown.20091214233510.5354: *3* __init__
def __init__ (self, c):

self.c = c
c.geotag = self
#@+node:tbrown.20091215204347.11403: *3* getAttr
@staticmethod
def getAttr(p):
for nd in p.children():
if nd.h.startswith('@LatLng '):
break
else:
nd = p.insertAsLastChild()
return nd
#@+node:tbrown.20091214233510.5356: *3* callback
def callback(self, data):

c = self.c
p = c.p

nd = self.getAttr(p)

nd.h = '@LatLng %(lat)f %(lng)f %(zoom)d %(maptype)s  %(description)s ' % data
c.setChanged(True)
if hasattr(c, 'attribEditor'):
c.attribEditor.updateEditorInt()
c.redraw()
#@-others
#@+node:tbrown.20091214233510.5357: ** cmd_open_server_page (gettag_Controller)
@g.command('geotag-open-server-page')
def cmd_OpenServerPage(event):
# c = event.get('c')
g.pygeotag.open_server_page()
# g.pygeotag.callback = c.geotag.callback

#@+node:tbrown.20091214233510.5358: ** cmd_tag_node (gettag_Controller)
@g.command('geotag-tag-node')
def cmd_TagNode(event):
c = event.get('c')
data = g.pygeotag.get_position({'description':c.p.h})
c.geotag.callback(data)
#@+node:tbrown.20091215204347.11402: ** cmd_show_node (gettag_Controller)
@g.command('geotag-show-node')
def cmd_ShowNode(event):
c = event.get('c')
nd = geotag_Controller.getAttr(c.p)
try:
txt = nd.h.split(None, 5)
what = 'dummy', 'lat', 'lng', 'zoom', 'maptype', 'description'
data = dict(zip(what, txt))
data['lat'] = float(data['lat'])
data['lng