Re: Leo requires tkinter module to be configured in Python environment

2020-01-01 Thread Brian Theado
Viktor,

On Tue, Dec 31, 2019 at 11:45 AM Viktor Ransmayr 
wrote:

> You were right with your assumption. - I tried it both with Leo 6.1-final
> as well as 6.2-b1-devel - and - it works as you suspected.
>
> In both cases it does throw a type error related to ...\spellCommands.py -
> but - it does open the workbook.leo outline.
>

Looks like you ran into issue
https://github.com/leo-editor/leo-editor/issues/1453. I just posted a
comment there stating that the attempted fix for that issue did not work.


> Thanks a lot for your explanation!
>
> With kind regards,
>
> Viktor
>
> PS: Just for the record - Here's the startup log for Leo 6.2-b1-devel:
>
> Leo Log Window
> Leo 6.2-b1-devel
> Python 3.7.6, PyQt version 5.12.6
> Windows 10 AMD64 (build 10.0.18362) SP0
> current dir: C:/Users/Viktor/pyve/github/Leo-devel
> load dir: C:/users/viktor/pyve/github/leo-devel/devel/leo-editor-devel/leo
> /core
> global config dir: C:/users/viktor/pyve/github/leo-devel/devel/leo-editor-
> devel/leo/config
> home dir: C:/Users/Viktor
> reading settings in C:/users/viktor/pyve/github/leo-devel/devel/leo-editor
> -devel/leo/config/leoSettings.leo
> Do spellpyx.txt file found
> unexpected error creating: None
> Traceback (most recent call last):
>
>   File
> "c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\commands\spellCommands.py"
> , line 62, in create
> f = open(fn, mode='wb')
>
> TypeError: expected str, bytes or os.PathLike object, not NoneType
>
> reading settings in C:/users/viktor/pyve/github/leo-devel/devel/leo-editor
> -devel/leo/doc/CheatSheet.leo
>
>
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/0214f56c-76bf-4c44-a55e-cddb740333ca%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAO5X8CwbwvcQKhQ_QaL4P1HPtknqZ8RHEEvbrsmC%2B0E2qTXULg%40mail.gmail.com.


Re: Looking at Viktor's key traces

2020-01-01 Thread Viktor Ransmayr
Hello Edward,

