Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Steven D'Aprano
On Wed, 19 May 2010 03:29:46 am spir ☣ wrote: > (Fortunately, python 3.2, planned for April 1, 2011, will be informed > that "the" is an english article. This is possible since there is no > ambiguity with "thé" (fr), thank to Python's clever > diacritic-awareness. Only remains then the problematic

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread spir ☣
On Wed, 19 May 2010 01:23:55 +1000 Steven D'Aprano wrote: > On Tue, 18 May 2010 11:36:02 pm Dipo Elegbede wrote: > > ples help me figure out what is wrong with this syntax? > > > > > > print('Here are the numbers from 0 to 9') > > for i in the range(10): > > print(i) > > > > thank you. > > O

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Alan Gauld
"Dipo Elegbede" wrote By the way, I need someone to briefly explain to me how the while loop works. a little on break will also do. Your tutorial should do that but you can also look at the Loops section of my tutorial - use the V3 version - for a discussion of while loops. It does not c

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread bob gailer
On 5/18/2010 11:23 AM, Steven D'Aprano wrote: Others have already given you the answer, but more important is for you to learn *how* to get the answer. Look at the error message Python prints: for i in the range(10): File "", line 1 for i in the range(10):

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Dipo Elegbede
A LITTLE EXPLANATIONS ON CONTINUE WOULD BE APPRECIATED TOO. in a recap, i would appreciate any brief explanation on 1. break 2. continue 3. while loop how they work and application in writing codes. thank you all. On 5/18/10, Dipo Elegbede wrote: > thanks Steven. I'll always be mindful of that.

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Dipo Elegbede
thanks Steven. I'll always be mindful of that. By the way, I need someone to briefly explain to me how the while loop works. a little on break will also do. thanks. On 5/18/10, Steven D'Aprano wrote: > On Tue, 18 May 2010 11:36:02 pm Dipo Elegbede wrote: >> ples help me figure out what is wrong w

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Steven D'Aprano
On Tue, 18 May 2010 11:36:02 pm Dipo Elegbede wrote: > ples help me figure out what is wrong with this syntax? > > > print('Here are the numbers from 0 to 9') > for i in the range(10): > print(i) > > thank you. Others have already given you the answer, but more important is for you to learn *

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Dipo Elegbede
all worked well. thanks all. On Tue, May 18, 2010 at 2:47 PM, alex gunn wrote: > its the "the" part > > print('Here are the numbers from 0 to 9') > # for i in the range(10): #your version > for i in range(10): #try this > print(i) > > im still learning myself, so be gentle if im wrong but it

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread Vern Ceder
Dipo Elegbede wrote: ples help me figure out what is wrong with this syntax? print('Here are the numbers from 0 to 9') for i in the range(10): print(i) Remove the word "the" print('Here are the numbers from 0 to 9') for i in range(10): print(i) Cheers, Vern thank you. i am cur

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread alex gunn
its the "the" part print('Here are the numbers from 0 to 9') # for i in the range(10): #your version for i in range(10): #try this print(i) im still learning myself, so be gentle if im wrong but it worked for me. Alex ___ Tutor maillist - Tutor@

Re: [Tutor] what is wrong with this syntax?

2010-05-18 Thread zaldi
in the header of for loop, you don't need to use "the" -> for i in range(10) On 5/18/10, Dipo Elegbede wrote: > ples help me figure out what is wrong with this syntax? > > > print('Here are the numbers from 0 to 9') > for i in the range(10): > print(i) > > thank you. > > i am currently readin

[Tutor] what is wrong with this syntax?

2010-05-18 Thread Dipo Elegbede
ples help me figure out what is wrong with this syntax? print('Here are the numbers from 0 to 9') for i in the range(10): print(i) thank you. i am currently reading a byte of a python. thanks. -- Elegbede Muhammed Oladipupo OCA +2348077682428 +2347042171716 www.dudupay.com Mobile Banking

Re: [Tutor] what is wrong with this code?

2010-04-26 Thread Steve Willoughby
On Mon, Apr 26, 2010 at 07:53:17PM +0200, Norman Khine wrote: > ok this worked, > > cursor.execute(drop_user_tables % ",".join(user_tables)) > > it seems that DROP TABLE (and other DDL statements) don't technically > take SQL parameters. That's correct. The point of using %s as a placeholder f

Re: [Tutor] what is wrong with this code?

2010-04-26 Thread Norman Khine
On Mon, Apr 26, 2010 at 7:45 PM, Norman Khine wrote: > thanks for the reply. > > On Mon, Apr 26, 2010 at 7:18 PM, Serdar Tumgoren wrote: >> >>> user_tables = ['notification', 'userNotification', 'product_comments', >>> 'product_donation_paypalTransaction', 'product_donation', >>> 'productList_rec

Re: [Tutor] what is wrong with this code?

2010-04-26 Thread Norman Khine
thanks for the reply. On Mon, Apr 26, 2010 at 7:18 PM, Serdar Tumgoren wrote: > >> user_tables = ['notification', 'userNotification', 'product_comments', >> 'product_donation_paypalTransaction', 'product_donation', >> 'productList_recommended', 'productList_user_assoc', >> 'profile_values'] >> >>

Re: [Tutor] what is wrong with this code?

2010-04-26 Thread Serdar Tumgoren
> user_tables = ['notification', 'userNotification', 'product_comments', > 'product_donation_paypalTransaction', 'product_donation', > 'productList_recommended', 'productList_user_assoc', > 'profile_values'] > > drop_user_tables = """DROP TABLE IF EXISTS db2.%s""" > > try: >cursor.execute(drop_

[Tutor] what is wrong with this code?

2010-04-26 Thread Norman Khine
hello, i have a list of tables i want to drop: user_tables = ['notification', 'userNotification', 'product_comments', 'product_donation_paypalTransaction', 'product_donation', 'productList_recommended', 'productList_user_assoc', 'profile_values'] drop_user_tables = """DROP TABLE IF EXISTS db2.%s"

Re: [Tutor] what is wrong with this?

2005-02-13 Thread Kent Johnson
You might try asking for help on the Boa users mailing list. Kent jrlen balane wrote: i'm using BOA to construct the GUI. The problem is in this MDIChildFrame. The code was sort of copy and pasted from the wxpython demo "grid.py" then edited so that it fits what i wanted. there seems to be no probl

Re: [Tutor] what is wrong with this?

2005-02-13 Thread jrlen balane
i'm using BOA to construct the GUI. The problem is in this MDIChildFrame. The code was sort of copy and pasted from the wxpython demo "grid.py" then edited so that it fits what i wanted. there seems to be no problem at all when you run the whole program (MDIParentframe). but as i attempt to open th

Re: [Tutor] what is wrong with this?

2005-02-13 Thread Kent Johnson
Liam Clarke wrote: Yup, that's what I was after, the full error message. >self.grid1.CreateGrid(100,6) val = gridc.wxGrid_CreateGrid(self, *_args, **_kwargs) try this self.grid1.CreateGrid(self, 100, 6) I'm pretty sure you have to explicitly pass self. No, that's not it. There is an asymmetry be

Re: [Tutor] what is wrong with this?

2005-02-12 Thread Liam Clarke
Yup, that's what I was after, the full error message. >self.grid1.CreateGrid(100,6) > val = gridc.wxGrid_CreateGrid(self, *_args, **_kwargs) try this self.grid1.CreateGrid(self, 100, 6) I'm pretty sure you have to explicitly pass self. Let me know how ya go. Regards, Liam Clarke On Sun,

Re: [Tutor] what is wrong with this?

2005-02-12 Thread jrlen balane
how would i find the stack trace? by the way, this is what the log says: 11:53:16: TypeError: wxGrid_CreateGrid() takes at least 3 arguments (2 given)Traceback(most recent call last): 11:53:16: TypeError: wxGrid_CreateGrid() takes at least 3 arguments (2 given) File "C:\PYTHON23\Lib\site-

Re: [Tutor] what is wrong with this?

2005-02-12 Thread Liam Clarke
Can you post the whole stack trace? On Sat, 12 Feb 2005 13:36:18 +0800, jrlen balane <[EMAIL PROTECTED]> wrote: > this code is for a MDIChildFrame, It has a MDIParentFrame and when I > run the MDIPrentFrame, there seems to be no problem, but when I > attempt to edit the MDIChildFrame using the de

[Tutor] what is wrong with this?

2005-02-12 Thread jrlen balane
this code is for a MDIChildFrame, It has a MDIParentFrame and when I run the MDIPrentFrame, there seems to be no problem, but when I attempt to edit the MDIChildFrame using the designer mode in BOA (i'm using BOA by the way), an error occurs that says: TypeError: wxGrid_CreateGrid() takes at least