#python - Thu 17 May 2007 between 00:00 and 01:01

NY Lost Funds



Cianticohhh, any function was also introduced in 2.5? ... let me check
triplahif all((test1(),test2(),test3()):
nifty
deltabyeah, but you don't really need it for that
Cianticone can just use "and" or && for that
deltabit's most useful when you have several things to test provided by an iterable
CerinHas anyone run Edna as a service on Fedora?
deltabCiantic: python uses 'and', 'or' and 'not', not && || and !
CerinThe service script distributed with Edna is garbage.
When I try to run it, I get IOError: [Errno 2] No such file or directory: '/etc/edna/templates/default.ezt'
Cianticright, thanks, well I hit the sack now
CerinThe templates are in /usr/lib/edna/templates and I'm doing PYTHONPATH=/usr/lib/edna; export PYTHONPATH at the top of my script, but it's not finding them.
dataangelHow do I write a decorator so that it takes two arguments, where the first argument is something I give it on the @ line and the second argument is the function below? i.e. I'd like to be able to do: @bind_key("f") def myfunc: pass and have that be equivalent to def myfunc: pass myfunc = bind_key("f", myfunc)
deltabdataangel: you need to make a function that returns a decorator
Borg7simple question: how do i merge a list of strings such as ['a','b','c'] into 'abc'
deltab"".join(strings)
Borg7thx
dataangelWhat's the preferred way to see if a dictionary has a key in Py3K?
deltabk in d
ironfroggyyou are running the 3.x branch and you dont know that?
CountDowndeltab: compress is the functionality I want, but it apparently doesn't work with a numarray.RecArray. Suggestions?
deltabCountDown: nope, sorry
ironfroggy"doesn't work" is endlessly vague.
CountDownAttributeError: 'RecArray' object has no attribute '_type'
ironfroggyok so what has a _type attribute and can you turn a RecArray into it?
CountDownWhen executing: compress(zeros(len(a)), a)
These are all types from numarray.
mnguyenhow do I convert an HTML character reference and entity reference?
deltabmnguyen: an HTML parser, or using htmlentitydefs
mnguyendeltab: thanks I was using HTMLParser
deltab: had to write the handle_entity... function
deltabah
mnguyendeltab: what do i need to import to use htmlentitydefs? sorry i'm new to python
deltabmnguyen: htmlentitydefs
mnguyendeltab: thanks
oneforallfixed was a multilib issue patched that install.py and it works now
deltabCiantic: by the way, when you make a classmethod, it's usual to use cls or class_ instead of self, and you should call it instead of the class by name
Jacob-class_, really?
actionJacob- has only ever seen cls
Jacob-has only ever seen cls
Jerubsome people say klass, cls and class_

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

IrcArchive

NY Lost Funds