[Dev] Parcel Paths & Parcelpalooza
SCHNEIDA at seiu.org
Thu Oct 2 05:51:00 PDT 2003
I've been playing with importing third-party parcels, such as outliner,
and not surprisingly at this early stage it's a tiny bit of a pain. Changing the
xrc file to match the path we're the parcel will live is pretty straightforward.
But then you need to make sure that you fix any paths in the code itself.
Right now, it's a trivial fix for a developer to make. Down the line it could make life
messy. At some point, you'll want to make it possible for relatively novice
users to snap in third-party parcels willy-nilly as easily as a Perl developer
can add Perl modules or a regular user can add plug-ins to Netscape.
To allow for safe & easy novice Parcelpaloozas, you'd want to make it as easy
as possible for a python script to take care of it -- and having a partial installing script
do a search and replace of file paths in the parcel code is probably not a good idea.
So maybe it would make sense to fix the problem now. For example, you could
say that all third-party parcels (or better yet all parcels) that are going to refer to
a file path inside the parcel should store the path in a module -- ParcelPath.py, for
ex -- and store the file path in the variable ParcelPath. That way the parcel
install script could either just modify ParcelPath.py or just rewrite the sucker. You
could, of course, do something more elaborate such as a config xml file ala Java
applets, but that feels like overkill right now (although a Configuration.py or
Settings.py module might not be a bad compromise). Just a suggestion.
More information about the Dev