[Tutor] while loops / listeners

2010-06-06 Thread Alex Hall
Hi all, First off, I apologize to the list for my previous thread; somehow, despite my having written the post, it ended up blank () I have a main loop which will continue for as long as neither player1 nor player2 has won. Inside that loop I have a call to a function which should basically wa

Re: [Tutor] while loops causing python.exe to crash on windows

2010-06-06 Thread bob gailer
On 6/6/2010 9:37 PM, Alex Hall wrote: On 6/6/10, Lie Ryan wrote: On 06/07/10 11:08, Alex Hall wrote: On 6/6/10, bob gailer wrote: On 6/6/2010 8:44 PM, Alex Hall wrote: -- Have a great day, Alex (msg sent from GMail website) mehg...@gmail.com;http://www.facebook.c

Re: [Tutor] while loops causing python.exe to crash on windows

2010-06-06 Thread Alex Hall
On 6/6/10, Lie Ryan wrote: > On 06/07/10 11:08, Alex Hall wrote: >> On 6/6/10, bob gailer wrote: >>> On 6/6/2010 8:44 PM, Alex Hall wrote: -- Have a great day, Alex (msg sent from GMail website) mehg...@gmail.com;http://www.facebook.com/mehgcap >>> What is your quest

Re: [Tutor] while loops causing python.exe to crash on windows

2010-06-06 Thread Lie Ryan
On 06/07/10 11:08, Alex Hall wrote: > On 6/6/10, bob gailer wrote: >> On 6/6/2010 8:44 PM, Alex Hall wrote: >>> -- >>> Have a great day, >>> Alex (msg sent from GMail website) >>> mehg...@gmail.com;http://www.facebook.com/mehgcap >>> >>> >> What is your question? >> >> >> -- >> Bob Gailer >> 919-6

Re: [Tutor] while loops causing python.exe to crash on windows

2010-06-06 Thread Alex Hall
On 6/6/10, bob gailer wrote: > On 6/6/2010 8:44 PM, Alex Hall wrote: >> -- >> Have a great day, >> Alex (msg sent from GMail website) >> mehg...@gmail.com;http://www.facebook.com/mehgcap >> >> > What is your question? > > > -- > Bob Gailer > 919-636-4239 > Chapel Hill NC > > Why would that code ca

Re: [Tutor] while loops causing python.exe to crash on windows

2010-06-06 Thread bob gailer
On 6/6/2010 8:44 PM, Alex Hall wrote: -- Have a great day, Alex (msg sent from GMail website) mehg...@gmail.com;http://www.facebook.com/mehgcap What is your question? -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor maillist - Tutor@python

[Tutor] while loops causing python.exe to crash on windows

2010-06-06 Thread Alex Hall
-- Have a great day, Alex (msg sent from GMail website) mehg...@gmail.com; http://www.facebook.com/mehgcap ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] JS for location detection

2010-06-06 Thread bob gailer
On 6/6/2010 6:59 PM, Alan Gauld wrote: "Gaurav Kalra" wrote The list was suggested to me by a friend and he said that it's for General Programming discussions as well. Am sorry if I broke the laws of the list. But since I have already posted, if anyone up here is with a solution; please PM

Re: [Tutor] JS for location detection

2010-06-06 Thread Alan Gauld
"Gaurav Kalra" wrote The list was suggested to me by a friend and he said that it's for General Programming discussions as well. Am sorry if I broke the laws of the list. But since I have already posted, if anyone up here is with a solution; please PM me. It is for general programming dis

Re: [Tutor] JS for location detection

2010-06-06 Thread Gaurav Kalra
On Mon, Jun 7, 2010 at 01:13, bob gailer wrote: > On 6/6/2010 2:29 PM, Gaurav Kalra wrote: > >> Hi all, >> >> I was trying to get the user location based on 4 levels. >> 1. Try for Navigator telling the location (W3C recommendations followed) >> 2. In case the location is not available, fallback

Re: [Tutor] JS for location detection

2010-06-06 Thread bob gailer
On 6/6/2010 2:29 PM, Gaurav Kalra wrote: Hi all, I was trying to get the user location based on 4 levels. 1. Try for Navigator telling the location (W3C recommendations followed) 2. In case the location is not available, fallback on Google Gears 3. Again if not available, fall back on Google Aja

[Tutor] JS for location detection

2010-06-06 Thread Gaurav Kalra
Hi all, I was trying to get the user location based on 4 levels. 1. Try for Navigator telling the location (W3C recommendations followed) 2. In case the location is not available, fallback on Google Gears 3. Again if not available, fall back on Google Ajax API's (only for US) 4. Again if not avail

Re: [Tutor] backreferences - \0

2010-06-06 Thread Payal
On Sun, Jun 06, 2010 at 07:52:43PM +1000, Lie Ryan wrote: > >>> re.sub('(one) (two)', r'\g<0> - \1 \2',s) > > the \g is equivalent to \number but is intended to ambiguate > cases like "\g<2>0" vs. "\20". It happens that \g<0> refers to the > entire group. Thanks a lot. It works as you say. With

[Tutor] glade gtk radiobutton group

2010-06-06 Thread Lang Hurst
I'm trying to create an incredibly simple application just to learn gui programming, but I can't see how to work with radio buttons. A sample from my glade looks like: Ch 1 True True False

Re: [Tutor] backreferences - \0

2010-06-06 Thread Lie Ryan
On 06/06/10 19:36, Payal wrote: > On Sun, Jun 06, 2010 at 06:26:18PM +1000, Steven D'Aprano wrote: >> Two things. Firstly, the Python regex engine numbers backreferences from >> 1, not 0, so you need \1 and not \0. > > Thank for the mail, but i am still not getting it. e.g. > > In first sub I e

Re: [Tutor] backreferences - \0

2010-06-06 Thread Payal
On Sun, Jun 06, 2010 at 06:26:18PM +1000, Steven D'Aprano wrote: > Two things. Firstly, the Python regex engine numbers backreferences from > 1, not 0, so you need \1 and not \0. Thank for the mail, but i am still not getting it. e.g. >>> import re >>> s = 'one two' >>> re.sub('(one) (two)', r'

Re: [Tutor] backreferences - \0

2010-06-06 Thread Steven D'Aprano
On Sun, 6 Jun 2010 05:32:26 pm Payal wrote: > Hi, > A newbie re query. > > >>> import re > >>> s='one' > >>> re.sub('(one)','only \\0',s) > > 'only \x00' > > >>> re.sub('(one)','only \0',s) > > 'only \x00' > > I expected the output to be 'only one' with \0 behaving like "&" in > sed. What is wrong

[Tutor] backreferences - \0

2010-06-06 Thread Payal
Hi, A newbie re query. >>> import re >>> s='one' >>> re.sub('(one)','only \\0',s) 'only \x00' >>> re.sub('(one)','only \0',s) 'only \x00' I expected the output to be 'only one' with \0 behaving like "&" in sed. What is wrong with my syntax? With warm regards, -Payal -- _