elyxer-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [eLyXer-users] Re: Advice for another LyX-oriented project


From: Alex Fernandez
Subject: Re: [eLyXer-users] Re: Advice for another LyX-oriented project
Date: Sun, 11 Apr 2010 13:48:33 +0200

Hi Jack,

Another pending mail to the list!

On Thu, Apr 1, 2010 at 9:29 PM, Jack Desert <address@hidden> wrote:
> I have a patch for coalesce.py and io/fileline.py that allows inter-package 
> imports to be made using relative references. I have included two versions of 
> this patch-- the first allows only relative references. The second (has a "2" 
> suffix) first tries relative references and if that fails, goes with absolute 
> references.

Let's see if i understood correctly: if you are in gen/layout, instead
of having to
  from gen.container import *
you want to do:
  from container import *
Is that right?

> This is a boon to my code, since I don't want to have to install the sub 
> packages in order to run them individually as unit tests.  Patch2 coalesces 
> LyxBlogger just fine. So I went ahead and tested it on 
> elyxer/src/principal.py. On principal.py it didn't throw any errors, but the 
> output file is not as big as it is supposed to be. So perhaps I've missed 
> something.

Yes, your patch had some mistake: eLyXer stopped working after merging it.

> Let me know if this seems useful to you, and we may pursue it further.

It looks very useful. In fact there was another missing feature:
instead of having to call coalesce.py from the same directory as the
root Python package, call it from outside. So instead of having to:
  $ cd src
  $ ./coalesce.py principal.py > ../elyxer.py
I can just:
  $ src/coalesce.py src/principal > elyxer.py
and it will add the src/ on its own.

Unfortunately I did not fully understand what your code did, so I have
preferred to refactor mine (to add the second feature) and then add
your feature. I hope you don't mind that I redid your patch; my
implementation makes more extensive changes but does not touch
fileline.py. If you use git you can find it in merge 016cbb9, or see
it here:
  http://git.savannah.gnu.org/cgit/elyxer.git/commit/

Is this OK with you?

Alex.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]