Leo 5.8 installation via pip from GitHub archive does not work

2019-01-05 Thread Viktor Ransmayr
Hello Matt,

This is related to your advise in 
https://mail.google.com/mail/u/0/#search/pypi/FMfcgxwBTsXbGgDfPrpQqTCbZlMdkzMP 
...

I tried to install Leo 5.8 via pip from the released archive on GitHub into 
a new virtual environment (VE).

It did not work - at least - not in my environment using Windows 10 & 
Python 3.6 :-(

Here are the details:

* I created a new virtual environment for Leo 5.8 ...
* I tried to install Leo 5.8 via pip using the archive from GitHub - Not 
OK. - See   &
* Retried once more to see if the installation returns the same error - No. 
- See  ...

Shall I create an issue on GitHub?

With kind regards,

Viktor

###



PS C:\Users\Viktor> python -m venv ./PyVE/VE4Leo
(VE4Leo) PS C:\Users\Viktor\PyVE\VE4Leo> pip list
PackageVersion
-- ---
pip18.1
setuptools 39.0.1
(VE4Leo) PS C:\Users\Viktor\PyVE\VE4Leo> pip install 
https://github.com/leo-editor/leo-editor/archive/5.8.zip
Collecting https://github.com/leo-editor/leo-editor/archive/5.8.zip
  Downloading https://github.com/leo-editor/leo-editor/archive/5.8.zip
 / 56.0MB 592kB/s
Collecting docutils (from leo==5.8)
  Using cached 
https://files.pythonhosted.org/packages/36/fa/08e9e6e0e3cbd1d362c3bbee8d01d0aedb2155c4ac112b19ef3cae8eed8d/docutils-0.14-py3-none-any.whl

<### Deleted content ###>

Collecting requests>=2.0.0 (from sphinx->leo==5.8)
  Downloading 
https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
 
(57kB)
100% || 61kB 392kB/s
Collecting six>=1.5 (from sphinx->leo==5.8)
  Downloading 
https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl

<### Deleted content ###>

Collecting PyQt5_sip<4.20,>=4.19.11 (from PyQt5->leo==5.8)
  Downloading 
https://files.pythonhosted.org/packages/8d/4d/a7728bbcaaeecd17b386885d2abd6b849233317b03de39a1d6c1bc006248/PyQt5_sip-4.19.13-cp36-none-win_amd64.whl
 
(51kB)
100% || 61kB 262kB/s
Collecting decorator (from traitlets>=4.1->nbformat->leo==5.8)
  Using cached 
https://files.pythonhosted.org/packages/bc/bb/a24838832ba35baf52f32ab1a49b906b5f82fb7c76b2f6a7e35e140bac30/decorator-4.3.0-py2.py3-none-any.whl

<### Deleted content ###>

Collecting typed-ast; python_version < "3.7" and implementation_name == 
"cpython" (from astroid>=2.0.0->pylint->leo==5.8)
  Downloading 
https://files.pythonhosted.org/packages/99/59/7143493d658a6a8a60b4bcd0c1713fdbe5a232b6c2aa025866d0024c7d37/typed_ast-1.1.1-cp36-cp36m-win_amd64.whl
 
(152kB)
100% || 153kB 344kB/s
Collecting pytz>=0a (from babel!=2.0,>=1.3->sphinx->leo==5.8)
  Using cached 
https://files.pythonhosted.org/packages/f8/0e/2365ddc010afb3d79147f1dd544e5ee24bf4ece58ab99b16fbb465ce6dc0/pytz-2018.7-py2.py3-none-any.whl

<### Deleted content ###>

Collecting certifi>=2017.4.17 (from requests>=2.0.0->sphinx->leo==5.8)
  Downloading 
https://files.pythonhosted.org/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/certifi-2018.11.29-py2.py3-none-any.whl
 
(154kB)
100% || 163kB 344kB/s
Collecting urllib3<1.25,>=1.21.1 (from requests>=2.0.0->sphinx->leo==5.8)
  Downloading 
https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl
 
(118kB)
100% || 122kB 504kB/s
Collecting idna<2.9,>=2.5 (from requests>=2.0.0->sphinx->leo==5.8)
  Downloading 
https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
 
(58kB)
100% || 61kB 655kB/s
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.0.0->sphinx->leo==5.8)
  Downloading 
https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
 
(133kB)
100% || 143kB 936kB/s
Collecting bleach>=2.1.0 (from readme-renderer>=21.0->twine->leo==5.8)
  Using cached 
https://files.pythonhosted.org/packages/d4/0d/4696373c3b714f6022d668fbab619690a42050dbeacede6d10ed97fbd3e2/bleach-3.0.2-py2.py3-none-any.whl
Collecting webencodings (from 
bleach>=2.1.0->readme-renderer>=21.0->twine->leo==5.8)
  Using cached 
https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl
Installing collected packages: docutils, six, ipython-genutils, decorator, 
traitlets, jupyter-core, jsonschema, nbformat, mccabe, wrapt, 
lazy-object-proxy, typed-ast, astroid, colorama, isort, pylint, pyflakes, 
wheel, pypandoc, sphinxcontrib-websupport, snowballstemmer, pytz, babel, 
pyparsing, packaging, alabaster, MarkupSafe, Jinja2, Pygments, imagesize, 
certifi, 

Re: Instrospecting Leo's data relationships

2019-01-05 Thread Edward K. Ream
On Saturday, January 5, 2019 at 8:22:13 AM UTC-6, Edward K. Ream wrote:

Here is a script, to be run from leoPy.leo, that reports all var chains of 
> the form c.x, g.x, and self.x:
>

I edited the original post.  There was a bug in munge_lines added some 
unwanted entries to the list.  The deleted entries did not start with any 
of the original base chains.  In fact, there are 181 chains in the 
corrected script.

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: Instrospecting Leo's data relationships

2019-01-05 Thread Edward K. Ream
On Saturday, January 5, 2019 at 8:22:13 AM UTC-6, Edward K. Ream wrote:

I forgot various to emphasize the global subcommanders:

'g.app.backgroundProcessManager',
'g.app.externalFilesController',
'g.app.idleTimeManager',
'g.app.loadManager',
'g.app.pluginsController',
'g.app.recentFilesManager',
'g.app.sessionManager',

In short, there are a few hundred cross-file symbols that devs might 
*occasionally* have to know about, but there are only a few dozen truly 
important "global" symbols.

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.


Instrospecting Leo's data relationships

2019-01-05 Thread Edward K. Ream
Observable and d3.js are inspiring.  Alas, such visualization tools depend 
on data ;-)  There doesn't seem to all that much python-related data in the 
JS world.

Here is a script, to be run from leoPy.leo, that reports all var chains of 
the form c.x, g.x, and self.x:

g.cls()
import re
bases, chains = ['self.', 'c.', 'g.'], set()
id_pat = r'\w[\w0-9]*'

def get_lines():
'''Return a list of lines containing chains.'''
pat = re.compile(r'%s\.%s\.\w' % (id_pat, id_pat))
lines = set()
for p in c.all_unique_positions():
for line in g.splitLines(p.b):
if pat.search(line):
lines.add(line)
lines = list(lines)
print('%s lines' % len(lines))
return lines

s = ''.join(get_lines())

def find_chains(base):
chains.add(base)
base = base.replace('.', r'\.')
pat = re.compile(r'\b(%s%s\.)(%s)' % (base, id_pat, id_pat))
for m in re.finditer(pat, s) or []:
chain, follow = m.group(1), m.group(2)
if chain not in chains: # and follow not in methods:
bases.append(chain)
chains.add(chain)

def munge_chains(chains):
'''Remove simple ivars and use c instead of self.c.'''
chains = [z.rstrip('.') for z in sorted(list(chains))]
chains = sorted(list(set([z[5:] if z.startswith('self.c') else z for z 
in chains])))
# Replace self.c with c.
chains = [z for z in chains if z.count('.') > 0]
chains = [z for z in chains if not z.startswith('self.') or z.count('.') 
> 1]
return chains

while bases:
find_chains(bases.pop())
chains = munge_chains(chains)
g.printObj(chains, tag='%s chains' % len(chains))

*Notes*

The get_lines prepass results in a huge speedup of the code.  It filters 
all lines without any chains.

The munge_chains function converts self.c.x to c.x and does a few other 
cleanups.

*Results*

