Re: can not load enabled plugin: viewrendered3 bigdash

2016-07-13 Thread rengel

>
> Rev 582fe79 attempts a fix.  The only significant change is the following:
>
> ​try:
> from PyQt5 import QtWebKit
> except ImportError:
> # 2016/07/13: Reinhard: Support pyqt 5.6...
> try:
> from PyQt5 import QtWebEngineCore as QtWebKit
> except ImportError:
> QtWebKit = None
> try:
> import PyQt5.QtWebKitWidgets as QtWebKitWidgets
> except ImportError:
> try:
> # 2016/07/13: Reinhard: Support pyqt 5.6...
> import PyQt5.QtWebEngineWidgets as QtWebKitWidgets
> QtWebKitWidgets.QWebView = QtWebKitWidgets.QWebEngineView
> except ImportError:
> QtWebKitWidgets = None​
>

I'm afraid, it's not that easy. We need some more  assignments (in red):

try:
from PyQt5 import QtWebKit
except ImportError:
# 2016/07/13: Reinhard: Support pyqt 5.6...
try:

from PyQt5 import QtWebEngineCore as QtWebKit
except ImportError:
QtWebKit = None
try:
import PyQt5.QtWebKitWidgets as QtWebKitWidgets
except ImportError:
try:
# 2016/07/13: Reinhard: Support pyqt 5.6...

import PyQt5.QtWebEngineWidgets as QtWebKitWidgets
QtWebKitWidgets.QWebView = QtWebKitWidgets.QWebEngineView

# used by richtext.py
QtWebKit.QWebSettings = QtWebWidgets.QWebEngineSettings
# used by viewrendered(2|3).py, bigdash.py
QtWebWidgets.QWebPage = QtWebWidgets.QWebEnginePage
# used by viewrendered(2|3).py
QtWebWidgets.QWebSettings = QtWebWidgets.QWebEngineSettings

except ImportError:
QtWebKitWidgets = None​
 
Reinhard

-- 
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: can not load enabled plugin: viewrendered3 bigdash

2016-07-13 Thread Stephen Gava

On 14/7/16 2:15 AM, Edward K. Ream wrote:

[...snip...]

I have not tested this in detail, and certainly not with pyqt 5.6.  
Please report any problems.


Edward


thanks Edward.  ;)   i will test this, with pyqt 5.6  when i get a 
chance tomorrow arvo.


my only concern was whether full compatibility for whatever api 
functions you are using from QtWebKit is retained
in the QTWebEngine code that replaces it from pyqt 5.6 onward. hopefully 
the nice qt and pyqt folk have been kind.


--
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: can not load enabled plugin: viewrendered3 bigdash

2016-07-13 Thread Edward K. Ream
On Wed, Jul 13, 2016 at 5:45 AM, Stephen Gava  wrote:

> yes, this would work if the interface to and behaviour of
> QtWebEngineWidgets and QtWebKitWidgets is identical, but i don't know.
>
> On 13/7/16 8:20 PM, rengel wrote:
>
> yes. i'm aware of what causes the issue. what i want to know is what's
>> happening with it being resolved?
>>
>> the renderer needs to be fixed to support QtWebEngine, as john lunzer
>> points out above, so that it will work on pyqt 5.6 and above.
>>
>> does anyone know if this is being fixed?
>>
>
> Well, I don't know, if it this is being fixed, but I know, how this can be
> fixed:
> In leoQt.py outcomment and insert the following lines:
>
>  ...
> try:
> # from PyQt5 import QtWebKit
> from PyQt5 import QtWebEngineCore as QtWebKit
> except ImportError:
> QtWebKit = None
> try:
> #import PyQt5.QtWebKitWidgets as QtWebKitWidgets
> import PyQt5.QtWebEngineWidgets as QtWebKitWidgets
> QtWebKitWidgets.QWebView = QtWebKitWidgets.QWebEngineView
> except ImportError:
> QtWebKitWidgets = None
> ...
>
> At least, this allows me to show the viewrendered pane. If there are other
> implications, I don't know.
>
>
Rev 582fe79 attempts a fix.  The only significant change is the following:

