[Tutor] Development of administration utility
Alan Gauld
alan.gauld at btinternet.com
Thu Aug 21 19:35:07 CEST 2014
On 21/08/14 12:01, Alessandro Di Bella wrote:
> We are currently investigating different languages and technologies to
> develop an command line administration utility.
For what? Operating under which environments?
> The utility should have the following characteristics:
>
> 1. support for sub commands and parameters (e.g. svn or git)
Can you elaborate? Do you mean subcommands modelled after
how git/svn work or do you mean sub commands of git/svn?
In other words are you trying to control external commands
from your application or simply work in the same/similar
ways?
Take a look at the cmd module and see if it meets your needs....
> 2. integration with bash_completion
I'm not clear what you expect here. What if your user does
not use bash? What should the app do then?
Is this a *nix only app or does it have to work on Windows
with the cmd shell too?
> 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.,
Are you planning on using the application to install the packages or are
you expecting the app to read the installed package data from the
package manager? What happens if multiple package managers are used?
What about things installed from source?
> 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
This bit should be straightforward.
> 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:
That depends on what you intend point 3 to mean. See the comments above.
> 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?
There are hundreds of libraries and dozens of frameworks from networking
through GUIs and domain specific tools. Whether any
of them come close to what you want is not yet clear.
> 3. Should we consider 2.x or 3.x in order to ensure cross system
> compatibility (linux, windows)?
The Python version doesn't make much difference for cross platform
issues, at least for the standard library. For maximium third party
support you should go with Python 2.x, especially as its often
installed by default on the OS already.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list