[Tutor] python beginner

Alan Gauld alan.gauld at btinternet.com
Thu Jul 10 10:40:03 CEST 2008


"Fred @ Mac" <fredp101 at mac.com> wrote

> Of course to do all of this, it will also need an interface.

I'm not too sure what you mean by an "interface"?
Do you mean a user interface? It will certainly need one
of those but it could be a command line UI or a text
based UI or a GUI or a Web UI. Or even several of those.

> whatever language/script I use must of course be able to produce a 
> sort of small database and interface to keep track of which jobs 
> have  been processed.

The database could be anything from a simple text file - maybe
in xml - or a full blown relational model. The choice is yours.

> My first question is, what language do you think this sort of thing 
> would be best done in. I have some scripting experience in Lua, very 
> basic python, and 2 semesters of c++

I'd opt for Lua or Python over C++. I know nothing about Lua so
I'd personally endorse Python, but then this is a Python mailing list
so what did you expect? :-).

> languages, but I understand scripting and programming a little and 
> don't think it is too far of a stretch for me to learn how to do 
> this.

Not at all, it's a perfect match for scripting languages like
Python (or Lua).

> But I want to make sure I start down the right road with the best 
> tool  for the job, IE: the best language for this sort of program.

No language is perfect but any one of a dozen scripting languages
could do this. Since you already know a bit of Lua and Python they
are the obvious first choices for you. Since you are posting on the
python tutor list the answer from here is Python! Obviously.

In terms of how to start I'd pick one of your commands and write
a simple text based program to process that command. Then wrap
it up as a function. Repeat for the other commands. Finally write
a UI (either GUI , web or text based) that offers a menu of commands
and call the functions created earlier. Finally build the logging
function to store (and report) status.

Modules you may want to look at include

os, shutil (for file manipulation) elementTree(for XML processing),
sqlite(a database api) and m,aybe Tkinter or CGI (GUI and Web UIs)

Questions can be askwed here as necessary.

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 




More information about the Tutor mailing list