Python developers

2013-04-27 Thread act pet
http://tech.groups.yahoo.com/group/Python_Developers/ -- http://mail.python.org/mailman/listinfo/python-list

Re: better way?

2009-08-12 Thread Pet
On Aug 12, 4:29 pm, Scott David Daniels wrote: > Pet wrote: > > On 11 Aug., 22:19, "Rami Chowdhury" wrote: > >> Ah, my apologies, I must have been getting it confused with ON UPDATE   > >> [things]. Thanks for correcting me. > > >> On T

Re: better way?

2009-08-12 Thread Pet
On 12 Aug., 09:14, Dennis Lee Bieber wrote: > On Tue, 11 Aug 2009 11:45:50 -0700 (PDT), Pet > declaimed the following in gmane.comp.python.general: > > > Oh, forgotten to mention. It's PostGres > >         Really? There are still installations of an RDBMS that predate

Re: better way?

2009-08-11 Thread Pet
On 11 Aug., 22:19, "Rami Chowdhury" wrote: > Ah, my apologies, I must have been getting it confused with ON UPDATE   > [things]. Thanks for correcting me. > > On Tue, 11 Aug 2009 13:10:03 -0700, Matthew Woodcraft   > > wrote: > > "Rami Chowdhury" writes: > > >> IIRC Postgres has had ON DUPLICATE

Re: better way?

2009-08-11 Thread Pet
On 11 Aug., 21:23, "Rami Chowdhury" wrote: > IIRC Postgres has had ON DUPLICATE KEY UPDATE functionality longer than   > MySQL... > Ok, I've completely failed here :) Thanks, man > > > > > On Tue, 11 Aug 2009 11:45:50 -0700, Pet wrote: > > On 11 Au

Re: better way?

2009-08-11 Thread Pet
On 11 Aug., 20:39, Kushal Kumaran wrote: > On Tue, Aug 11, 2009 at 10:03 PM, someone wrote: > > Hello, > > > I'd like to make insert into db if record not exist otherwise update. > > to save typing list of columns in both statements I do following > > > > > > is there better or more readable way

Re: unicode confusing

2009-05-26 Thread Pet
On May 26, 9:29 am, Pet wrote: > On May 25, 6:07 pm, Paul Boddie wrote: > > > > > > > On 25 Mai, 17:39, someone wrote: > > > > Hi, > > > > reading content of webpage (encoded in utf-8) with urllib2, I can't > > > get parsed data into

Re: unicode confusing

2009-05-26 Thread Pet
t it's usually recommended that > you manipulate Unicode objects in your program where possible, and > here you should be able to let pyPgSQL deal with the encodings > preferred by the database. > Thanks for your suggestions! Sadly, I can't solve my problem... Pet > Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: formating query with empty parameter

2009-05-25 Thread Pet
On 25 Mai, 18:16, Tim Chase wrote: > >> To stave off this problem, I often use: > > >>    values = [ > >>     data['a'], > >>     data['b'], > >>     data['c'], > >>     data['d'], > >>     data['e'], > >>     data['f'], > >>     data['g'], > >>     ] > >>    params = ', '.join('%s' for _ in value

Re: formating query with empty parameter

2009-05-25 Thread Pet
On May 25, 3:26 pm, Tim Chase wrote: > if one of parameter in values is empty, I'm getting > TypeError: not enough arguments for format string > But how to handle such situation? It is ok for DB, that some of values > are empty. > def __insert(self, data): >         q

Re: formating query with empty parameter

2009-05-25 Thread Pet
On May 25, 2:50 pm, Peter Otten <__pete...@web.de> wrote: > Pet wrote: > > > someone wrote: > > > > Hello! > > > > > if one of parameter in values is empty, I'm getting > > > > TypeError: not enough arguments for format string > >

Re: formating query with empty parameter

2009-05-25 Thread Pet
On May 25, 2:25 pm, Pet wrote: > On May 25, 2:15 pm, "Diez B. Roggisch" wrote: > > > > > > > someone wrote: > > > Hello! > > > > if one of parameter in values is empty, I'm getting > > > TypeError: not enough arguments for fo

Re: formating query with empty parameter

2009-05-25 Thread Pet
On May 25, 2:15 pm, "Diez B. Roggisch" wrote: > someone wrote: > > Hello! > > > if one of parameter in values is empty, I'm getting > > TypeError: not enough arguments for format string > > > But how to handle such situation? It is ok for DB, that some of values > > are empty. > > > def __insert(s