Re: [Tutor] no luck with sqlinsert

2011-01-14 Thread Jason Staudenmayer
Don't build you sql separate from the execute (or so I was told when I was doing something similar) cur.execute(INSERT INTO tkindbtal (kommune, komnr, i2005, i2006, i2007 \ , i2008, i2009, i2010) VALUES (%s, %s,%s, %s, %s, %s,\ %s, %s) % (cols[0], cols[1], int(cols[2

Re: [Tutor] how avoid writing a newline?

2011-01-12 Thread Jason Staudenmayer
You should have a comma after the "#" in the highlighted print statement, that should repress the new line (I'm guessing that's the line you're talking about) print >> f,t,"#", Jason ..·><º> -Original Message- From: tutor-bounces+jasons=adventureaquarium@python.org [mai

Re: [Tutor] shlex.split if there is an apostrophe in the string?

2011-01-07 Thread Jason Staudenmayer
> -Original Message- > From: tutor-bounces+jasons=adventureaquarium@python.org > [mailto:tutor-bounces+jasons=adventureaquarium@python.org] > On Behalf Of Sean Carolan > Sent: Friday, January 07, 2011 2:22 PM > To: Tutor@python.org > Subject: [Tutor] shlex.split if there is an ap

Re: [Tutor] user input help

2011-01-05 Thread Jason Staudenmayer
> -Original Message- > From: Alex Hall [mailto:mehg...@gmail.com] > Sent: Wednesday, January 05, 2011 3:23 PM > To: Jason Staudenmayer > Cc: tutor@python.org > Subject: Re: [Tutor] user input help > > > On 1/5/11, Jason Staudenmayer wrote: > > Hi all,

[Tutor] user input help

2011-01-05 Thread Jason Staudenmayer
Hi all, I'm pretty new to programming in general and figured I'd try out python. I'm working on a small program to add users to a sqlite db. The problem I'm having it dealing with the user input, I'd like to be able to repeat the function to get the input if the user doesn't accept it. here's