​try:
from PyQt5 import QtWebKit
except ImportError:
# 2016/07/13: Reinhard: Support pyqt 5.6...
try:
from PyQt5 import QtWebEngineCore as QtWebKit
except ImportError:
QtWebKit = None
try:
import PyQt5.QtWebKitWidgets as QtWebKitWidgets
except ImportError:
try:
# 2016/07/13: Reinhard: Support pyqt 5.6...
import PyQt5.QtWebEngineWidgets as QtWebKitWidgets
QtWebKitWidgets.QWebView = QtWebKitWidgets.QWebEngineView
except ImportError:
QtWebKitWidgets = None​

Some notes:

1. QtWebKit is used only in the richtext plugin, so the assignment QtWebKit
= None is unlikely to be involved directly.  However, I see no reason not
to change the code as shown above.

2. In general, we want to retain existing imports to ensure backward
compatibility.  For this reason, the new imports, namely:

import PyQt5.QtWebEngineWidgets as QtWebKitWidgets
QtWebKitWidgets.QWebView = QtWebKitWidgets.QWebEngineView


are tried only if this fails:

import PyQt5.QtWebKitWidgets as QtWebKitWidgets

I have not tested this in detail, and certainly not with pyqt 5.6.  Please
report any problems.

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: can not load enabled plugin: viewrendered3 bigdash

2016-07-13 Thread Stephen Gava
yes, this would work if the interface to and behaviour of 
QtWebEngineWidgets and QtWebKitWidgets is identical, but i don't know.


On 13/7/16 8:20 PM, rengel wrote:


yes. i'm aware of what causes the issue. what i want to know is
what's
happening with it being resolved?

the renderer needs to be fixed to support QtWebEngine, as john lunzer
points out above, so that it will work on pyqt 5.6 and above.

does anyone know if this is being fixed?


Well, I don't know, if it this is being fixed, but I know, how this 
can be fixed:

In leoQt.py outcomment and insert the following lines:

 ...
try:
# from PyQt5 import QtWebKit
from PyQt5 import QtWebEngineCore as QtWebKit
except ImportError:
QtWebKit = None
try:
#import PyQt5.QtWebKitWidgets as QtWebKitWidgets
import PyQt5.QtWebEngineWidgets as QtWebKitWidgets
QtWebKitWidgets.QWebView = QtWebKitWidgets.QWebEngineView
except ImportError:
QtWebKitWidgets = None
...

At least, this allows me to show the viewrendered pane. If there are 
other implications, I don't know.


Reinhard


--
You received this message because you are subscribed to a topic in the 
Google Groups "leo-editor" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/leo-editor/J_wVIzqQzXg/unsubscribe.
To unsubscribe from this group and all its topics, 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: can not load enabled plugin: viewrendered3 bigdash

2016-07-13 Thread rengel

>
> yes. i'm aware of what causes the issue. what i want to know is what's 
> happening with it being resolved? 
>
> the renderer needs to be fixed to support QtWebEngine, as john lunzer 
> points out above, so that it will work on pyqt 5.6 and above. 
>
> does anyone know if this is being fixed? 
>

Well, I don't know, if it this is being fixed, but I know, how this can be 
fixed:
In leoQt.py outcomment and insert the following lines:

 ...
try:
# from PyQt5 import QtWebKit
from PyQt5 import QtWebEngineCore as QtWebKit
except ImportError:
QtWebKit = None
try:
#import PyQt5.QtWebKitWidgets as QtWebKitWidgets
import PyQt5.QtWebEngineWidgets as QtWebKitWidgets
QtWebKitWidgets.QWebView = QtWebKitWidgets.QWebEngineView
except ImportError:
QtWebKitWidgets = None
...

At least, this allows me to show the viewrendered pane. If there are other 
implications, I don't know.

Reinhard


-- 
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: Why is Leo great?

2016-07-13 Thread David Szent-Györgyi