5844 lines
munge_chains 592
181 chains:
[
'c._currentPosition',
'c._topPosition',
'c.abbrevCommands',
'c.abbrev_subst_env',
'c.atFileCommands',
'c.chapterController',
'c.commandsDict',
'c.config',
'c.configurables',
'c.controlCommands',
'c.convertCommands',
'c.convertCommands.To_Python',
'c.db',
'c.debugCommands',
'c.debugger',
'c.editCommands',
'c.editFileCommands',
'c.fileCommands',
'c.fileCommands.gnxDict',
'c.findCommands',
'c.findCommands.ftm',
'c.frame',
'c.frame.body',
'c.frame.body.colorizer',
'c.frame.body.widget',
'c.frame.body.wrapper',
'c.frame.body.wrapper.widget',
'c.frame.findPanel',
'c.frame.iconBar',
'c.frame.log',
'c.frame.menu',
'c.frame.menu.enable_dict',
'c.frame.miniBufferWidget',
'c.frame.miniBufferWidget.widget',
'c.frame.statusLine',
'c.frame.stylesheet',
'c.frame.top',
'c.frame.top.find_status_edit',
'c.frame.top.leo_master',
'c.frame.top.leo_ui',
'c.frame.top.lineEdit',
'c.frame.top.treeWidget',
'c.frame.top.treeWidget.itemSelectionChanged',
'c.frame.tree',
'c.frame.tree.treeWidget',
'c.free_layout',
'c.gotoCommands',
'c.gui',
'c.helpCommands',
'c.hiddenRootNode',
'c.hiddenRootNode.children',
'c.hoistStack',
'c.ignored_at_file_nodes',
'c.importCommands',
'c.k',
'c.k.autoCompleter',
'c.k.killedBindings',
'c.k.mb_history',
'c.killBufferCommands',
'c.nodeHistory',
'c.opmlController',
'c.p',
'c.p.b',
'c.p.h',
'c.p.v',
'c.persistenceController',
'c.registerCommands',
'c.rstCommands',
'c.screenCastController',
'c.spellCommands',
'c.spellCommands.handler',
'c.spellCommands.handler.spellController',
'c.sqlite_connection',
'c.styleSheetManager',
'c.styleSheetManager.mng',
'c.tagController',
'c.tangleCommands',
'c.target_language',
'c.testManager',
'c.undoer',
'c.user_dict',
'c.viewController',
'c.vimCommands',
'context.frame',
'controller.assigns_d',
'controller.calls_d',
'controller.classes_d',
'controller.defs_d',
'controller.returns_d',
'cur.children',
'cur.h',
'curframe.f_code',
'curframe.f_globals',
'g.act_on_node',
'g.app',
'g.app.already_open_files',
'g.app.atAutoNames',
'g.app.backgroundProcessManager',
'g.app.classDispatchDict',
'g.app.commander_cacher',
'g.app.config',
'g.app.config.atCommonButtonsList',
'g.app.config.atCommonCommandsList',
'g.app.config.encodingIvarsDict',
'g.app.config.ivarsDict',
'g.app.config.modeCommandsDict',
'g.app.db',
'g.app.debug',
'g.app.delegate_language_dict',
'g.app.extension_dict',
'g.app.externalFilesController',
'g.app.extra_extension_dict',
'g.app.globalKillBuffer',
'g.app.global_cacher',
'g.app.gui',
'g.app.gui.frameFactory',
'g.app.gui.frameFactory.masterFrame',
'g.app.gui.qtApp',
'g.app.idleTimeManager',
'g.app.idle_timers',

Re: Coming: live coding in python

2019-01-05 Thread Edward K. Ream

On Wednesday, January 2, 2019 at 6:22:16 AM UTC-6, Edward K. Ream wrote:

In another thread Offray suggests adding live coding features to Leo and 
> python. 
>
> Googling "live coding in python" yields a Don Kirby's plugin 
> that apparently does exactly 
> that for emacs, eclipse and pycharm.
>

#1044  declares that 
this isn't likely ever to happen. Reloading arbitrary python code is 
arbitrarily difficult.  In contrast, Kirby's plugin is a (complex!) wrapper 
around turtle graphics code.  It's interesting, but offers no way forward 
for the general problem.

This whole issue is moot for most Leo users.  Leo's various reload commands 
allow users to change *settings* on the fly.

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: How important is LeoWapp to you?

2019-01-05 Thread John Griessen

On 12/11/18 3:43 PM, Matt Wilkie wrote:
https://www.inrupt.com/blog/one-small-step-for-the-web -- /"This is why I have, over recent years, been working with a few people 
at MIT and elsewhere to develop Solid , an open-source project to restore the power and agency of 
individuals on the web./


I'm surprised at no comments on solid after the discussion of RESTful apps and 
why you would want them re: flexx

A REST API may not be very human readable/usable, but along with some crypto, 
allows read write web actions.
Read write web actions are what solid is about.


https://github.com/solid/solid-spec
"Solid (derived from "social linked data") is a proposed set of conventions and tools for building decentralized social 
applications based on Linked Data principles. Solid is modular and extensible. It relies as much as possible on existing W3C 
standards and protocols."


https://solid.inrupt.com/docs/intro-to-solid-spec
"Solid is a set of modular specifications, which build on, and extend the founding technology of the world wide web (HTTP, REST, 
HTML). They are 100% backwards compatible with the existing web. Each spec, taken in isolation, provides extra features to an 
existing system.  However, when used in combination, they enable exciting new possibilities for web sites and applications."


--
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.