Thanks Alan, Peter
but didn't work
nextrow=(cursor1.execute(query, (design1,))).fetchone()
AttributeError: 'NoneType' object has no attribute 'fetchone'
1. Yes Alan, the variable 'design1' has a value '1'.
This is how I tested it from python command :
>>> import psycopg2
>>> import datetim
On Mon, May 09, 2016 at 06:13:32PM +1000, Chris Roy-Smith wrote:
> data = [[" " for x in range(9)] for y in range(count)]
> for (ddate, mood, walk, lag, sleep) in curs:
> data[row][0]=ddate
> data[row][1]=mood
> data[row][2]=walk
> data[row][3]=lag
> data[ro
On 09/05/16 22:14, nitin chandra wrote:
> for line1 in smallLIST1:
> design1 = line1[3]
> print design1
> nextRow=cursor1.execute("SELECT designation_name FROM designation
> WHERE designation_id = %s;", (design1))
> print nextRow
> print ""
> for row in line1:
>
On Mon, May 9, 2016 at 6:49 PM, Alan Gauld via Tutor wrote:
> On 09/05/16 22:03, Ondřej Rusek wrote:
>
>> but for 'tuples in list'... simple:
>>
>> data = []
>> for record in curs:
>>data += [record]
>
> Couldn't that be abbreviated to:
>
> date = list(curs)
>
I thought I nailed it earlier (an
On 09/05/16 22:03, Ondřej Rusek wrote:
> but for 'tuples in list'... simple:
>
> data = []
> for record in curs:
>data += [record]
Couldn't that be abbreviated to:
date = list(curs)
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/al
nitin chandra wrote:
> Hi All,
>
> I am trying to pass a variable to the following statement :
>
> for line1 in smallLIST1:
> design1 = line1[3]
> print design1
> nextRow=cursor1.execute("SELECT designation_name FROM designation
> WHERE designation_id = %s;", (design1))
Note that in
Dne 9.5.2016 v 10:13 Chris Roy-Smith napsal(a):
Hi
Python 3.4 Linux (ubuntu)
This code does what I want.
curs is the result of a mysql query
data = [[" " for x in range(9)] for y in range(count)]
for (ddate, mood, walk, lag, sleep) in curs:
data[row][0]=ddate
data[row][1]=mood
Hi All,
I am trying to pass a variable to the following statement :
for line1 in smallLIST1:
design1 = line1[3]
print design1
nextRow=cursor1.execute("SELECT designation_name FROM designation
WHERE designation_id = %s;", (design1))
print nextRow
print ""
for row in lin
Thank you all so much for your guidance! We will try these out during our
next class and will hopefully find success. We can't thank you enough for
your support!
Best, Lisa and students
On Mon, May 9, 2016 at 12:34 PM, Alan Gauld via Tutor
wrote:
> On 09/05/16 16:55, boB Stepp wrote:
>
> >> cla
On Mon, May 9, 2016 at 11:34 AM, Alan Gauld via Tutor wrote:
> On 09/05/16 16:55, boB Stepp wrote:
Did not! Lisa Hasler Waters (and her students?) wrote the code!!
[Snipped her code and Alan's comments.]
boB
___
Tutor maillist - Tutor@python.org
To
Chris Roy-Smith wrote:
> Hi
> Python 3.4 Linux (ubuntu)
>
> This code does what I want.
> curs is the result of a mysql query
>
>
> data = [[" " for x in range(9)] for y in range(count)]
> for (ddate, mood, walk, lag, sleep) in curs:
> data[row][0]=ddate
> data[row][1]=mood
>
On Mon, May 9, 2016 at 4:13 AM, Chris Roy-Smith
wrote:
> Hi
> Python 3.4 Linux (ubuntu)
>
> This code does what I want.
> curs is the result of a mysql query
>
>
does this work (untested)?
data = []
for stuff in curs:
data.append(stuff)
>
> While I don't know a better way to do this, i
On 09/05/16 16:55, boB Stepp wrote:
>> class dot:
>> def __init__(self, canvas, color):
>> self.canvas = canvas
>> self.id = canvas.create_oval(15, 15, 30, 30, fill='Blue',
>> tags='dot1')
>>
>> this = dot(canvas, 'blue')
You create an inst
Lisa Hasler Waters wrote:
> My students and I are creating a maze game in tkinter. We are trying to
> make the ball disappear when it hits the wall (black lines). We are not
> having much luck. The following code has run the best, but still, the ball
> does not disappear. Any advice would be appre
Hi
Python 3.4 Linux (ubuntu)
This code does what I want.
curs is the result of a mysql query
data = [[" " for x in range(9)] for y in range(count)]
for (ddate, mood, walk, lag, sleep) in curs:
data[row][0]=ddate
data[row][1]=mood
data[row][2]=walk
data[row][3]=la
Hello!
I am not one of the experts; instead, I am one of the learners. But
if you are seeking assistance on Tutor, it is necessary to post the
actual code that you successfully or unsuccessfully ran. If you were
unsuccessful, you need to copy and paste the full text of the error
messages you rec
On May 9, 2016 8:01 AM, "Lisa Hasler Waters" wrote:
>
> Dear Tutor,
>
> My students and I are creating a maze game in tkinter. We are trying to
> make the ball disappear when it hits the wall (black lines). We are not
> having much luck. The following code has run the best, but still, the ball
> d
Dear Tutor,
My students and I are creating a maze game in tkinter. We are trying to
make the ball disappear when it hits the wall (black lines). We are not
having much luck. The following code has run the best, but still, the ball
does not disappear. Any advice would be appreciated!
from tkinter
18 matches
Mail list logo