Re: [Tutor] Sum of List Elements

2005-09-24 Thread wkranec
how about sum()? >>> sum(range(30)) 435 -Bill ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Read Excel file without COM

2005-11-29 Thread wkranec
Hi, I have written a script which reads a Microsoft Excel file and moves the data inside onto a database. The script uses the PyWin32 module written by Mark Hammond, but I was wondering if anyone knew of a way to extract the data without using COM. A Python module would be best, but I suppose an

[Tutor] Exceptions vs. Status Codes

2005-12-06 Thread wkranec
Hi, I have a general question regarding programming style which may or may not have an answer. Is it a better practice to have a function raise an exception on error, so that the error can be caught; or return a status code indicating that the function was unsuccessful? Like I said, I don't expe

Re: [Tutor] mod_python and other web frameworks

2006-01-26 Thread wkranec
There seems to be a discussion about this sort of thing every other week or so, and I'm always surprised that no one mentions Cheetah Templates (www.cheetahtemplate.org). It's useful for both web and non-Web applications, and has a straightforward syntax that pretty much *is* Python. For web prog