On Sun, Mar 1, 2009 at 3:36 AM, Daniele <d.co...@gmail.com> wrote: > Hi, > I'd like to write a python program which can be easily extended by other > people. Where can I find some "best practices" for writing modular programs? > I thought about a txt file containing function calls that my program will > parse and execute in order, or is it better just to execute every .py file > in a certain "module" folder (I don't like this as modules could need to be > executed in different moments)? Can any1 point me to a relatively simple > program to look at?
Using classes is a pretty good idea. Then people can either "import daniele" or "from daniele import niftyClass". You can pretty much take a look at any of the modules in your python library directory. In the case of my linux box, that's /usr/lib/python2.5/ HTH, Wayne _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor