| Ciantic | ohhh, any function was also introduced in 2.5? ... let me check |
| triplah | if all((test1(),test2(),test3()): nifty |
| deltab | yeah, but you don't really need it for that |
| Ciantic | one can just use "and" or && for that |
| deltab | it's most useful when you have several things to test provided by an iterable |
| Cerin | Has anyone run Edna as a service on Fedora? |
| deltab | Ciantic: python uses 'and', 'or' and 'not', not && || and ! |
| Cerin | The 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' |
| Ciantic | right, thanks, well I hit the sack now |
| Cerin | The 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. |
| dataangel | How 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) |
| deltab | dataangel: you need to make a function that returns a decorator |
| Borg7 | simple question: how do i merge a list of strings such as ['a','b','c'] into 'abc' |
| deltab | "".join(strings) |
| Borg7 | thx |
| dataangel | What's the preferred way to see if a dictionary has a key in Py3K? |
| deltab | k in d |
| ironfroggy | you are running the 3.x branch and you dont know that? |
| CountDown | deltab: compress is the functionality I want, but it apparently doesn't work with a numarray.RecArray. Suggestions? |
| deltab | CountDown: nope, sorry |
| ironfroggy | "doesn't work" is endlessly vague. |
| CountDown | AttributeError: 'RecArray' object has no attribute '_type' |
| ironfroggy | ok so what has a _type attribute and can you turn a RecArray into it? |
| CountDown | When executing: compress(zeros(len(a)), a) These are all types from numarray. |
| mnguyen | how do I convert an HTML character reference and entity reference? |
| deltab | mnguyen: an HTML parser, or using htmlentitydefs |
| mnguyen | deltab: thanks I was using HTMLParser deltab: had to write the handle_entity... function |
| deltab | ah |
| mnguyen | deltab: what do i need to import to use htmlentitydefs? sorry i'm new to python |
| deltab | mnguyen: htmlentitydefs |
| mnguyen | deltab: thanks |
| oneforall | fixed was a multilib issue patched that install.py and it works now |
| deltab | Ciantic: 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? |
| action | Jacob- has only ever seen cls |
| Jacob- | has only ever seen cls |
| Jerub | some people say klass, cls and class_ |