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 programming, it can be used for straight up
CGI, or in a mod_python type setup.  I have used it several times and
really enjoyed it.

There's alot of work being done right now in preparation for a 2.0
release, so the web site should be very up to date, as well as the
tutorial / user's guide.  Check it out!

Bill

On 1/25/06, Ben Vinger [EMAIL PROTECTED] wrote:

 --- Intercodes [EMAIL PROTECTED] wrote:

  List: I am still open to suggestions.

 Being also keen to write better web apps in Python,
 I've spent a considerable amount of time reading about
 this (and it is indeed confusing), I've opted to try
 out something like Pylons or Turbogears.
 One thing I will say though, is that most of the
 frameworks you've read about can be run on top of
 mod_python.  So mod_python is not one of the lot - it
 is essential on Apache unless you opt to use CGI or
 FCGI. But as I understand it, you would always opt for
 mod_python over CGI or FCGI on a high-traffic website,
 though CGI or FCGI is of course fine for smaller
 things.
 But mod_python is not so easy to work with and it will
 only work on Apache.  So it seems best to choose
 something else and run that through mod_python when
 you're on Apache.






 ___
 Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with 
 voicemail http://uk.messenger.yahoo.com
 ___
 Tutor maillist  -  Tutor@python.org
 http://mail.python.org/mailman/listinfo/tutor

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[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 expect an answer that works in general, but some
guidelines about when one approach is more appropriate would be
appreciated.

Thanks,

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 any conversion program that could be called from Python
would be satisfactory.

Saving the file as .csv isn't really an option since there are
multiple pages in the sheet, and the people sending the files have
been somewhat standardized to send an Excel sheet.  I have thought
briefly about using xml, but this would require me to rewrite a lot of
my code, and I would like to avoid this unless there are some other
good reasons to do so.

I think I found a good resource at
http://chicago.sourceforge.net/devel/docs/excel/, but it doesn't
include any Python code.  Does anyone know of something similar for
Python?

Thanks,

Bill
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor