#python - Thu 22 Mar 2007 between 00:00 and 00:08

NY Lost Funds



neurophyreHow can I modify the runQuery function in this to take multiple arguments such that they are printed and then dispatched to dbpool.runQuery()? I haven't dealt with multiple args yet.
http://rafb.net/p/7AwShp87.html
sanxiynCSWookie: I guess I hallucinated.
marienzneurophyre: when you say "multiple" do you mean "any number"?
sanxiynCSWookie: But I think it does work on Windows too
?
marienzneurophyre: probably def runQuery(*args), see the tutorial
neurophyre: unless you simply mean runQuery(arg1, arg2) in which case also see the tutorial :)
neurophyremarienz: It's for something of the format PostgresInterface.runQuery("INSERT INTO Users (Username, PasswordSHA1, DoingField) VALUES (%s, %s, %s);", (username, passwordSHA.hexdigest(), 'Message system'));
marienz: so is that just 2 arguments?
CSWookiesanxiyn: Static compile, maybe?
sanxiynCSWookie: ?
marienzneurophyre: that looks like two arguments to me, yes.
sanxiynCSWookie: As far as I know Python/Win32 doesn't use any form of readline.
neurophyrewhat is a set of values in parens, if not a list?
marienzneurophyre: although you might prefer to use one argument for the sql and *args for the arguments.
neurophyre: a tuple.
CSWookiesanxiyn: I was hypothesizing why it would work on windows (presuming windows lacks readline).
marienzneurophyre: see the tutorial :)
neurophyremarienz: thanks
CSWookiesanxiyn: Right, but if you compile it all in, it doesn't need one.
sanxiyn: It's part of the executable, so no DLL has to be out there.
sanxiynCSWookie: No readline-like keys work on Python/Win32.
CSWookiesanxiyn: Oh, really?
sanxiynCSWookie: But history works. So I'm pretty sure static compile is not the case.
CSWookiesanxiyn: Sucks to be them!
sanxiynCSWookie: Try it yourself.
(Type some words and press ^A.)
CSWookiesanxiyn: I would have to have a Windows computer with Python.
sanxiynWell, I tried a minute ago. Python 2.5 from python.org.
marienzafaik a windows "terminal window" isn't as featureful as your average unixy term is
sanxiynmarienz: How?
CSWookiemarienz: Windows terminal window isn't as featureful as a pen and paper.
marienzor at least doesn't work in the same way.
sanxiynWell, that's true.
marienzsee for example lack of ncurses working directly in a windows "terminal" window
afaik the only way to use ncurses on windows is inside a different term emulator
CSWookiesanxiyn: It's tab-completion doesn't play nicely with its history.
sanxiynmarienz: That's ncurses's problem, right?
CSWookies/It's/Its/

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 

IrcArchive

NY Lost Funds