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: Jack Desert
Subject: Re: [eLyXer-users] Re: Advice for another LyX-oriented project
Date: Wed, 31 Mar 2010 23:18:14 -0500

> Python developers recommend using modular installation for your packages.

LyxBlogger started out as a single file, but I've been breaking it off into 
more manageable pieces. Today I got your coalesce.py script working. I prefer 
distributing from a single file, as it seems less messy that way. 

Some notes I had in adapting coalesce.py to my own project:

-----------------------------------------------------------------
C O A L E S C E . P Y

When one file in a package calls another file in the same
package, coalesce.py requires that the second file be called
from its full package address, not its local relative. For
example, if there are two source files in Package_A:

     file_1.py
     file_2.py

Then from within file_1.py, to use file_2.py, you must import it like this:

     import Package_A.file_2


You will get a "file not found" error if you import it like this:

     import file_2

Even though that normally works in Python.

--------------------------------------------------------------------
M A K E

To create the executable, simply run ./make from this folder.


The other quirk to be aware of is that coalesce.py must be in your src
directory. That is, in the same directory as the main file you are
going to turn into a standalong executable, and also the same directory
where your package folders reside. (I tried moving coalesce.py into a 
subdirectory and couldn't get it to work.)

---------------------------------------------------------------------

-Jack


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jack Desert     --    Writer, Entrepeneur
Author and Spokesman: www.LetsEATalready.com
Software Developer:   http://GrooveTask.org
Email: address@hidden
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




reply via email to

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