On Friday, July 8, 2016 at 10:26:45 AM UTC-4, Karsten Wolf wrote:
>
>
>
> On Tuesday, July 5, 2016 at 7:46:21 PM UTC+2, Propadovic Nenad wrote:
> ... 
>
>> I'd appreciate examples which *show* me why Leo is great. I really want 
>> to love it, honestly. I *tried* to find it extremely useful ten years ago, 
>> when I stumbled upon it after reading about the greatness of outlines 
>> (articles from Steve Litt). Yet by now I have the impression that it's most 
>> useful in a greenfield environment, when you have control of structure, 
>> anyway. Being a contractor, hopping from project to project, I almost never 
>> do such development.
>>
>
> I'm using Leo for about a month now and know the feeling of really having 
> *tried*; my first Leo encounter was with mac-only Leo 1.5 more than 10 
> years ago.
>
> After rediscovering it my personal Leo success story is a project (python 
> + bottle + bootstrap to replace a Filemaker app) which lay dormant for 
> several month and I was depressed every time I re-started development... it 
> was a mess. The main problem being diverging HTML templates.
>
> After I started unifying my templates with leo using cloned sections so 
> several pieces of every template are identical, overview came back and 
> while the project isn't pure fun it started making a lot of progress in the 
> last two weeks. . . .
>
> Despite the many uses let's not forget the origins of Leo: A literate 
> programming editor.
>
> For me it's the first time I'm *doing* instead of *reading about* literate 
> programming. With real projects. And it's increasing my productivity. And I 
> have to be cautious because Leo is capable of ugly accidents (see: Leo 
> highlights and annoyances as seen from a new user 
>  )
>
> And from my POV Literate Programming is still a field without a culture; 
> everybody does something which resembles some aspects of what Knuth wrote 
> about decades ago... but there aren't many agreed on structures and 
> procedures. So we are all dabbling in a 40 year old pioneer field which 
> brought us TeX & Metafont.
>
> That should not be all there is.
>

I used Leo 4.3 and 4.4 extensively as source code management system and 
macro processor for writing utility programs in the form of Windows Script 
Host files. 

For those of you unfamiliar with this curious technology of Microsoft's, 
these files are XML, and a given Windows Script Host file can package 
multiple scripts in multiple languages as well as resources. Unless special 
measures are taken, it is necessary to modify the source code of a given 
script to suit the requirements of XML. I structured the Leo file so that 
no such modification was required, which made it easy for me to introduce a 
new script to the outline for me to use when writing a particular utility 
program. I also figured out how to use Leo to generate multiple Windows 
Script Host files, each of which could include any or all of the scripts. 

I imagine that reading this would have Edward Ream cringing, because I'm 
describing a technique he left behind years ago: I used Leo directives that 
remainin the current source code, though they are deprecated and I do not 
know that they still work: @root, @tangle, @untangle. These commands are a 
clear inheritance from Knuth's Literate Programming. I recall Edward 
writing that they allowed a naive user to corrupt files. I used them with 
care, as a solitary programmer, and they worked flawlessly for me. 

I was a solitary programmer, working on multiple machines, needing most of 
all to take my application development environment with me easily, adding 
to it as I went. Leo 4.3 and 4.4 and Python were extremely easy for me to 
install on the Windows XP computers I used, because all I needed was: 
CPython; Python-Win32; Leo; and my .LEO file. Leo 4.3 and 4.4 used the TK 
toolkit that is part of Python's Batteries Included, and for all the flaws 
of the release of TK bundled with Python, Edward's painstaking work had it 
running well, even if it looked plain and the limitations of TK were a drag 
on his efforts. 

Leo 4.3 and 4.4 gave me a first-rate outliner with clones, and once I put 
in the effort to build my WSH development environment, Leo took care of the 
stupid bookkeeping that would clutter my head with useless trivia of the 
sort that computers can handle perfectly. Add to that the ease of 
organizing to-do lists and development notes within the outline, and Leo 
helped me make myself a more effective worker. I don't know that I can 
offer a praise higher than that. 

In years since, my work life has had me using a Macintosh computer, for 
which Leo's GUI was not a perfect fit. I am hoping that recent improvements 
in window management at the MacOS level ease to work with current Leo, 
using the modern at-commands for file management. I pine for the 
industrial-strength outliner with clones in Leo! 

My work has me returning to 

Re: can not load enabled plugin: viewrendered3 bigdash

2016-07-13 Thread Stephen Gava

On 13/7/16 5:35 PM, rengel wrote:

IMHO this is an issue (bug) in Leo. From leoQt.py

...
try:
from PyQt5 import QtWebKit
except ImportError:
QtWebKit = None
...
Not finding QtWebKit any longer (in pyqt 5.6), Leo simply sets 
QtWebKit to None. Presto, you have your error.


Reinhard


yes. i'm aware of what causes the issue. what i want to know is what's 
happening with it being resolved?


the renderer needs to be fixed to support QtWebEngine, as john lunzer 
points out above, so that it will work on pyqt 5.6 and above.


does anyone know if this is being fixed?


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