Re: [Tutor] hash.update( argv[0] )

2006-04-23 Thread Danny Yoo
On Sun, 23 Apr 2006, George Georgalis wrote: > Hi! I've been struggling to find a way up seed hash.update() with > the sha1 (or similar) of the file that is the program running. > > this is not a security task but rather a means to generate > reasonably unique filenames based on various paramete

Re: [Tutor] Locking a specific variable

2006-04-23 Thread Danny Yoo
On Sun, 23 Apr 2006, Tino Dai wrote: > I am wondering if you could lock a specific variable with thread > locking. Let me illustrate: > > def ftpQueuePut(filename=""):: > if len(filename) > 0: > try: > fileQueue.put(filename,True,1)#Variable that I would like to > lock >

Re: [Tutor] Tutor FAQ?

2006-04-23 Thread Fredrik Lundh
Ed wrote: > I don't think the FAQ is open to public editing yet. I'm not sure > when it will be, but Fredrik might be able to give a timescale. There are a few known conversion issues to deal with (the FAQ uses a lot more "looks like markdown syntax" than the tutorial, which con- fused the conve

Re: [Tutor] Tutor FAQ?

2006-04-23 Thread Fredrik Lundh
> When Ed brought up the tutor/tutorial FAQ idea and yes, I'll change "tutorial FAQ" to "tutor FAQ", to make things a bit less confusing. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] hash.update( argv[0] )

2006-04-23 Thread George Georgalis
Hi! I've been struggling to find a way up seed hash.update() with the sha1 (or similar) of the file that is the program running. this is not a security task but rather a means to generate reasonably unique filenames based on various parameters including changes to the program: name = hash.hexdiges

[Tutor] Locking a specific variable

2006-04-23 Thread Tino Dai
Hi there, I am wondering if you could lock a specific variable with thread locking. Let me illustrate:def ftpQueuePut(filename="")::  if len(filename) > 0:  try:   fileQueue.put (filename,True,1)    #Variable that I would like to lock  except Queue.full:   print "Queue i

Re: [Tutor] how can I use Set.interaction function on a dictionary

2006-04-23 Thread Alan Gauld
> 1. I have a dictionary with 4 keys and some repeated > values for each key. > dida > {'NM_001033044': [32842023, 32842023, 32842023, > 32842023, 32842023, 32842023, 32842023, 32842023, > 32842023, 32842023, 32842023, 32842023, 32843894, > 32843894, 32843894, 32843894, 32843894, 32843894, >

Re: [Tutor] looking to hire a tutor

2006-04-23 Thread Alan Gauld
> Books: > Dont forget to carry these whereever your go: > 1. Alan Gauld's : Learn to Program using Python > 2. Mark Lutz'z: Learning Python While I appreciate the compliment I feel I should point out that my book is really a beginners tutorial and, even when I wrote it, I expected it to have li

Re: [Tutor] how can I use Set.interaction function on a dictionary

2006-04-23 Thread Danny Yoo
> 1. I have a dictionary with 4 keys and some repeated > values for each key. > dida > {'NM_001033044': [32842023, 32842023, 32842023, > 32842023, 32842023, 32842023, 32842023, 32842023, > 32842023, 32842023, 32842023, 32842023, 32843894, > 32843894, 32843894, 32843894, 32843894, 32843894, >