Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread Steven D'Aprano
On Fri, 14 Jun 2013 16:07:56 +0300, Nick the Gr33k wrote: Thanks for explaining this but i cannot follow its logic at all. My mind is stuck trying to interpret it as an English sentence: if ('Parker' and 'May' and '2001') if ('Parker' or 'May' or '2001') i just don't get it and i feel

Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread Nick the Gr33k
On 14/6/2013 7:31 μμ, Steven D'Aprano wrote: On Fri, 14 Jun 2013 16:07:56 +0300, Nick the Gr33k wrote: Thanks for explaining this but i cannot follow its logic at all. My mind is stuck trying to interpret it as an English sentence: if ('Parker' and 'May' and '2001') if ('Parker' or 'May' or

Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread Chris Angelico
On Sat, Jun 15, 2013 at 2:56 AM, Nick the Gr33k supp...@superhost.gr wrote: What i'm trying to say that both these exprs are Boolean Expressions therefore should return Boolean values not variable's values, even if they are truthy. Okay, now we get to the nub of the matter. In some languages,

Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread Jussi Piitulainen
Nick the Gr33k writes: (a or b or c) 'abcd' This for me, should evaluate to True but instead it has been evaluated to the first variable's value, which is a truthy value of course since its not an empty string, but shouldn't it return True instead? In your own programs, write bool(a or

Re: A certainl part of an if() structure never gets executed.

2013-06-14 Thread Larry Hudson
On 06/14/2013 09:56 AM, Nick the Gr33k wrote: On 14/6/2013 7:31 μμ, Steven D'Aprano wrote: On Fri, 14 Jun 2013 16:07:56 +0300, Nick the Gr33k wrote: Returning True is the same thing as returning a variable's truthy value? NO! 'True' and 'False' are the two values of the boolean type.

Re: A certainl part of an if() structure never gets executed.

2013-06-13 Thread Νικόλαος Κούρας
On 13/6/2013 4:55 πμ, Steven D'Aprano wrote: On Wed, 12 Jun 2013 14:17:32 +0300, Νικόλαος Κούρας wrote: doesn't that mean? if '=' not in ( name and month and year ): if '=' does not exists as a char inside the name and month and year variables? i think it does, but why it

Re: A certainl part of an if() structure never gets executed.

2013-06-13 Thread Zero Piraeus
: On 12 June 2013 10:55, Neil Cerutti ne...@norwich.edu wrote: He's definitely trolling. I can't think of any other reason to make it so hard to kill-file himself. He's not a troll, he's a help vampire: http://slash7.com/2006/12/22/vampires/ ... a particularly extreme example, I'll admit:

Re: A certainl part of an if() structure never gets executed.

2013-06-13 Thread Sibylle Koczian
Am 13.06.2013 09:11, schrieb Νικόλαος Κούρας: On 13/6/2013 4:55 πμ, Steven D'Aprano wrote: The and operator works in a similar fashion. Experiment with it and see how it works for yourself. I read yours psots many times,all of them, tryign to understand them. But you didn't do what he

Re: A certainl part of an if() structure never gets executed.

2013-06-13 Thread rusi
On Jun 12, 8:20 pm, Zero Piraeus sche...@gmail.com wrote: : On 12 June 2013 10:55, Neil Cerutti ne...@norwich.edu wrote: He's definitely trolling. I can't think of any other reason to make it so hard to kill-file himself. He's not a troll, he's a help vampire:  

Re: A certainl part of an if() structure never gets executed.

2013-06-13 Thread Neil Cerutti
On 2013-06-12, Zero Piraeus sche...@gmail.com wrote: On 12 June 2013 10:55, Neil Cerutti ne...@norwich.edu wrote: He's definitely trolling. I can't think of any other reason to make it so hard to kill-file himself. He's not a troll, he's a help vampire:

Re: A certainl part of an if() structure never gets executed.

2013-06-13 Thread Roy Smith
In article 8a75b1e4-41e8-45b5-ac9e-6611a4698...@g9g2000pbd.googlegroups.com, rusi rustompm...@gmail.com wrote: On Jun 12, 8:20 pm, Zero Piraeus sche...@gmail.com wrote: : On 12 June 2013 10:55, Neil Cerutti ne...@norwich.edu wrote: He's definitely trolling. I can't think of any

Re: A certainl part of an if() structure never gets executed.

2013-06-13 Thread Νικόλαος Κούρας
On 13/6/2013 3:22 μμ, Sibylle Koczian wrote: Am 13.06.2013 09:11, schrieb Νικόλαος Κούρας: On 13/6/2013 4:55 πμ, Steven D'Aprano wrote: The and operator works in a similar fashion. Experiment with it and see how it works for yourself. I read yours psots many times,all of them, tryign to

Re: A certainl part of an if() structure never gets executed.

2013-06-13 Thread Νικόλαος Κούρας
On 13/6/2013 12:16 πμ, Sibylle Koczian wrote: Am 12.06.2013 22:00, schrieb Νικόλαος Κούρας: On 12/6/2013 10:48 μμ, Sibylle Koczian wrote: if '=' not in ( name and month and year ): i understand: if '=' not in name AND '=' not in month AND '=' not in year Wrong. The '=' not in (...) first

Re: A certainl part of an if() structure never gets executed.

2013-06-13 Thread Νικόλαος Κούρας
if '-' not in name + month + year: cur.execute( '''SELECT * FROM works WHERE clientsID = (SELECT id FROM clients WHERE name = %s) and MONTH(lastvisit) = %s and YEAR(lastvisit) = %s ORDER BY lastvisit ASC''', (name, month, year) ) elif '-' not in name + year:

Re: A certainl part of an if() structure never gets executed.

2013-06-13 Thread Steven D'Aprano
On Thu, 13 Jun 2013 17:26:18 +0300, Νικόλαος Κούρας wrote: i just want 4 cases to examine so correct execute to be run: i'm reading and reading and reading this all over: if '-' not in ( name and month and year ): and i cant comprehend it. Don't just read it. Open the interactive

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread alex23
On Jun 12, 3:44 pm, Tim Roberts t...@probo.com wrote: It seems silly to fire up a regular expression compiler to look for a single character.     if name.find('=') 0 and month.find('=') 0 and year.find('=') 0: If truthiness is the only concern, I prefer using `in`: if '=' in name and

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
On Tue, 11 Jun 2013 22:49:05 -0600, Michael Torrie wrote: What do each of these functions return? When you print out re.search('=', name) what happens? First of all i have changed the code to the following because using a regex to detect a single char was an overkill. if '=' not in name

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Chris Angelico
On Wed, Jun 12, 2013 at 5:45 PM, Νικόλαος Κούρας supp...@superhost.gr wrote: First of all i have changed the code to the following because using a regex to detect a single char was an overkill. if '=' not in name and '=' not in month and '=' not in year: It'd be courteous to acknowledge

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Denis McMahon
On Tue, 11 Jun 2013 13:20:52 -0700, Νικόλαος Κούρας wrote: The above if structure works correctly *only* if the user sumbits by form: name, month, year or month, year If, he just enter a year in the form and sumbit then, i get no error, but no results displayed back. Any ideas as to

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 11:27 πμ, Denis McMahon wrote: On Tue, 11 Jun 2013 13:20:52 -0700, Νικόλαος Κούρας wrote: The above if structure works correctly *only* if the user sumbits by form: name, month, year or month, year If, he just enter a year in the form and sumbit then, i get no error, but no

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Fábio Santos
On Wed, Jun 12, 2013 at 9:54 AM, Νικόλαος Κούρας supp...@superhost.gr wrote: but if enumerate yields 0 instead of '==' then elif '=' not in year of course fails. So, i must tell: for i, month in enumerate(months): print('option value=%s %s /option' % (i, month) ) to somehow

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 12:07 μμ, F�bio Santos wrote: On Wed, Jun 12, 2013 at 9:54 AM, Νικόλαος Κούρας supp...@superhost.gr wrote: but if enumerate yields 0 instead of '==' then elif '=' not in year of course fails. So, i must tell: for i, month in enumerate(months): print('option value=%s

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Fábio Santos
On 12 Jun 2013 10:29, Νικόλαος Κούρας supp...@superhost.gr wrote: On 12/6/2013 12:07 μμ, F�bio Santos wrote: On Wed, Jun 12, 2013 at 9:54 AM, Νικόλαος Κούρας supp...@superhost.gr wrote: but if enumerate yields 0 instead of '==' then elif '=' not in year of course fails. So, i must

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Andreas Perstinger
[Please trim your replies to the relevant parts.] On 12.06.2013 10:54, Νικόλαος Κούρας wrote: But when it comes to select '==' from month instead of '==' to be submitted a zero gets submitted and i think the problem is the way i'm filling up months into the drop down menu which

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Cameron Simpson
On 11Jun2013 18:25, Nikos nagia.rets...@gmail.com wrote: | What are the values of 'name', 'month' and 'year' in each of the cases? | | Printing out ascii(name), ascii(month) and ascii(year), will be helpful. | | Then try stepping through those lines in your head. | | i hav epribted all

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
Original Message Subject: Re: A certainl part of an if() structure never gets executed. Date: Wed, 12 Jun 2013 10:07:39 +0100 From: Fábio Santos fabiosantos...@gmail.com To: Νικόλαος Κούρας supp...@superhost.gr CC: python-list@python.org python-list@python.org Newsgroups

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 1:07 μμ, Andreas Perstinger wrote: So, i must tell: for i, month in enumerate(months): print('option value=%s %s /option' % (i, month) ) to somehow return '==' instead of 0 but don't know how. As with most of your problems you are barking up the wrong tree. Why

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
Oh my God! i just need to do this: for i, month in enumerate( months ): print('option value=%s %s /option' % (month, month) ) -- http://mail.python.org/mailman/listinfo/python-list

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread feedthetroll
Am Mittwoch, 12. Juni 2013 12:07:54 UTC+2 schrieb Andreas Perstinger: [Please trim your replies to the relevant parts.] On 12.06.2013 10:54, Νικόλαος Κούρας wrote: But when it comes to select '==' from month instead of '==' to be submitted a zero gets submitted and i think

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
As with most of your problems you are barking up the wrong tree. Why not use the actual value you get from the form to check whether you have a valid month? Do you understand why 0 is submitted instead of ==? Bye, Andreas I have corrected the enumerate loop but it seems thet now the

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Fábio Santos
On 12 Jun 2013 12:08, Νικόλαος Κούρας supp...@superhost.gr wrote: Oh my God! i just need to do this: for i, month in enumerate( months ): print('option value=%s %s /option' % (month, month) ) Usually what goes in option value=... is an ID of something. You should keep using (i,

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Neil Cerutti
On 2013-06-12, Chris Angelico ros...@gmail.com wrote: On Wed, Jun 12, 2013 at 5:45 PM, ?? supp...@superhost.gr wrote: First of all i have changed the code to the following because using a regex to detect a single char was an overkill. if '=' not in name and '=' not in month and

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 2:49 μμ, F�bio Santos wrote: On 12 Jun 2013 12:08, �� supp...@superhost.gr mailto:supp...@superhost.gr wrote: Oh my God! i just need to do this: for i, month in enumerate( months ): � � � � print('option value=%s %s /option' % (month, month) ) Usually

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Mark Lawrence
On 12/06/2013 14:05, Neil Cerutti wrote: Also, I wish he would stop fudging his From info. I've got something like 8 entries for this ass in my killfile, and it seems I need a new one every day. An ass eh, when did he get promoted to that position? -- Steve is going for the pink ball - and

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Neil Cerutti
On 2013-06-12, Grant Edwards invalid@invalid.invalid wrote: On 2013-06-12, Tim Roberts t...@probo.com wrote: ?? nikos.gr...@gmail.com wrote: [code] if not re.search( '=', name ) and not re.search( '=', month ) and not re.search( '=', year ):

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Grant Edwards
On 2013-06-12, Tim Roberts t...@probo.com wrote: ?? nikos.gr...@gmail.com wrote: [code] if not re.search( '=', name ) and not re.search( '=', month ) and not re.search( '=', year ): cur.execute( '''SELECT * FROM works WHERE clientsID = (SELECT

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread MRAB
On 12/06/2013 12:17, Νικόλαος Κούρας wrote: As with most of your problems you are barking up the wrong tree. Why not use the actual value you get from the form to check whether you have a valid month? Do you understand why 0 is submitted instead of ==? Bye, Andreas I have corrected

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 7:40 μμ, MRAB wrote: On 12/06/2013 12:17, Νικόλαος Κούρας wrote: As with most of your problems you are barking up the wrong tree. Why not use the actual value you get from the form to check whether you have a valid month? Do you understand why 0 is submitted instead of

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread MRAB
On 12/06/2013 18:13, Νικόλαος Κούρας wrote: On 12/6/2013 7:40 μμ, MRAB wrote: On 12/06/2013 12:17, Νικόλαος Κούρας wrote: As with most of your problems you are barking up the wrong tree. Why not use the actual value you get from the form to check whether you have a valid month? Do you

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 8:53 μμ, MRAB wrote: and then what this is doing? if '=' not in ( name or month or year ): In English, the result of: x or y is basically: if bool(x) is true then the result is x, otherwise the result is y For example: bool() False or world 'world'

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Sibylle Koczian
Am 12.06.2013 20:06, schrieb Νικόλαος Κούρας: Whn i see: if( x and y ): i understand: if x expression = True AND ALSO y expression = True then execute if( x or y ): i understand: if x expression = True OR y expression = True then execute You didn't read MRABs explanation, did you? if '='

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
On 12/6/2013 10:48 μμ, Sibylle Koczian wrote: if '=' not in ( name and month and year ): i understand: if '=' not in name AND '=' not in month AND '=' not in year Wrong. The '=' not in (...) first evaluates the expression in parentheses, that's what parentheses are for. And then it looks for

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Chris Angelico
On Wed, Jun 12, 2013 at 9:07 PM, feedthetr...@gmx.de wrote: If you still don't know why you get 0 read: http://www.w3schools.com/tags/att_option_value.asp (or something in greek about html forms) (Sorry, I know, you do not read doks, because they describe what the software DOES and not

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 6:00 AM, Νικόλαος Κούρας supp...@superhost.gr wrote: On 12/6/2013 10:48 μμ, Sibylle Koczian wrote: if '=' not in ( name and month and year ): i understand: if '=' not in name AND '=' not in month AND '=' not in year Wrong. The '=' not in (...) first evaluates the

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Sibylle Koczian
Am 12.06.2013 22:00, schrieb Νικόλαος Κούρας: On 12/6/2013 10:48 μμ, Sibylle Koczian wrote: if '=' not in ( name and month and year ): i understand: if '=' not in name AND '=' not in month AND '=' not in year Wrong. The '=' not in (...) first evaluates the expression in parentheses, that's

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Steven D'Aprano
On Wed, 12 Jun 2013 14:17:32 +0300, Νικόλαος Κούρας wrote: doesn't that mean? if '=' not in ( name and month and year ): if '=' does not exists as a char inside the name and month and year variables? i think it does, but why it fails then? No. Python is very close to

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 11:55 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: In English: the cat is in the box or the cupboard or the kitchen means: the cat is in the box, or the cat is in the cupboard, or the cat is in the kitchen. But that is not how Python works. In

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Kushal Kumaran
Chris Angelico ros...@gmail.com writes: On Thu, Jun 13, 2013 at 11:55 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: In English: the cat is in the box or the cupboard or the kitchen means: the cat is in the box, or the cat is in the cupboard, or the cat is in the

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Chris Angelico
On Thu, Jun 13, 2013 at 2:35 PM, Kushal Kumaran kushal.kumaran+pyt...@gmail.com wrote: In [4]: 'cd' in s1 or 'cd' in s2 or 'cd' in s3 Out[4]: False In [5]: 'cd' in s1+s2+s3 Out[5]: True That's why I said it works for *character* in string, not *string* in string. If your first operand is a

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Νικόλαος Κούρας
On 13/6/2013 4:55 πμ, Steven D'Aprano wrote: On Wed, 12 Jun 2013 14:17:32 +0300, Νικόλαος Κούρας wrote: doesn't that mean? if '=' not in ( name and month and year ): if '=' does not exists as a char inside the name and month and year variables? i think it does, but why it

A certainl part of an if() structure never gets executed.

2013-06-11 Thread Νικόλαος Κούρας
[code] if not re.search( '=', name ) and not re.search( '=', month ) and not re.search( '=', year ): cur.execute( '''SELECT * FROM works WHERE clientsID = (SELECT id FROM clients WHERE name = %s) and MONTH(lastvisit) = %s and YEAR(lastvisit) = %s ORDER BY

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread Mark Lawrence
On 11/06/2013 21:20, Νικόλαος Κούρας wrote: [code] if not re.search( '=', name ) and not re.search( '=', month ) and not re.search( '=', year ): cur.execute( '''SELECT * FROM works WHERE clientsID = (SELECT id FROM clients WHERE name = %s) and

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread MRAB
On 11/06/2013 21:20, Νικόλαος Κούρας wrote: [code] if not re.search( '=', name ) and not re.search( '=', month ) and not re.search( '=', year ): cur.execute( '''SELECT * FROM works WHERE clientsID = (SELECT id FROM clients WHERE name = %s) and

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread Rick Johnson
Umm, Niko. (Superfluous Unicode Removed) The code you have written is very difficult to read because you are doing too much inside the conditional and you're repeating things!. For starters you could compile those regexps and re-use them: ## BEGIN SESSION ## py import re py s = \ ... hello.

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread alex23
On Jun 12, 6:20 am, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: [code] http://pythonconquerstheuniverse.wordpress.com/2009/09/10/debugging-in-python/ Hey, I have a problem, here is my code, you work it out is not a valid debugging technique. --

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread nagia . retsina
Τη Τετάρτη, 12 Ιουνίου 2013 1:43:21 π.μ. UTC+3, ο χρήστης MRAB έγραψε: On 11/06/2013 21:20, Νικόλαος Κούρας wrote: [code] if not re.search( '=', name ) and not re.search( '=', month ) and not re.search( '=', year ): cur.execute( '''SELECT * FROM

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread Rick Johnson
On Tuesday, June 11, 2013 8:25:30 PM UTC-5, nagia@gmail.com wrote: is there a shorter and more clear way to write this? i didnt understood what Rick trie to told me. My example included verbatim copies of interactive sessions within the Python command line. You might understand them

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread MRAB
On 12/06/2013 02:25, nagia.rets...@gmail.com wrote: Τη Τετάρτη, 12 Ιουνίου 2013 1:43:21 π.μ. UTC+3, ο χρήστης MRAB έγραψε: On 11/06/2013 21:20, Νικόλαος Κούρας wrote: [snip] What are the values of 'name', 'month' and 'year' in each of the cases? Printing out ascii(name), ascii(month) and

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread alex23
On Jun 12, 11:46 am, Rick Johnson rantingrickjohn...@gmail.com wrote: Utilizing the power of interactive sessions, for learning and debugging, should be a cornerstone fundamental of your programming work-flow when writing code in an interpreted language like Python. Unfortunately with Ferrous,

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread Chris Angelico
On Wed, Jun 12, 2013 at 11:57 AM, alex23 wuwe...@gmail.com wrote: On Jun 12, 11:46 am, Rick Johnson rantingrickjohn...@gmail.com wrote: Utilizing the power of interactive sessions, for learning and debugging, should be a cornerstone fundamental of your programming work-flow when writing code

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread alex23
On Jun 12, 12:05 pm, Chris Angelico ros...@gmail.com wrote: You have to include the coding phase. How else would he get into an error state? Via copy paste. -- http://mail.python.org/mailman/listinfo/python-list

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread Rick Johnson
On Tuesday, June 11, 2013 9:14:38 PM UTC-5, alex23 wrote: On Jun 12, 12:05 pm, Chris Angelico ros...@gmail.com wrote: You have to include the coding phase. How else would he get into an error state? Via copy paste. Now that's more like it Alex! If you move to my side the Python

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread Rick Johnson
On Tuesday, June 11, 2013 10:37:39 PM UTC-5, Rick Johnson wrote: Now that's more like it Alex! Opps, it seems i falsely interpreted Chris's post as directed towards me, and then with that false assumption in mind i went on to falsely interpreted reply to Chris. Folks if your not already

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread Michael Torrie
On 06/11/2013 02:20 PM, Νικόλαος Κούρας wrote: [code] if not re.search( '=', name ) and not re.search( '=', month ) and not re.search( '=', year ): What do each of these functions return? When you print out re.search('=', name) what happens? When you're debugging you should

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread Michael Torrie
On 06/11/2013 10:49 PM, Michael Torrie wrote: --- my_cgi_script.py --- import do_something # handle cgi stuff # get name, month year dosomething.dosomething(name, month, year) Make that do_something.do_something --

Re: A certainl part of an if() structure never gets executed.

2013-06-11 Thread Tim Roberts
?? nikos.gr...@gmail.com wrote: [code] if not re.search( '=', name ) and not re.search( '=', month ) and not re.search( '=', year ): cur.execute( '''SELECT * FROM works WHERE clientsID = (SELECT id FROM clients WHERE name = %s) and

<    1   2