Advice for a first project

Quinn Dunkan quinn at retch.ugcs.caltech.edu
Fri Jan 26 18:05:12 EST 2001


On Thu, 25 Jan 2001 23:53:16 +0000, AlisdairM
<alisdair.meredith at NO_SPAM_PLEASE.benettonformula.com> wrote:
>After hearing so many good things about Python ( namely that it makes
>the simple things simple again! ) I am hoping to find time to learn it
>in the near future, other projects permitting.
>
>Generally, I find languages/techniques best picked up if you have a
>specific project in mind, and looking around I *think* I have a suitable
>candidate due in the next few months anyway :¬ )
>
>Given that I still know little about the language, I am hoping some
>friendly knowledgable local could tell me if this is a realistic goal, a
>good use of Python, or one of those projects that can be done in Python
>but gains little benefit compared to C++/Delphi/VB/ASM/<insert generic
>language here>
>
>The basic project will be our source-code archiver/release manager.  We
>have quite a few projects deployed internally, all written in C++.  I
>want to create a tool to 
>
>  archive release code to a shared server ( source and executables )
>  recreate a fresh build environment from that server
>  automatically update header file version constants
>  incorporate simple bug-tracking database
>  create Release note from the bug-track dbase
>
>I expect most of this will be creating/pasing plain text files that
>define what the system should look like, and the bug-tracking database
>will also be little more than some plain-text notes initially, stored in
>a related part of the server.

This all looks like good python material.  If you're going to be doing simple
text file munging, python's regexp facilities (in the 're' module) are quite
satisfactory.  For more complicated parsing, look at mxTextTools or SPARK, or
go to http://www.vex.net/parnassus/ and look in the 'parsing' category.  You
probably only need to search for an RCS-like id line, though.

Internal state of your system, such as the bug database, can be saved in a
plain text file or with the built in serialization pickle/cPickle or marshal
modules.  If you want something more fancy, you can search for gadfly, a
python SQL implementation, or use MySQL or something and one of the python SQL
db modules (once again, check parnassus).

Unfortunately, I haven't much experience with python stuff that makes network
communication easy, but you might want to look at python XML-RPC... I'd assume
it's a simple matter to tunnel it through ssh and have a reasonably complete
and secure way to communicate with your server.

python does shellish things perfectly well, too... os.system() and os.popen()
are probably all you need here.

>What I need to know now is how realistic this target is, and what
>resources I will need to make this fly when I get that free week to give
>it a shot.  I have time to buy books, download tutorials/IDEs/libraries
>now.  I don't want to lose 'learning time' chasing these up during that
>week or two.
>
>Any recommendations/advice.  What should I expect to achieve with a week
>or two (tops) for the exercise?  

If you have any previous experience with traditional procedural / OO languages
like C++ or Java, then you ought to pick up python in a day or so (seriously).
The rest is, as for any language, a matter of reading library and module
documentation to figure out what you need.  The stdlib has lots of stuff,
the documentation is generally good, and you can always look at the source
(both C and python) to see how things are really done.  Browse parnassus, and
take a look at what people have done for you already.

As far as how far to expect to get, that depends on your understanding of the
problem.  It's a tribute to python that it will probably get out of your way
after the first few days, and after that you will be limited by practical
concerns like keeping a database in sync, communicating over the network, etc.
A release-control system is not a trivial thing.

Go to www.python.org and download the complete documentation and tutorial.
Whether or not you want a book is up to you, though the tutorial was enough
for me.  If you search the deja archives of c.l.py for 'python books' you
ought to find plenty of recommendations for python books.  IDEs, of course,
depend on your taste.  Most people seem to use emacs or vim.  IDLE is
in-development and comes with the stdlib, the windows python has another one,
and most all editors, even fairly obscure ones like wily (which I use), seem
to have some level of python support nowadays.


Have fun!  If you're anything like me, you'll find it an addictive little
language...



More information about the Python-list mailing list