On Tuesday, June 6, 2017 at 6:13:35 AM UTC-5, Edward K. Ream wrote:
>
> This script loads ~/leo-plugins/test-plugin without changing PYTHONPATH.
> It changes sys.path instead:
>
All very well, but typically the module name must be on the *default*
sys.path, that is, PYTHONPATH.
All this should
On Tuesday, June 6, 2017 at 5:50:12 AM UTC-5, Edward K. Ream wrote:
>
> On Sat, Jun 3, 2017 at 2:34 PM, Terry Brown wrote:
>
>>
>> => Leo searches Python's path for, well, for modules, but in effect for
>>plugins. I think the case where they must be in leo/plugins might be
>>when the name
On Sat, Jun 3, 2017 at 2:34 PM, Terry Brown wrote:
>
> => Leo searches Python's path for, well, for modules, but in effect for
>plugins. I think the case where they must be in leo/plugins might be
>when the name in enabled-plugins ends in .py
>
Thanks, Terry. A case where "Read the co
Well, even though I probably used about an hour too much time on this, at
least I learned more about the inner workings of Leo.
On Sat, Jun 3, 2017 at 6:11 PM, Adrian Calvin
wrote:
>
> Ah I see, yes. You are correct.
>
> On Friday, June 2, 2017 at 6:41:27 PM UTC-5, Adrian Calvin wrote:
>>
>> I
Ah I see, yes. You are correct.
On Friday, June 2, 2017 at 6:41:27 PM UTC-5, Adrian Calvin wrote:
>
> Is there a way to add additional plugin directories to leo just as one
> might add additional paths to python?
>
--
You received this message because you are subscribed to the Google Groups
On Sat, 3 Jun 2017 16:43:14 -0500
Adrian Calvin wrote:
> Right, thanks. I am pretty close. I am just trying to make the code
> more tidy. It was not quite as I thought. Since the plugin name
> cannot have more than one ".", one can scan for the number of "." to
> decide which course of action
Ideally, I suppose, one should not need to specify the package. I guess I
could write a simple path traversal of the python path and whenever it
finds it, use it. But then there are possible name collisions. Any
thoughts?
On Saturday, June 3, 2017 at 5:11:55 PM UTC-5, Adrian Calvin wrote:
>
It might be better to replace the "." with "/" to seem more like a true
file path.
if "/" in fn:
return fn.replace("/", ".")[:-3]
@enabled-plugins
adrianmod/hey_colorize.py
On Friday, June 2, 2017 at 6:41:27 PM UTC-5, Adrian Calvin wrote:
>
> Is there a way to add additional plugin direc
Ok, here is the updated regularizeFilenames:
@language python
@tabwidth -4
def regularizeName(self, fn):
'''Return the name used as a key to this modules dictionaries.'''
#this is the only change. If you have more than one "." in the name,
#it will use your package instead of leo.pl
Right, thanks. I am pretty close. I am just trying to make the code more
tidy. It was not quite as I thought. Since the plugin name cannot have
more than one ".", one can scan for the number of "." to decide which
course of action to take.
On Sat, Jun 3, 2017 at 2:34 PM, Terry Brown wrote:
>
On Sat, 3 Jun 2017 05:52:07 -0500
"Edward K. Ream" wrote:
> On Fri, Jun 2, 2017 at 9:44 PM, Terry Brown
> wrote:
>
> > On Fri, 2 Jun 2017 16:41:27 -0700 (PDT)
> > Adrian Calvin wrote:
> >
> > > Is there a way to add additional plugin directories to leo just as
> > > one might add additional pa
Thanks I'll do my best..New to both python and Leo.
On Sat, Jun 3, 2017 at 1:18 PM, Edward K. Ream wrote:
> On Sat, Jun 3, 2017 at 10:57 AM, Adrian Calvin > wrote:
>
>> I see. I have never submitted code to github, but I will work on a
>> solution, if you are accepting of the idea?
>>
>
> Yes
On Sat, Jun 3, 2017 at 10:57 AM, Adrian Calvin
wrote:
> I see. I have never submitted code to github, but I will work on a
> solution, if you are accepting of the idea?
>
Yes, I think the idea is a good one.
Edward
--
You received this message because you are subscribed to the Google Groups
I see. I have never submitted code to github, but I will work on a
solution, if you are accepting of the idea?
On Friday, June 2, 2017 at 6:41:27 PM UTC-5, Adrian Calvin wrote:
>
> Is there a way to add additional plugin directories to leo just as one
> might add additional paths to python?
>
On Fri, Jun 2, 2017 at 9:44 PM, Terry Brown wrote:
> On Fri, 2 Jun 2017 16:41:27 -0700 (PDT)
> Adrian Calvin wrote:
>
> > Is there a way to add additional plugin directories to leo just as
> > one might add additional paths to python?
>
> Yes.
>
> I think, from memory, the rule for plugins named
On Fri, Jun 2, 2017 at 6:41 PM, Adrian Calvin
wrote:
> Is there a way to add additional plugin directories to leo just as one
> might add additional paths to python?
>
I thought there was an enhancement request for something like this, but I
can't find it.
Edward
--
You received this message
On Fri, 2 Jun 2017 16:41:27 -0700 (PDT)
Adrian Calvin wrote:
> Is there a way to add additional plugin directories to leo just as
> one might add additional paths to python?
Yes.
I think, from memory, the rule for plugins named in @enabled-plugins is
that foo.py will be looked for in /plugins.
Is there a way to add additional plugin directories to leo just as one
might add additional paths to python?
--
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-e
18 matches
Mail list logo