Hi Günther, On Wed, Sep 16, 2009 at 3:17 PM, Guenter Milde <[email protected]> wrote: > Actually, I would go the usual way for somewhat larger Python apps: > Put the bulk of the code into the Python-Path (i.e. as a library module > or package) and a wrapper script into the (binary) PATH.
Good idea. > Why not: > > python -m module-name > Searches sys.path for the named module and runs the correspond‐ > ing .py file as a script. > > ? > > and in the elyxer.py module: > > # Run main, if called from the command line:: > > if __name__ == '__main__': > main() Looks excellent! I will give it a try, probably this weekend. > As LyX's configure script is written in Python, it should be very easy > to test for the existence of the elyxer module! This part (configure.py) will change little from what I submitted, but maybe the bridge is not necessary any more. > Well, here is my theory: > > 1. if bridge_AB is needed to get tool_A and tool_B to work together but not > for any of this tools separately, there is no general preference > whether to supply with tool_A or tool_B. > > 2. if tool_B needs bridge_AB at a special location, it might be simpler to > bundle it with tool_B (avoids a search algorithm or database to find > the right location when installing tool_A). > > 3. if tool_A is a tail and tool_B a dog, tool_A might have difficulties > wagging tool_B and should find other ways to adapt. > > 4. if bridge_AB is a hack, a better solution should be found. He he. We have a little bit of everything here. I would add another point to your theory: 5. The smaller the bridge, the better. Let us see how it goes. Alex.
