On Oct 14, 5:59 pm, Jorgen Grahn 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" is a good thing)
>
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, an
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 th
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 wr
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 J
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 annota
quot;))
def foo():
...
Regards,
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
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