Bad Code (that works) help me re-write!
Matthew.Warren at Digica.com
Wed Oct 11 13:58:43 CEST 2006
> -----Original Message-----
> python-list-bounces+matthew.warren=digica.com at python.org
> [mailto:python-list-bounces+matthew.warren=digica.com at python.o
> rg] On Behalf Of Giles Brown
> Sent: 11 October 2006 12:38
> To: python-list at python.org
> Subject: Re: Bad Code (that works) help me re-write!
> Matthew Warren wrote:
> > I have the following piece of code,
> No doubt you will get some kind soul to suggest some things,
> but if you
> want really good
> answers I think you need explain why you want this command file (as
> opposed to using
> say a python script itself). Are you attempting to create a simpler
> syntax than Python?
> A restricted set of operations?
The code is from a larger project called the FatController.
FatController is currently a cli based utility for administering &
monitoring devices & applications in an enterprise environment.
Users enter commands at the prompt do things such as, define a managed
entity, execute instructions against that entity, etc
The processcommand() function and the command file are my attempt at
implementing the 'commands' that are available to the user. Rather than
hard-code all of the syntax and commands inside the module, I wanted an
external file to maintain the definitions of the commands available to
the user. The idea is that users will be able to implement their own
'entity' modules, which FatController will import and then use to manage
devices & applications the given entty applies to. So, at the time of
writing the code thought It would be a good idea to have the command
definitions file external to the code, so and-users who write their own
modules can also extend the cammands available to Fatcontroller for
using those modules, if required.
This email is confidential and may be privileged. If you are not the intended recipient please notify the sender immediately and delete the email from your computer.
You should not copy the email, use it for any purpose or disclose its contents to any other person.
Please note that any views or opinions presented in this email may be personal to the author and do not necessarily represent the views or opinions of Digica.
It is the responsibility of the recipient to check this email for the presence of viruses. Digica accepts no liability for any damage caused by any virus transmitted by this email.
UK: Phoenix House, Colliers Way, Nottingham, NG8 6AT UK
Reception Tel: + 44 (0) 115 977 1177
Support Centre: 0845 607 7070
Fax: + 44 (0) 115 977 7000
SOUTH AFRICA: Building 3, Parc du Cap, Mispel Road, Bellville, 7535, South Africa
Tel: + 27 (0) 21 957 4900
Fax: + 27 (0) 21 948 3135
More information about the Python-list