Am Montag, 30. Dezember 2019 07:50:10 UTC+1 schrieb Viktor Ransmayr:
>
> Am So., 29. Dez. 2019 um 23:34 Uhr schrieb Edward K. Ream <
> edream...@gmail.com>:
>
>> Your key traces show two main traces:
>>
>> ...
>>
>> 2. There is a char, but it doesn't match the abbreviation list. I suspect 
>> no abbreviations are defined.  Example:
>>
>> LeoKeyEvent: binding: 0, stroke: , char: '0'
>> masterKeyHandler None '0' 
>>
>> masterCommand  stroke 
>> expandAbbrev No prefix in '#) Activate & prepare an existing PyVE to 
>> install the latest "Leo-devel" archive - OK. - See "Log-001"\n#) Download, 
>> expand & install the version of "Leo-devel" - OK. - See "Log-002" & 
>> "Log-003"\n#) Close Leo-master ...\n#) Close & re-open Leo-devel ...\n#) 
>> Execute \'Settings > List/Kill Abbreviations > Abbrev-List\'. - See 
>> "Log-02"\n#) Try to use this abbreviation here. - That is enter ts;; - Not 
>> OK.\n#) Change abbreviations in "~/.leo/myLeoSettings" as suggested by EKR 
>> [5].\n#) Close & re-open Leo ...\n#) Execute \'Settings > List/Kill 
>> Abbreviations > Abbrev-List\'. - See "Log-003"\n#) Try to use this 
>> abbreviation here again. - That is enter ts;; - Still not OK.\n\nReported 
>> these findings to the community. - See\n\n* 
>> https://groups.google.com/d/msg/leo-editor/s2gCfAhb97M/QCp73VMKBAAJ\n* 
>> and https://groups.google.com/d/msg/leo-editor/s2gCfAhb97M/rulboVALBAAJ\n
>> '
>>
>> It doesn't like you have defined abbreviations.
>>
>> Please run the show-settings command.  Here is the results for me (as 
>> shown in the console) with only items containing "abbrev" shown.
>>
>> @data   abbreviations = []
>> @string abbreviationsnextplaceholder = ,,
>> @string abbreviationsplaceend = |>
>> @string abbreviationsplacestart = <|
>> @string abbreviationssubstend = }|}
>> @data   abbreviationssubstenv = <209 non-comment lines>
>> @string abbreviationssubststart = {|{
>>
>> [M] @bool   enableabbreviations = True
>> 
>> [M] @data   globalabbreviations = <97 non-comment lines>
>>
>> @bool   globaldynamicabbrevs = True
>>
>> [M] @bool   scriptingabbreviations = True
>>
>> [M] @outlinedata treeabbreviations = 
>>
>> Please run the show-settings command, filter it as I have done to show 
>> only entries containing "abbrev" and report the results.
>>
>
> Thanks for looking into my traces! - Here are the results on my side;
>
> @data   abbreviations = []
> @string abbreviationsnextplaceholder = ,,
> @string abbreviationsplaceend = |>
> @string abbreviationsplacestart = <|
> @string abbreviationssubstend = }|}
> @data   abbreviationssubstenv = <209 non-comment lines>
> @string abbreviationssubststart = {|{
>
> ...
>
> [M] @bool   enableabbreviations = True
>
> ...
>
> [M] @data   globalabbreviations = 
> [
> ts~~={|{x=time.strftime("%Y%m%d%H%M%S")}|}
> myabrv=<|Viktor's Abbreviation|>
> ]
> @bool   globaldynamicabbrevs = True
>
> ...
>
> [M] @bool   scriptingabbreviations = True
>
> ...
>
> @outlinedata treeabbreviations = 
>
> ...
>

I wish you & all members of the Leo Community a Happy New Year! 

* @data   globalabbreviations =  [...]* is the only configuration variable, 
where the values looks slightly different than yours ...

Do you have any feedback based on my reported results - or - do you have 
any other idea how to get abbreviations working on my Leo installations 
(6.1-final or 6.2-b1-devel)?

With kind regards,

Viktor

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/2e03f4c8-76d2-4d4f-93a1-465d45bc39a4%40googlegroups.com.


Unifying the tokens and ast world: fstringify works

2020-01-01 Thread Edward K. Ream
Happy new year to all :-) I'm happy to start 2020 with this announcement...

This morning the fstringify branch passed a significant milestone: it 
fstringified leoApp.py correctly.  This has several important implications:

1. The unification of the token and ast-based worlds has now been 
completely validated with a significant real-world application.

2. No new complications arose in order to support the new Fstringify class. 
In fact, the code has only gotten simpler.

The Fstringify class must deal with a lot of picky details.  That's 
inevitable, given the nature of the task.  However, all such details are 
confined to the Fstringify class itself.

3. Several new top-level functions support the Fstringify class.

These functions are short, easily understood and generally useful. They may 
be useful for other applications.

4. Fstringify class is now significantly better than the "official" 
fstringify tool :

- The Fstringify class fstringifies more strings than the fstringify tool.

- The Fstringify class produces much more useful message than the 
fstringify tool.

These messages clearly show what changes were made, and where.  The 
messages also show what potential changes were *not* made, and where and 
why.

*Summary*

For weeks now I have told Rebecca that "this might be the day" (that 
everything works).  Today is that day.

leoAst.py promises to be an important tool in the python world. The ability 
to change between token-based or tree-based views is something new and 
valuable. The code in leoAst.py is simpler, faster and more general than 
any other related tool that I know of, including asttokens 
, fstringify or black.

leoAst.py has already demonstrated its mettle as the foundation for the 
Fstringify class. leoAst.py promises to collapse the complexity of black. I 
may do that in the near future.

leoAst.py is already self contained. No parts of it require Leo.

Upcoming posts will discuss some technical aspects of the code.  They will 
be pre-writing for official documentation.

More testing, documentation and packaging is needed.  I'll then announce 
leoAst.py to the wider python world.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/9301a736-67e4-4d71-a4c6-ea6a28b65bd9%40googlegroups.com.