Re: [Tutor] Binary fractions, recommendations?

2006-08-04 Thread Alan Gauld
Always found it quite strange that working mathematically with binary is so hard in programming languages. Even in Scheme, which will happily play with imaginary numbers. I'm not clear on what you want to do. You are working mathematically with binary all the time, in fact that's the reason

Re: [Tutor] Binary fractions, recommendations?

2006-08-04 Thread Kent Johnson
Alan Gauld wrote: Does anyone know how I could work on a binary representation of a float? Any language at all, In C you can certainly get access to the binary representation of a float as bytes. My C is really rusty but something like float x = 1.3; char* p = x; That doesn't

Re: [Tutor] Listbox selection

2006-08-04 Thread Michael Lange
Hi Joe, On Thu, 3 Aug 2006 11:12:28 -0700 Joe Cox [EMAIL PROTECTED] wrote: I am still having a problem getting my listbox's binded to the radiobuttons. I am getting closer. ###Assign each Radiobutton with its own listbox values, show one selected button and one listbox### from

[Tutor] (*args, **kwargs)

2006-08-04 Thread Matt Williams
Dear All, I have learnt to do bits of python, but one of the things I cannot get my head around is the *args, **kwargs syntax. I have tried reading stuff on the web, and I have a copy of the python cookbook (which uses it as a recipe early on) but I still don't understand it. Please could

Re: [Tutor] (*args, **kwargs)

2006-08-04 Thread Jordan Greenberg
Matt Williams wrote: Dear All, I have learnt to do bits of python, but one of the things I cannot get my head around is the *args, **kwargs syntax. I have tried reading stuff on the web, and I have a copy of the python cookbook (which uses it as a recipe early on) but I still don't

[Tutor] Multiple buttons, One callback (fwd)

2006-08-04 Thread Danny Yoo
Hi everyone, Can someone help with Michael's question? Unfortunately, I can't answer it at the moment. Here it is below. (I've stripped off the image attachment.) -- Forwarded message -- Date: Fri, 4 Aug 2006 09:32:48 -0700 (PDT) From: Michael Cochez [EMAIL PROTECTED] To:

Re: [Tutor] (*args, **kwargs)

2006-08-04 Thread Matt Williams
Dear Etienne Carlos, Thanks so much for that - much clearer! I guess the next question is _how_ do you use it intelligently? I'm interested because I'm trying to put stuff into a db using sqlobject. Obviously one way would be: class MyClass: def __init__(self,**kw)

[Tutor] hi

2006-08-04 Thread anil maran
i have a textbox in a webformi save it in postgresin postgres, it has several newlines and it is properly displayedwhen i redisplay using cheetahit just displays in a single line and looks uglyis there a simple way to replace newlines with br thanks Talk is cheap. Use Yahoo! Messenger to make

[Tutor] python unicode - help

2006-08-04 Thread anil maran
postgres takes utf8and ie has different encodings, sometimes western, sometimes utf8when someone submits data to the form with different, there is an error, how do we determine the encoding, automatically convert to utf8 and then feed to postgresthanks a lot See the all-new, redesigned

Re: [Tutor] (*args, **kwargs)

2006-08-04 Thread Etienne Robillard
--- Matt Williams [EMAIL PROTECTED] wrote: Dear All, I have learnt to do bits of python, but one of the things I cannot get my head around is the *args, **kwargs syntax. I have tried reading stuff on the web, and I have a copy of the python cookbook (which uses it as a recipe early

[Tutor] how to use

2006-08-04 Thread anil maran
list comprehensions to return a dictionarythanks a lot See the all-new, redesigned Yahoo.com. Check it out. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] can some one explain

2006-08-04 Thread anil maran
decorators and why uses them makes it faster than if then else blocks because of decorators using hash structuresi dont understand thisplease help me Do you Yahoo!? Next-gen email? Have it all with the all-new Yahoo! Mail Beta.___ Tutor maillist -

Re: [Tutor] Multiple buttons, One callback (fwd)

2006-08-04 Thread Michael Lange
-- Forwarded message -- Date: Fri, 4 Aug 2006 09:32:48 -0700 (PDT) From: Michael Cochez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Multiple buttons, One callback Hi Danny, I've just been reading your reply on this subject at

Re: [Tutor] python unicode - help

2006-08-04 Thread Kent Johnson
anil maran wrote: postgres takes utf8 and ie has different encodings, sometimes western, sometimes utf8 when someone submits data to the form with different, there is an error, how do we determine the encoding, automatically convert to utf8 and then feed to postgres Generally a browser

Re: [Tutor] Multiple buttons, One callback (fwd)

2006-08-04 Thread Kent Johnson
Michael Lange wrote: -- Forwarded message -- Date: Fri, 4 Aug 2006 09:32:48 -0700 (PDT) From: Michael Cochez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Multiple buttons, One callback Hi Danny, I've just been reading your reply on this subject at

Re: [Tutor] how to use

2006-08-04 Thread Kent Johnson
anil maran wrote: list comprehensions to return a dictionary A list comprehension creates a list. Can you explain why you want this? Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] IDLE Crashing

2006-08-04 Thread Adam Gomaa
I'm having trouble with this script. When I run it, it crashes IDLE... which is no fun. :( I'm running Ubuntu 6.06 w/ python 2.4 When I say crash, I mean really _crash_. IDLE stop responding, and I have to killall idle killall python2.4 before I can restart it (cause python2.4 keeps the TCP