Got it. Thank you!
Reinhard
On Wednesday, February 3, 2016 at 6:24:31 PM UTC+1, Chris George wrote:
>
> It is visible when you are on the front page of the group, but vanishes
> when you are reading an individual posting.
>
> Chris
>
> On Tuesday, February 2, 2016 at 10:22:45 PM UTC-8,
>
Thanks for the tip, but I don't see a 'Tags Members About' toolbar.
Reinhard
On Tuesday, February 2, 2016 at 9:39:36 PM UTC+1, Richard Andersen wrote:
>
> I'm guessing the Leo veterans already utilize the tagging in this forum,
> but I wanted to take a moment to mention it to others who may
@Terry and Edward
Thank you both for your detailed answers!
I tried both methods, and both work like a charm.
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
On Tuesday, August 25, 2015 at 5:19:47 PM UTC+2, Edward K. Ream wrote:
On Mon, Aug 24, 2015 at 8:56 AM, reinhard...@googlemail.com javascript:
wrote:
... would be a nice feature.
Please file a wishlist bug at
https://github.com/leo-editor/leo-editor/issues.
Sorry, I thought I
May be this is a stupid question:
I'm trying to import a large Qt application into Leo. For testing, I
created a script in a single node with the headline '@clean QtTest.pyw)'
and the following body:
@language python
@tabwidth -4
import sys
from PyQt5.QtCore import QObject
from
Thank you!
I added the '.pyw' extension to the extensions list in the Python importer.
Everything works fine now.
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
... would be a nice feature.
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
When searching forward (F3) in the Find tab, the search stops at the last
found item: 'not found (wrapping)'.
--
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
May I suggest to use not only 'py' but also 'pyw' as default extension for
@clean imports of Python files.
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
How much more informative if instead it could become something like
#*** Imports and magic
import mypackage
my_magic_number = 42
#*** class definition
class A(object):
#*** *** method 1
def method1(self):
pass
# description of aims of method
#*** *** method 2
Perception becomes almost as important as function.
May I add:
Function that isn't perceived, does not exist!
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 excellent suggestion is to reach out to magazine editors, get them
excited...
How?
Speaking of marketing: First impressions count!
So: Update the documentation.
I.E.: Searching for '@clean' from the homepage of Leo gives:
'Your search did not match any documents'
The user
I guess, we have different concepts of what means 'to beautify code'.
Instead, just change ''' to as you like. How hard is that?
Well, it's not about using ''' vs. .
Among other things, for me to beaitify code code also means to take care
of the consistency in naming and writing
How about string quotes, especially for doc strings?
PEP8 states:
For triple-quoted strings, always use double quote characters to be
consistent with the docstring convention in PEP 257
http://legacy.python.org/dev/peps/pep-0257.
Reinhard
--
You received this message because you are
Your'e welcome! Didn't know someone else was following my postings...:)
Reinhard
On Sunday, May 31, 2015 at 1:46:55 PM UTC+2, john lunzer wrote:
BTW, thank you Reinhard for getting me moving in the right direction.
Knowledgeable as always :)
--
You received this message because you are
Since Leo works with PyQT/Qt, a look there might help, i.e.
http://www.qtcentre.org/threads/3073-How-to-get-mouse-s-position
Reinhard
On Saturday, May 30, 2015 at 3:20:03 PM UTC+2, john lunzer wrote:
c.frame.body.widget.cursorRect()
will give you the location of the cursor relative to the
Maybe you should using different decorators.
No, it doesn't work. In leo/commands/helpCommands I replaced:
def cmd(name):
'''Command decorator for the helpCommands class.'''
return g.new_cmd_decorator(name,['c','helpCommands',])
with cmd = g.cmd where g.cmd is defined as you
Forget the decorator!
I'm not sure what you try to accomplish.
Your publicCommands tables in Leo already associate command_names with
functions or methods, so you don't need a decorator for that. As you told
Terry (somewhere above) you need to retrieve the information if you need a
'self'
Who wants to define *two *wrappers in the same decorator?
Just to be clear, this whole discussion is moot because the following works:
@cmd('clone-find-all')
@cmd('find-clone-all')
And a good thing too, because I seen *no way* to define *two *wrappers in
the same decorator. And even if
There is no need to 'compute' the class, because the class is stored in the
decorator, wenn the command is created.
I post my code from the other thread here again.
When Leo sees a command, it looks up the wrapper in the dict and simply
calls the wrapper with an event arg. The *wrapper
In particular, only the AbbrevCommands class needs a finishCreate method.
For your next work:
Aren't abbreviations just synonyms that could go into the @cmd definition:
@cmd('clone-find-all','find-clone-all', 'cfa', 'fca')
Reinhard
--
You received this message because you are subscribed
A caveat: Each additional decorator adds an additional wrapper code to your
code base.
If over-used this way, you get a lot more code (not visible during
programming but there none the less.)
Reinhard
--
You received this message because you are subscribed to the Google Groups
leo-editor
- Decorators will allow a list of command names:
@cmd(['clone-find-all','find-clone-all'])
May I suggest not to use the list notation but instead just
@cmd('clone-find-all','find-clone-all')
The '*args' (or more aptly named '*command_names') parameter in the
function definition of 'cmd'
See my comment ('No class needed') in thread 'Better @g.command.decorator'
where you are still struggling with the problem.
Reinhard
I'm not sure it's worth doing, but it's good to know.
--
You received this message because you are subscribed to the Google Groups
leo-editor group.
To
So it looks like we're stuck. Any ideas?
This works for both Python2 and Python3:
from functools import wraps
isPython3 = True
def cmd(command_name):
def inner_cmd(func):
@wraps(func)
def _decorator(*args, **kwargs):
type0 = args and str(type(args[0])) or
So it looks like we're stuck. Any ideas?
Apart from using a sophisticated decorator you could just pass the class
name as an optional parameter in
@cmd(command_name, class_name=None)
I'm no expert here, but this would require about 150 changes in the Leo
code base and could be done
by a
It's even easier: You don't need a class decorator but can retrieve the
class nam from th decorator's __dict__:
commands_dict = {}
ivars_dict = {}
# Use as function/method decorator
def cmd(command_name):
class Decorator:
def __init__(self, func):
self.func = func
Instead of using per plass decorators you might use a class decorator that
enhances the function/method decorators with the class name:
commands_dict = {}
ivars_dict = {}
# Use as function/method decorator
def cmd(command_name):
class Decorator:
def __init__(self, func):
This works without static/class methods and is a little less involved:
A nice idea, but __qualname__ is Python 3 only.
The main point is to tell a function from a method. If you don't want to
use __qualname__ one might use the inspect module.
But assuming the Python convention to name
I would *much *rather do this than use class methods anywhere in Leo.
YMMV, but you have little chance of changing my mind. Yes, there is a bit
more code involved, but it is completely encapsulated. In contrast,
static/class methods have global consequences. I'm not going there.
*A two-level solution*
Rather than using a single command-decorator, we must use separate
decorators for each defining class:
commands_dict = {}
class TestClass:
def cmd(name):
def _decorator(func):
commands_dict[name]= func
ivars_dict[name] =
In the 5th edition of 'Learning Python', pages 1289ff, Mark Lutz discusses
extensively solutions for decorators that work on *both *simple functions
and class-level methods (with passing instances!).
Reinhard
--
You received this message because you are subscribed to the Google Groups
When installing Leo I get a couple of syntax errors mainly related to
Python 3, i.e
in the print command because of missing '()' or the except command because
of missing 'as:
print message
instead of
print(message)
or
except OSError, e
instead of
except OSError as e
These errors are
I'll continue to use clones. For example, when working on a to-do item I
almost always clone it so it is ready to hand. However, the recent Aha's
show (to my satisfaction) that clones should not be used in creating an
initial organization of any kind of data. This is quite a surprise
I just wondered, because you were talking about 'any kind of data'.
Anyway, thanks for the new version!
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
Thanks for the clarification!
Did you try this on Leo itself, having some hundreds of thousands of lines
in one Leo file?
No, because we aren't going to use @clean for Leo.
I tried it on a significant project: pylint. Loading a single .leo is
fast, regardless of size. I
Well, I was suggesting to use '@clean' instead of '@plain', to avoid the
association to 'dirty' or 'changed'.
On Saturday, February 21, 2015 at 12:21:33 PM UTC+1, Edward K. Ream wrote:
On Sat, Feb 21, 2015 at 3:21 AM, reinhard...@googlemail.com javascript:
wrote:
Before you go for
???
3. A minor advantage: @file makes Leo files smaller. *Leo stores the entire
@clean *tree* in the .leo file*, but only stores the top-level @file
*node* in the .leo file.
Does this mean to keep alle the files of an entire project in *one* Leo
file?
Did you try this on Leo itself,
Before you go for '@clean' you might consider '@plain' instead.
'@clean' immediately makes me think of its contrary: '@dirty'. What would
be the alternative to a '@clean' file?
Reinhard
On Friday, February 20, 2015 at 12:20:51 PM UTC+1, Edward K. Ream wrote:
On Fri, Feb 20, 2015 at
I am not aware that F2 has any standard meaning concerning outlines.
Just check the Windows Explorer where you can edit items in the tree view
as well in the list view by pressing F2.
Reinhard
--
You received this message because you are subscribed to the Google Groups
leo-editor
On Monday, February 2, 2015 at 7:59:34 PM UTC+1, Dufriz wrote:
... but on second thoughts I no longer know if it's worth it.
It isn't. Just study the history of similar attempts on this forum.
Even really, really simple changes of concepts that might alienate newbies
are not implemented
Thanks!
This belongs into the documentation.
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
If I use (two '--' !)
python launchLeo.py --ipython
I get
zmq.error.ZMQError: permission denied
can not init leo.cor.leoIPython.py
Reinhard
--
You received this message because you are subscribed to the Google Groups
leo-editor group.
To unsubscribe from this group and stop receiving
How do I run Leo and IPython?
The documentation says:
run Leo in a console window
http://leoeditor.com/installing.html#running-leo-from-a-console-window with
the –ipython command-line option enabled
I tried
python launchLeo.py -ipython
python launchLeo.py -ipython
python launchLeo.py
Yes, I used 'LeoSetup-5.0.final.exe' as of 2014-11-24.
On Saturday, December 13, 2014 3:39:57 PM UTC+1, Edward K. Ream wrote:
On Fri, Dec 12, 2014 at 2:08 PM, reinhard...@googlemail.com javascript:
wrote:
Leo Log Window
Leo 5.0-final, build 20141124101406, Mon Nov 24 10:14:06 CST 2014
https://lh3.googleusercontent.com/-SuyVRGxaOgs/VIxloM52OQI/AEo/v7DwCYgmfjg/s1600/SyntaxErros.png
Installing Leo, using the latest (as of today) 'leo-editor-master.zip' from
Github gives a lot syntax errors (see attached file) which seem to be
related to Python 3 syntax.
If I just
If I use the full path in the head of the node
@auto D:\Benutzer\Reinhard\mycode.py
(German Windows!) everything works as expected.
If I use
@auto D:\User\Reinhard\mycode.py
I get an 'not found' error.
How is the full path formed, when I use only
@auto mycode.py
without any path
I have the following very simple file named mycode.py in my working
directory:
#!/usr/bin/python
# -*- coding: utf-8 -*-
def p1():
print(Hello world!)
def p2():
print(Hello World, again!)
if __name__ == __main__:
p1()
p2()
Of course this file works fine when run with
Sorry, I'm just looking at the new code...
There is no function 'long' in Python3.
--
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
# For PyQt5, this block:
#QObject.connect(self.leo_spell_btn_Add, SIGNAL(clicked()),
MainWindow.do_leo_spell_btn_Add)
#QObject.connect(self.leo_spell_btn_Change, SIGNAL(clicked()),
MainWindow.do_leo_spell_btn_Change)
#QObject.connect(self.leo_spell_btn_Find, SIGNAL(clicked()),
On Thursday, November 20, 2014 6:16:46 PM UTC+1, Edward K. Ream wrote:
On Wed, Nov 19, 2014 at 1:02 PM, reinhard...@googlemail.com javascript:
wrote:
Do I have to clean up everything manually?
Yes, but you can use file-delete to delete any file by name.
After choosing 'Edit
On Thursday, November 20, 2014 6:42:54 PM UTC+1, Edward K. Ream wrote:
On Thu, Nov 20, 2014 at 11:17 AM, Matt Wilkie map...@gmail.com
javascript: wrote:
Why on earth should Leo put notepad in the Open With menu?
In the tradition of 5 whys http://en.wikipedia.org/wiki/5_Whys:
Amusing. But to repeat, afaik, Leo does *not* offer notepad as a default
anywhere. In other words, I thought I was wrong, but I wasn't... :-)
Well, it does, in a context-menu of 'quickstart.leo'.
Reinhard
--
You received this message because you are subscribed to the Google Groups
On Thursday, November 20, 2014 9:52:19 PM UTC+1, Edward K. Ream wrote:
On Thu, Nov 20, 2014 at 12:42 PM, reinhard...@googlemail.com
javascript: wrote:
Amusing. But to repeat, afaik, Leo does *not* offer notepad as a
default anywhere. In other words, I thought I was wrong, but I
I just tried out Leo5.0-b2.
May I suggest to change the fields in the status line (below the
minibuffer) into labels, because they are not input fields (or are they?)
--
You received this message because you are subscribed to the Google Groups
leo-editor group.
To unsubscribe from this
I just tried out Leo5.0-b2.
May I suggest that the fields in the status line below the minibuffer are *not
styled as input fields*, because they are not (or are they?). Simple labels
would do.
--
You received this message because you are subscribed to the Google Groups
leo-editor group.
To
On my machine, I've installed Python 2.7 and Python 3.4 in parallel, 3.4
being the default when calling 'python' in the Explorer.
But the installation routine of Leo5.0-b2 picks up and suggests Python 2.7
during installation as the Python to install. Why?
--
You received this message because
When installing Leo5.0-b2, it automatically picks-up my settings from my
Leo4.x version. That's ok.
But I would appreciate the option to install the new version in parallel to
the old version *without* using my old settings. Is this possible?
--
You received this message because you are
Thanks Terry,
guess, I have to change the leoSettings.leo file.
I prefer to keep all my settings close to my installation directories (and
not in my home directory).
Reinhard
--
You received this message because you are subscribed to the Google Groups
leo-editor group.
To unsubscribe from
After installing Leo5.0-b2 on my Windows 8 machine I was just playing
around with 'quickstart.leo'.
Here are just two remarks after following the tutorial for only five
minutes:
The way this tutorial is structured (with '@path ~'), the examples clutter
my home directory with files I don't
It's notepad that you shouldn't trust. Try using an editor that can
handle linux line breaks intelligently. I recommend scite:
http://www.scintilla.org/SciTE.html You'll never use notepad again :-)
Well, that's the editor that is mentioned in the first command of the
context menu,
This will only happen if you actually create the files by changing one of
the @@file nodes to a live @file node.
I was just follwing what the tutorial suggests.
If you created the file, it's up to you to deal with it.
Of course!
Perhaps the @path node is confusing, but you have
On Wednesday, November 19, 2014 11:26:57 PM UTC+1, Matt Wilkie wrote:
Don't know the answer the why question, but just to be clear, you're on
Windows right?
On Wed, Nov 19, 2014 at 9:16 AM, reinhard...@googlemail.com javascript:
wrote:
On my machine, I've installed Python 2.7 and
63 matches
Mail list logo