Re: [Tutor] String with literal %s

2014-03-20 Thread Steven D'Aprano
On Thu, Mar 20, 2014 at 04:18:35PM +, Alan Gauld wrote: > On 20/03/14 14:46, Toni Fuente wrote: > > >I am trying to create a string this way: > > > >insertion = "INSERT INTO mytable(week %s) VALUES (\%s, \%s)" % osStringI Don't do this! The world has far too many software vulnerable to code

Re: [Tutor] String with literal %s

2014-03-20 Thread Toni Fuente
* Alan Gauld [2014-03-20 16:18:35 +]: > On 20/03/14 14:46, Toni Fuente wrote: > > >I am trying to create a string this way: > > > >insertion = "INSERT INTO mytable(week %s) VALUES (\%s, \%s)" % osStringI > > > >not enough arguments for format string > > > >Where the first %s is going to be s

Re: [Tutor] String with literal %s

2014-03-20 Thread Toni Fuente
* Alex Kleider [2014-03-20 09:02:41 -0700]: > On 2014-03-20 07:46, Toni Fuente wrote: > >Hi again, > > > >I am trying to create a string this way: > > > >insertion = "INSERT INTO mytable(week %s) VALUES (\%s, \%s)" % > >osStringI > > > >not enough arguments for format string > > > >Where the firs

Re: [Tutor] String with literal %s

2014-03-20 Thread Alan Gauld
On 20/03/14 14:46, Toni Fuente wrote: I am trying to create a string this way: insertion = "INSERT INTO mytable(week %s) VALUES (\%s, \%s)" % osStringI not enough arguments for format string Where the first %s is going to be substitute by the variable osStringI, but the other two VALUES (\%s,

Re: [Tutor] String with literal %s

2014-03-20 Thread Alex Kleider
On 2014-03-20 07:46, Toni Fuente wrote: Hi again, I am trying to create a string this way: insertion = "INSERT INTO mytable(week %s) VALUES (\%s, \%s)" % osStringI not enough arguments for format string Where the first %s is going to be substitute by the variable osStringI, but the other tw

[Tutor] String with literal %s

2014-03-20 Thread Toni Fuente
Hi again, I am trying to create a string this way: insertion = "INSERT INTO mytable(week %s) VALUES (\%s, \%s)" % osStringI not enough arguments for format string Where the first %s is going to be substitute by the variable osStringI, but the other two VALUES (\%s, \%s), should be created as li