(no subject)
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Tue Nov 6 15:38:28 EST 2001
hi,
>>>>> "BH" == Bernhard Herzog <bh at intevation.de> writes:
BH> Do you mean that pkg_root is the CVS module? Ouch!
BH> Well, there's a way to achieve it without much renaming in CVS
BH> with CVS' modules file. If you create a new CVS module named
BH> app with app.py and a line like
BH> app app &pkg_root
BH> a cvs checkout app should create an app directory with
BH> pkg_root as subdirectory. Caveat: I'm not a CVS expert and I
BH> haven't used this feature myself yet, but it's used quite a
BH> bit in GNOME's CVS.
Oh thanks for the hint! However, I dont have direct access to the
repository - this is a sourceforge project (http://mayavi.sf.net)
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mayavi/mayavi/
But in any case I think I have it covered. I hacked knee.py to do
exactly what i want. i need to test it more though.
>> (1) Check if module is available in the same directory, if
>> available - use it.
>> (2) If not found walk up to parent dir. check there, if not
>> there go up until out of package.
>> (3) If not found in (2) look at sys.path for module.
BH> I don't think that will help with your problem. At least not
BH> as far as the app.py part is concerned. If you execute app.py
BH> in pkg_root, all sub-packages are on the top-level, i.e. there
BH> is not parent package, because pkg_root is in sys.path.
Oh, app.py is not the problem. Actually the app.py I was talking of
is a script that can handle itself and I dont mind fooling with one
file to get things working but changing everything else to use FQN's
(fully qualified names) is a pain.
Anyway I modified knee.py to make my approach work! The fix was about
10 lines of code. Will test it some more out early tommorow and mail
you folks the code. Its late, so God knows what goofs I may have made
but so far it works great for my silly test package!! Will fill you
folks in later tommorow.
prabhu
--
Prabhu Ramachandran MayaVi Data Visualizer
http://www.aero.iitm.ernet.in/~prabhu http://mayavi.sf.net
Where there's no emotion, there's no motive for violence.
-- Spock, "Dagger of the Mind", stardate 2715.1
More information about the Python-list
mailing list