You could definitely achieve that modularity, if the parent package knows (by convention) where to look for sub-modules. I'm not sure there's a built-in mechanism, unless you want to use 'import' in a clever way. It feels like that's more of a RPM/.deb challenge than a Python challenge.
There are command line parsing libraries built-in to the language: https://docs.python.org/2/library/optparse.html 2x / 3x is a bit of a religious war at the moment.. Probably either one is fine, but 2x is installed by default on more systems. - Japhy On Thu, Aug 21, 2014 at 6:01 AM, Alessandro Di Bella < alessandro.dibe...@gmail.com> wrote: > Hi, > > We are currently investigating different languages and technologies to > develop an command line administration utility. > Python is one of the options we are looking at for the job but currently > we have no relevant skill set so I thought I'd post some question to get an > idea if using python is something worth pursuing or not. > > The utility should have the following characteristics: > > 1. support for sub commands and parameters (e.g. svn or git) > 2. integration with bash_completion > 3. Modular. The idea would be that by installing different packages > (or RPMs), new sub-commands and parameters will be made available to the > utility. E.g., > 1. "Base" package is installed: subcommand available is "view-config " > 2. "Base" and "database" package are installed, subcommands > available are "view-config" and "backup-db" > 4. Support for executing remote commands via ssh > > I have no doubt that with enough effort, a Python application could be > developed to implement the above. > However, I'm not too sure if Python is the right tools for the job > particularly about point 3: > > 1. Is there a built-in discovery mechanism like Java SPI ( > http://docs.oracle.com/javase/tutorial/sound/SPI-intro.html)? > 2. Are there any libraries/framework we could build upon or would we > need to start from scratch? > 3. Should we consider 2.x or 3.x in order to ensure cross system > compatibility (linux, windows)? > > Any feedback on any of the points above would be greatly appreciated. > > Regards, > > Alessandro > > > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor