Re: Replace one element of a tuple (LONG)

2006-06-02 Thread Bruno Desthuilliers
Captain Dondo a écrit : (snip) > c=masterDB.cursor() > c.execute("""SELECT title, subtitle, starttime FROM recorded""") > > # build our dialog checkbox > > d = dialog.Dialog(dialog="dialog") > d.add_persistent_args(["--backtitle", "Myth2Go"]) > > recordings=[] > for listing in c.fetchall(): >

Re: Replace one element of a tuple (LONG)

2006-06-01 Thread Captain Dondo
BartlebyScrivener wrote: >>>that one column is always the same, the name of the host that >>>the database resides on. > > > Then why are you pulling all of the other stuff out of the db? Why > don't you just > > UPDATE tablename > SET hostname(or colname) = 'localhost' > WHERE search con

Re: Replace one element of a tuple (LONG)

2006-06-01 Thread BartlebyScrivener
>> that one column is always the same, the name of the host that >> the database resides on. Then why are you pulling all of the other stuff out of the db? Why don't you just UPDATE tablename SET hostname(or colname) = 'localhost' WHERE search condition = the rows you want to change --

Re: Replace one element of a tuple (LONG)

2006-06-01 Thread Captain Dondo
Brian wrote: > Captain Dondo wrote: > >>What I'd like to do is build the correct selectlist in the first place, >>rather than build the wrong one and then rebuild a correct one. > > > This is sounding more like a SQL/DB problem and less like a Python one. > If you have a field that is being pul

Re: Replace one element of a tuple (LONG)

2006-06-01 Thread Brian
Captain Dondo wrote: > What I'd like to do is build the correct selectlist in the first place, > rather than build the wrong one and then rebuild a correct one. This is sounding more like a SQL/DB problem and less like a Python one. If you have a field that is being pulled from the database that

Re: Replace one element of a tuple (LONG)

2006-06-01 Thread Captain Dondo
BartlebyScrivener wrote: >>>I've looked at various search-and-replace snippets but none that address >>>what I am trying to do > > > I think you need to tell more about what you're trying to do. You say > it's in a database? Is that why you can't just put the whole blob in > your text editor

Re: Replace one element of a tuple

2006-06-01 Thread BartlebyScrivener
>> I've looked at various search-and-replace snippets but none that address >> what I am trying to do I think you need to tell more about what you're trying to do. You say it's in a database? Is that why you can't just put the whole blob in your text editor and do search-and-replace? And is t

Re: Replace one element of a tuple

2006-06-01 Thread [EMAIL PROTECTED]
Captain Dondo wrote: > I have an array(?) (sorry, I'm new* to python so I'm probably mangling > the terminology) that looks like this: > > [((1028L, datetime.datetime(2006, 5, 30, 7, 0), datetime.datetime(2006, > 5, 30, 7, 30), 'Arthur', 'Prunella Sees the Light; Return of the > Snowball', 'Prunel

Replace one element of a tuple

2006-06-01 Thread Captain Dondo
I have an array(?) (sorry, I'm new* to python so I'm probably mangling the terminology) that looks like this: [((1028L, datetime.datetime(2006, 5, 30, 7, 0), datetime.datetime(2006, 5, 30, 7, 30), 'Arthur', 'Prunella Sees the Light; Return of the Snowball', 'Prunella prepares for a sleepover wi