#python - Sun 18 Feb 2007 between 12:15 and 12:41

NY Lost Funds



masterdriverzerrorlevel: sounds like you're going about it the wrong way
errorlevelmasterdriverz: Well, it is the first time I've done drag-and-drop in an application, so I'm not really sure what the right way would be.
masterdriverzare you using a toolkit?
veracon_Anyone have a simple function (regexp-based?) to "commafy" a string-contained number (like 1000000.1234 => 1,000,000.1234)?
errorlevelmasterdriverz: Yeah, pygtk.
masterdriverzerrorlevel: s = "mystring"; res = drag-n-drop(s); string = drop-n-drag(res)
something like that probably
oh
what function?
veracon_Never mind, I got it.
ehirddoes idle require any cnfig to use tk/mac?
its using x11 with the fink python pkg
errorlevelmasterdriverz: http://pygtk.org/docs/pygtk/class-gtkselectiondata.html#method-gtkselectiondata--set
masterdriverzerrorlevel: s = "mystring"; res = SelectionData.set(foo, bar, s) probably
you can still use s afterwards
ehirdanyone
masterdriverzehird: why don't you try it and find out?
ehird.... how the hell am i meant to test that? python.pkg = aqua idle. fink = x11 idle. can't find any commandline opts to tweak tcltk
:/
SnoronIs there any way to do this: list='a','b','c'; foo(var1,var2,var3); and then call foo() using the separate variables in list instead of passing it the list itself
masterdriverzfoo(*list)
Snoronah, thanks - i noticed twisted does something like this with callbacks so i figured it was possible :P
Come to think of it, I already knew about this, I'm just not thinking :)
masterdriverz:)
TweyIs there a way to use "in" that would return true if *all* of the elements in the left operand were in the right operand?
For example, ["x", "y", "z"] in ["a", "x", "b", "y", "c", "z", "d"]
masterdriverzuse sets
TweySets, hm?
masterdriverzset(foo) <= set(bar)
or set(foo).issubset(set(bar))
that will return True if all for foo is in bar
TweyAh, thank you
Leedsmasterdriverz: do you know if that short-circuits?
masterdriverzLeeds: hmm?
Leedssorry, misread
ignore me
masterdriverzheh
Leedsactually, no... it can short-circuit for the False case
AzMoolistOfNewObjects = [object, object, object] <--- Is there shorthand for that? Like listOfNewObjects = [object * 3] or something?
Leedsfor i in foo: if i not in bar: return False ; return True

Page: 3 10 17 24 31 38 

IrcArchive

NY Lost Funds