On Thu, Jun 3, 2010 at 1:48 PM, Dennis Lee Bieber <wlfr...@ix.netcom.com>wrote:
> On Thu, 3 Jun 2010 08:49:44 -0400, Victor Subervi > <victorsube...@gmail.com> declaimed the following in > gmane.comp.python.general: > > > options += '%s varchar(40) not null, ' % (op[0].upper() + op[1:]) > > Please modernize... Python supports a .capitalize() method for > strings (I haven't checked the references but I'm pretty sure that's > been there since 2.3 at least) > > >>> s = "this is a mess" > >>> s.capitalize() > 'This is a mess' > >>> > Thanks. Didn't know about that!! > > sql = "insert into tmp%s values (%s)" % (tmpTable, > > ", ".join("%s" * > > (4 + len(our_options))) > cursor.execute(sql, tuple([store, patientID, prodid, pkg] > + our_options)) > A minor tweak of this worked nicely. Thanks again! And thanks to MRAB, too! beno
-- http://mail.python.org/mailman/listinfo/python-list