[SciPy-user] What can be improved ?

Robert Kern robert.kern at gmail.com
Thu May 17 12:19:50 EDT 2007


Stef Mientki wrote:
> - use CSV, yes but how should I've known ?
> I think (and it's mentioned before by others) this is one of the major 
> problems of Python,
> "where should I find something ?". I've read the book "Learning Python", 
> but nothing is mentioned about CSV :-(

_Learning Python_ is an old book. If you want a dead-tree book that is more or
less up-to-date and covers much of the standard library, go for _Python in a
Nutshell_ or the third edition of _Python Essential Reference_.

> I sometimes look at the official Python guide of Guido van Rossum (not 
> this time ;-), but there's no printable version of it.
> I wonder if there isn't some kind of program that can create an PDF file 
> from such a site.
> It looks like the early days of Delphi, in that time you had about 10 
> different sites, each containing different kinds of information,
> none of them was complete. Nowadays, there is just 1 site for Delphi 
> (http:\\www.torry.net\) where everything of Delphi can be found very 
> easily (both freeware and commercial).
> btw MatLab also has 1 site, where everything can be found, but besides 
> the annoying log in procedure, it can absolutely not be compared to 
> Torry's Delphi site !!

Google for "site:docs.python.org csv", for example.

> - better to use an object than a function
> Yes I've thought about that, but I had one major concern why I didn't 
> choose for an object (besides the fact that in the beginning I assumed 
> the function to be much smaller), and that concern is memory usage. I 
> also never see something as a "closefile()" ??

You should be seeing things like f.close(). Although with CPython, file closing
should happen when the refcount of the file object goes to 0, it's good form to
explicitly close the file.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco



More information about the SciPy-User mailing list