Re: % symbol in python

2014-10-29 Thread Mark Lawrence
On 29/10/2014 05:48, satishmlm...@gmail.com wrote: kindly let me know what does %%(%s)% mean What did you not understand from the link I posted ten hours ago? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://m

Re: % symbol in python

2014-10-28 Thread satishmlmlml
kindly let me know what does %%(%s)% mean -- https://mail.python.org/mailman/listinfo/python-list

Re: % symbol in python

2014-10-28 Thread alex23
On 29/10/2014 2:41 PM, satishmlm...@gmail.com wrote: > kindly let me know what is $ROWS$ along with % symbol's meaning It's a token, a static value added to the template to indicate where additional data will be added. So $ROW$ in this section: key $ROWS$ > Will be replaced by wh

Re: % symbol in python

2014-10-28 Thread satishmlmlml
import cgi, shelve, sys, os shelvename = 'class-shelve' fieldnames = ('name', 'age', 'job', 'pay') form = cgi.FieldStorage() print('Content-type: text/html') sys.path.insert(0, os.getcwd()) replyhtml = """ People Input Form key $ROWS$ """ rowhtml = '%s\n' rows

Re: % symbol in python

2014-10-28 Thread Chris Angelico
On Wed, Oct 29, 2014 at 2:51 PM, wrote: > def fetchRecord(db, form): > try: > key = form['key'].value When you paste Python code into an email, it's absolutely crucial that you maintain formatting. The indentation is significant. Can you paste it again, please? ChrisA -- https://mail.python.or

Re: % symbol in python

2014-10-28 Thread satishmlmlml
import cgi, shelve, sys, os shelvename = 'class-shelve' fieldnames = ('name', 'age', 'job', 'pay') form = cgi.FieldStorage() print('Content-type: text/html') sys.path.insert(0, os.getcwd()) replyhtml = """ People Input Form key $ROWS$ """ rowhtml = '%s\n' rowshtml = '' for fieldname in fi

Re:% symbol in python

2014-10-28 Thread Dave Angel
satishmlm...@gmail.com Wrote in message: > key > rowhtml = '%s\n" > > what does % mean in first line of code and > what does %%(%s)s mean in second line of code > > kindly explain > Please post Python code, and we can try to comment on it. Those extra and thingies are really killing my menta

Re: % symbol in python

2014-10-28 Thread Mark Lawrence
On 28/10/2014 21:41, satishmlm...@gmail.com wrote: key rowhtml = '%s\n" what does % mean in first line of code and what does %%(%s)s mean in second line of code kindly explain Please refer to https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting -- My fellow Pytho

% symbol in python

2014-10-28 Thread satishmlmlml
key rowhtml = '%s\n" what does % mean in first line of code and what does %%(%s)s mean in second line of code kindly explain -- https://mail.python.org/mailman/listinfo/python-list