I came across this whilst experimenting around my recent question regarding 
saving and restoring sessions in Leo. There seems to be a problem running 
with Python 2.6 and pyQt 4.8.6.

I am running Kubuntu on two different machines. If I run with python 2:

jkn@lanark:~/leo-editor/leo-editor$ python launchLeo.py 

setting leoID from os.getenv('USER'): 'jkn'

reading settings in 
/home/jkn/leo-editor/leo-editor/leo/config/leoSettings.leo

reading settings in /home/jkn/.leo/workbook.leo


** isPython3: False

Leo 5.4, build 20161225051646, Sun Dec 25 05:16:46 EST 2016

Git repo info: branch = master, commit = a14ca3603bc9

Python 2.7.6, PyQt version 4.8.6

linux2


then after the initial screen, Leo seems to hang, with a CPU usage (seen 
via 'top') of close to 100%.


If I use the same version with Python 3 (and a later version of PyQt):

Leo Log Window

Leo 5.4, build 20161225051646, Sun Dec 25 05:16:46 EST 2016

Git repo info: branch = master, commit = a14ca3603bc9

Python 3.4.3, PyQt version 5.2.1

linux

setting leoID from os.getenv('USER'): 'jkn'

load dir: /home/jkn/leo-editor/leo-editor/leo/core

global config dir: /home/jkn/leo-editor/leo-editor/leo/config

home dir: /home/jkn

reading settings in 
/home/jkn/leo-editor/leo-editor/leo/config/leoSettings.leo

Then all is well.

I have tried something similar on a second machine with similar results; 
the common factor appears to be pyQt 4.8.6 rather than the version of 
Python.

FWIW --debug on the Leo command line shows nothing very interesting.

Having found out that I can get around this by using Python3 (and hence 
PyQt5) this is not a major issue at the moment, but I wondered if it was 
known about? I can supply more detail if useful.

Oh, I tried looking at what was happening with 'strace'. This seems to show 
a lot of activity after startup, and before I have to kill the process:

[many repetitions]
write(3, "\1\0\0\0\0\0\0\0", 8)         = 
8                                                                               
                                                                           

write(3, "\1\0\0\0\0\0\0\0", 8)         = 
8                                                                               
                                                                           

write(3, "\1\0\0\0\0\0\0\0", 8)         = 
8                                                                               
                                                                           

write(3, "\1\0\0\0\0\0\0\0", 8)         = 
8                                                                               
                                                                           

write(3, "\1\0\0\0\0\0\0\0", 8)         = 
8                                                                               
                                                                           

--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=3408, si_uid=1000} 
---                                                                             
                                           

+++ killed by SIGTERM +++   

    Cheers
    Jon N

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

Reply via email to