Re: [Tutor] O.T.

2004-12-30 Thread Patric Michael
Hi Jacob... > But who are you all, what are you're ages, what do you do, marriage > status, etc? You obviously don't have to answer, I'm just curious who > I'm boldly sending emails to. I figure since I bit the bullet and actually posted a reply, I best answer this as well in the faint hope of w

Re: [Tutor] cgi.FieldStorage and dictionary.get(' ')

2004-12-30 Thread Patric Michael
> Hi, > > I've passed this through the interperter line-by-line, yet still can't > get it to work right. > > The first time the cgi driver script initiates it runs the login > function which renders a zpt. Upon submission of their vitals, the I'm not sure what a zpt is, but it sounds like the

Re: [Tutor] O.T.

2004-12-30 Thread Tim Johnson
* Jacob S. <[EMAIL PROTECTED]> [041228 01:42]: > But who are you all, what are you're ages, what do you do, marriage status, > etc? I'm 55. 6 grown kids. 1 grandchild and another on the way. Been programming for 17 years, started in vax basic and assembler for the pdp-11. I've also worked as commer

[Tutor] cgi.FieldStorage and dictionary.get(' ')

2004-12-30 Thread Luis N
Hi, I've passed this through the interperter line-by-line, yet still can't get it to work right. The first time the cgi driver script initiates it runs the login function which renders a zpt. Upon submission of their vitals, the user is authenticated via sqlobject, and if they pass the chapters

Re: [Tutor] leastsquares.py

2004-12-30 Thread Alan Gauld
> > def _leastSquare(): > > # do the thing that might generate negatives > > > > def leastSquare(): > > firstTry = _leastSquare() > > if firstTry < 0: > > return leastSquare() # try again > > else: > > return firstTry > > > > Primitive but it works. If you want more a e

RE: [Tutor] leastsquares.py

2004-12-30 Thread mdcooper
Hi Pierre, you are correct - the methods that simply refuse negative results will not be sufficient. The code I have so far is attached as *.py files. Thanks, Matt Be aware that I have adusted _lsq2.py so that it can be shown to the world - it still contains a basic outline of what should be d

Re: [Tutor] moving widgets around

2004-12-30 Thread John Miller
I recently had occasion for drag 'n drop functionality in Tkinter, and after much searching around decided that tkdnd.py was the only viable solution (at least, that I could find). The code is actually quite understandable (well, at the 'large chunks' level). In the directory where tkdnd.py is

Re: [Tutor] How to substitute an element of a list as a pattern for re.compile()

2004-12-30 Thread Kent Johnson
kumar s wrote: My situation: I have a list of numbers that I have to match in another list and write them to a new file: List 1: range_cors range_cors[1:5] ['161:378', '334:3', '334:4', '65:436'] List 2: seq seq[0:2] ['>probe:HG-U133A_2:1007_s_at:416:177; Interrogation_Position=3330; Antisense;',

Re: [Tutor] Using the £ symbol

2004-12-30 Thread Kent Johnson
The problem is that you typed an actual '£' into your program text. The compiler is complaining because, absent an explicit encoding declaration, it expects the text to be ascii. I think there are two ways to solve this: - write the string with '\xc2' instead of '£'; it has the same meaning - put

Re: [Tutor] leastsquares.py

2004-12-30 Thread Pierre Barbier de Reuille
Alan Gauld a écrit : I am trying to use a least squares method (the one written by Konrad Hinsen), but I do not want the method to be able to generate negative values. Is there a way to stop least squares programs from doing so? def _leastSquare(): # do the thing that might generate negatives

Re: [Tutor] O.T.

2004-12-30 Thread Andrzej Kolinski
I'm 60 years old living in Toronto in a very happy relationship with my second wife,  3 children, 2 grandchildren from the first marriage. Never programmed before hoping that I will sometimes in the (near) future. I love Python, but my problem is that I have never gone through the rigid logic of t

Re: [Tutor] How to put my functions in an array

2004-12-30 Thread Mohamed Lrhazi
On Thu, 2004-12-30 at 03:08, Alan Gauld wrote: > > I'm slightly confused about why you need to do this? > You create a list of names (PROVISION_ACTIONS), then > you add the corresponding functions to a dictionary > by looking the names up in the globals dictionary. > But since uyou know the na

Re: [Tutor] O.T.

2004-12-30 Thread Anna Ravenscroft
Jacob S. wrote: I hate to sound weird... Too late. ;-) Join the crowd! Anna Martelli Ravenscroft 42, 2 children (13 and 11) live with their dad Married this July to the martelli-bot (we read The Zen of Python at our wedding!). We currently live in Bologna, Italy. Started learning Python in 2002 b

Re: [Tutor] O.T.

2004-12-30 Thread Ewald Ertl
Hi! I#m 33, married, 2 Children ( 9 months old girl & 3 year old boy ). We are living in the south of Burgenland in Austria. My mother tounge is german. I attended a secondary technical school studed electronics. After school I started working for a big company creating a power system control

Re: [Tutor] (no subject)

2004-12-30 Thread Alan Gauld
> I am trying to supply input to another program using > pipes. I can read from it just fine, but writing to > its stdin doesn't seem to be working. I'm guessing here so take with a pinch of salt... > cmd = "listen.py" > > #stdout, stdin > r, w = popen2(cmd) > > w.write("Message sent") I thin

Re: [Tutor] How to put my functions in an array

2004-12-30 Thread Alan Gauld
> Thanks alot Jeff. This worked for me: > > formhandlers={} > for verb,verb_desc in PROVISION_ACTIONS: > try: > formhandlers[verb]=globals()[verb] > except KeyError: > pass I'm slightly confused about why you need to do this? You create a list of names (PROVISION_ACTIONS), then you add the cor

Re: [Tutor] How to put my functions in an array

2004-12-30 Thread Alan Gauld
I'm not sure what exa ctly you are trying to do here, but I'll take a guess. > def addvirt(): pass > def remvirt(): pass > PROVISION_ACTIONS=[('addvirt','Add Virt'),('remvirt','Remove Virt'),] Not sure why you have the list of tuples of strings, but it shouldn't be a problem. > formhandlers={} >