Re: [Tutor] list.index() question

2008-12-08 Thread Damon Timm
On Mon, Dec 8, 2008 at 7:55 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > index() searches for a specific matching item, it doesn't have any > wildcard ability. Ah ha! > There is actually an index: > http://docs.python.org/genindex.html Heh heh - and the info I was looking for is at: http://docs

Re: [Tutor] list.index() question

2008-12-08 Thread Kent Johnson
On Mon, Dec 8, 2008 at 7:05 PM, Damon Timm <[EMAIL PROTECTED]> wrote: > Hi again! > > (Now that everyone was so helpful the first time you'll never get rid of me!) That's fine, pretty soon you'll be answering other people's questions :-) > I had a question about using the index() function on a li

Re: [Tutor] list.index() question

2008-12-08 Thread Alan Gauld
"Damon Timm" <[EMAIL PROTECTED]> wrote walk the directory path, I want to see if a directory contains any files ending in a certain type ... if it does, I wanna do some stuff Check out the glob module. for dirpath, subFolders, files in os.walk(rootDir): try: i = files.index("*.f

Re: [Tutor] list.index() question

2008-12-08 Thread John Fouhy
On 09/12/2008, Damon Timm <[EMAIL PROTECTED]> wrote: > Basically: how do I make it match *.flac ? I couldn't find anything > on google (searching for "python index" just gets me a lot of indexes > of python docs - wink) Hi Damon, The fnmatch module will help here. It basically implements uni

[Tutor] list.index() question

2008-12-08 Thread Damon Timm
Hi again! (Now that everyone was so helpful the first time you'll never get rid of me!) I had a question about using the index() function on a list -- as I walk the directory path, I want to see if a directory contains any files ending in a certain type ... if it does, I wanna do some stuff ... i

Re: [Tutor] rrdtool examples.

2008-12-08 Thread Jeremiah Jester
Thanks Jay. This helps! JJ On Mon, 2008-12-08 at 10:01 -0800, Jay Deiman wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Jeremiah Jester wrote: > > Is anyone on here using the python-rrdtool module for graphing and > > analysis? If so, do you have some sample scripts you could show

Re: [Tutor] rrdtool examples.

2008-12-08 Thread Jay Deiman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremiah Jester wrote: > Is anyone on here using the python-rrdtool module for graphing and > analysis? If so, do you have some sample scripts you could show me. > There doesn't seem to be a lot out there as far as real world python > examples. > > Th

Re: [Tutor] File IO flush

2008-12-08 Thread Kent Johnson
On Mon, Dec 8, 2008 at 12:15 PM, Sander Sweers <[EMAIL PROTECTED]> wrote: > Hello All, I was playing around with the zipfile module and wrote a > simple script to unzip a zip file. I then looked around on the > internet and found the recipe 252508 [1] on the active state cookbook > website. > > In

[Tutor] File IO flush

2008-12-08 Thread Sander Sweers
Hello All, I was playing around with the zipfile module and wrote a simple script to unzip a zip file. I then looked around on the internet and found the recipe 252508 [1] on the active state cookbook website. In this recipe the author calls flush() and then close() on a file object being written

Re: [Tutor] Sorting a dictionary on a value in a list.

2008-12-08 Thread Lawrence Wickline
On Dec 6, 2008, at 12:41 AM, Lie Ryan wrote: In most cases, in processing involving networking, the bottleneck is the network speed itself. To speed things up by optimizing your own code might not make your download significantly faster (getting 60 seconds faster is great for scripts that us

Re: [Tutor] Psyco module

2008-12-08 Thread Python Nutter
It only runs on Intel 386-compatible processors. Once we know what CPU you are using then we can figure it out better. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor