On Oct 14, 5:59 pm, Jorgen Grahn grahn+n...@snipabacken.se wrote:
But this sentence on the home page
The documentation is sadly outdated, but may be
a starting point:
made me stop looking. As far as I can tell, you cannot even find out
what's so advanced about it (or why advanced
Testoob is the advanced Python test runner and testing framework that
spices up any existing unittest test suite.
Home: http://code.google.com/p/testoob
Version 1.15 (Oct. 2009) adds better Python 2.6, IronPython, and
Jython support, as well as test coverage improvements, better color
support,
,
Ori.
[EMAIL PROTECTED] wrote:
oripel:
Maybe this is a silly suggestion, the docstring is already overloaded,
but it may be used for this too:
def foo():
...
...
@ATTR name=Xander
@ATTR age=10
@ATTR hobby=knitting
...
(Or somethins similar without
Thanks!
Now I see it's accepted to assume nice decorators that update __dict__.
At least until __decorates__ or something similar is added...
fumanchu wrote:
oripel wrote:
I'm trying to attach some attributes to functions and methods, similar
to Java annotations and .NET attributes
Thanks Paddy - you're showing normal use of function attributes.
They're still hidden when wrapped by an uncooperative decorator.
Paddy wrote:
oripel wrote:
Hi,
I'm trying to attach some attributes to functions and methods, similar
to Java annotations and .NET attributes.
I also want
Thanks,
In Python 2.5 there are also functools.wraps and
functools.update_wrapper:
http://docs.python.org/dev/whatsnew/pep-309.html
George Sakkis wrote:
oripel wrote:
Thanks Paddy - you're showing normal use of function attributes.
They're still hidden when wrapped by an uncooperative
Module 'subprocess' may be a better fit for you than fork+exec.
Here's an example with a signal handler
(1) use subprocess, don't fork and exec
(2) maybe this will help:
---
import signal, subprocess
# define the signal handler
def logsignal(signum, frame):
print Caught signal
# register the
Hi,
I'm trying to attach some attributes to functions and methods, similar
to Java annotations and .NET attributes.
I also want to use a convenient decorator for it, something along the
lines of
@attr(name=xander, age=10)
def foo():
...
Assigning attributes to the function will work, as will