Re: How to choose the right GUI toolkit ?

2006-11-10 Thread vdicarlo
> I highly recommend wxPython. It's very mature, full-featured, and
> portable, and fairly easy to learn as well.

I am also a Python beginner thinking about what GUI toolkit to use, and
the availability of a free video screencast series on installing and
using wxpython at showmedo.com is making me want to go that way. I
viewed their introduction to Python resources and wished I had found it
first.

The wxpython series is at http://tinyurl.com/yggean

Vincent

-- 
http://mail.python.org/mailman/listinfo/python-list


How Can I Increase the Speed of a Large Number of Date Conversions

2007-06-07 Thread vdicarlo
I am a programming amateur and a Python newbie who needs to convert
about 100,000,000 strings of the form "1999-12-30" into ordinal dates
for sorting, comparison, and calculations. Though my script does a ton
of heavy calculational lifting (for which numpy and psyco are a
blessing) besides converting dates, it still seems to like to linger
in the datetime and time libraries.  (Maybe there's a hot module in
there with a cute little function and an impressive set of
attributes.)

Anyway, others in this group have said that the date and time
libraries are a little on the slow side but, even if that's true, I'm
thinking that the best code I could come up with to do the conversion
looks so clunky that I'm probably running around the block three times
just to go next door. Maybe someone can suggest a faster, and perhaps
simpler, way.

Here's my code, in which I've used a sample date string instead of its
variable name for the sake of clarity. Please don't laugh loud enough
for me to hear you in Davis, California.

dateTuple = time.strptime("2005-12-19", '%Y-%m-%d')
dateTuple = dateTuple[:3]
date = datetime.date(dateTuple[0], dateTuple[1],
dateTuple[2])
ratingDateOrd = date.toordinal()

P.S. Why is an amateur newbie trying to convert 100,000,000 date
strings into ordinal dates? To win try to win a million dollars, of
course! In case you haven't seen it, the contest is at www.netflixprize.com.
There are currently only about 23,648 contestants on 19,164 teams from
151 different countries competing, so I figure my chances are pretty
good. ;-)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How Can I Increase the Speed of a Large Number of Date Conversions

2007-06-09 Thread vdicarlo
Many thanks for the lucid and helpful suggestions. Since my date range
was only a few years, I used Some Other Guy's suggestion above, which
the forum is saying will be deleted in five days, to make a dictionary
of the whole range of dates when the script starts. It was so fast it
wasn't even worth saving in a file. Made the script a LOT faster. I
guess two thousand function calls must be faster than 200 million?
Like maybe a hundred thousand times faster?

I also benefitted from studying the other suggestons. I had actually
implemented an on the fly dictionary caching scheme for one of my
other calculations. I don't know why it didn't occur to me to do it
with the dates, except I think I must be assuming, as a newbie
Pythonista, that the less I do and the more I let the libraries do the
better off I will be.

Thanks for putting me straight. As someone I know said to me when I
told him I wanted to learn Python, "the power of Python is in the
dictionaries".

Funny how long it's taking me to learn that.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: append

2007-05-11 Thread vdicarlo
> > the reference material. I want to know about list
>> operations such as
> > append.

I've been struggling myself to assemble and learn just the right
combination of quick references. Here is some of what I've found.

For a quick search for the syntax and a simple example of a particular
method or function, the single most efficient source for me has been
the keyword search page for the Python Library Reference, Language
Reference, and Python/C API manuals that you can find from a link on
the official documentation page at http://www.python.org/doc/ or
directly at

http://starship.python.net/crew/theller/pyhelp.cgi

Full text searches (not limited to keywords like the resource above)
of the Python Library Reference can also be done at
http://www.zvon.org/other/python/PHP/search.php

Other handy references are:

Dive into Python at
http://diveintopython.org/toc/index.html

The Python 2.5 Quick Reference at
http://rgruet.free.fr/PQR25/PQR2.5.html

Last, but far from least, the one resource that I most wish I had
known about when I started with Python is the screencast tutorial site
at www.showmedo.com. There are two excellent free screencasts on
Python resources at http://tinyurl.com/2qkuht and lots of other Python
tutorials, most free and some for a modest fee. In particular, the 9th
installment of the paid series called Python Newbies on XP at
http://tinyurl.com/3ayhwt is about how to use the help functions built
into Python Idle.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: IDE for Python

2007-08-22 Thread vdicarlo
> Have you tried SPE?  I don't know how it compares to PyDev but SPE is
> pretty slick.  It has several other tools integrated into it,
> including a pretty nice debugger.

After trying Eclipse and SPE, I'm back to using VIM and the Winpdb
debugger, which is the "pretty nice debugger" in SPE, and which has
become indispensable to me.

Vincent


-- 
http://mail.python.org/mailman/listinfo/python-list