Re: Problem with string format

2009-03-11 Thread Terry Reedy
Mike314 wrote: Hello, I have a strange problem with the string format: '%s %s %s %s %s' % ['01', '02', '03', '04', '05'] Traceback (most recent call last): File "", line 1, in TypeError: not enough arguments for format string But as soon I use tuple it is working: '%s %s %s %s %s' % (

Re: Problem with string format

2009-03-10 Thread John Machin
On Mar 11, 4:07 pm, Mike314 wrote: > Hello, > >    I have a strange problem with the string format: > > >>> '%s %s %s %s %s' % ['01', '02', '03', '04', '05'] > > Traceback (most recent call last): >   File "", line 1, in > TypeError: not enough arguments for format string > > But as soon I use tu

Re: Problem with string format

2009-03-10 Thread Mensanator
On Mar 11, 12:07 am, Mike314 wrote: > Hello, > >    I have a strange problem with the string format: > > >>> '%s %s %s %s %s' % ['01', '02', '03', '04', '05'] > > Traceback (most recent call last): >   File "", line 1, in > TypeError: not enough arguments for format string > > But as soon I use t

Re: Problem with string format

2009-03-10 Thread Steven D'Aprano
On Tue, 10 Mar 2009 22:07:59 -0700, Mike314 wrote: > Hello, > >I have a strange problem with the string format: > '%s %s %s %s %s' % ['01', '02', '03', '04', '05'] > Traceback (most recent call last): > File "", line 1, in > TypeError: not enough arguments for format string > > But

Re: Problem with string -> int conversion ?

2005-08-31 Thread Fredrik Lundh
Madhusudan Singh wrote: >> if the callback code is Python, you should be able to add a print >> statement to the line just before the failing "int" call: >> >> print repr(signalrangestr), type(signalrangestr) >> signalrange = int(signalrangestr) >> >> that print statement should be all you

Re: Problem with string -> int conversion ?

2005-08-31 Thread Madhusudan Singh
Fredrik Lundh wrote: >> The code is : >> >> void Form3::getNPrange() >> { > > what language is this? Its python embedded in the designer workflow. pyuic extracts stuff from it, and generates a python script from the ui.h file. > > if the callback code is Python, you should be able to add a pr

Re: Problem with string -> int conversion ?

2005-08-30 Thread Fredrik Lundh
Madhusudan Singh wrote: > I am working with an application that I designed with the Designer > pyuic > workflow and I get the following error on trying to process the contents > of > a combobox : > > Traceback (most recent call last): > File "measure.py", line 908, in acquiredata >np=self.ge

Re: problem with string

2005-07-22 Thread Michael Hoffman
Tzanko Tzanev wrote: > #but there is an error in > playlist_txt += mp3id + mp3_title + mp3_artist It'd be a lot easier to help if you'd say what the error was. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with string

2005-07-22 Thread Bruno Desthuilliers
Tzanko Tzanev a écrit : > hi :) > I need some help for this script > I have please take care of indentation when posting code. > > cursor = conn.cursor() > cursor.execute("select * from playlist limit 5") > result = cursor.fetchall() > # iterate through resultset > playlist_t

Re: problem with string

2005-07-22 Thread John Machin
Tzanko Tzanev wrote: > hi :) > I need some help for this script > I have > > cursor = conn.cursor() > cursor.execute("select * from playlist limit 5") > result = cursor.fetchall() > # iterate through resultset > playlist_txt = '' > for record in result: > mp3id = record[0] > mp