laurentA wrote:
> File "/usr/lib/python2.5/inspect.py", line 742, in getargspec
> raise TypeError('arg is not a Python function')
> TypeError: arg is not a Python function
>
Well, check what you are passing to "getargspec".
If the "func" parameter is not a callable, stop reading and follow it.
If it's a callable, try with this monkeypatch: the inspect module should
accept it, but it requires a function or method instead.
> import inspect
> from inspect import isfunction, ismethod, getargs
>
> def getargspec(func):
> if getattr(func, '__call__') and not isfunction(func) and not
> ismethod(func):
> func = func.__call__
> if ismethod(func):
> func = func.im_func
> if not isfunction(func):
> raise TypeError('arg is not a Python function')
> args, varargs, varkw = getargs(func.func_code)
> return args, varargs, varkw, func.func_defaults
>
> inspect.getargspec = getargspec
>
--
This e-mail (and any attachment(s)) is strictly confidential and for use only
by intended recipient(s). Any use, distribution, reproduction or disclosure by
any other person is strictly prohibited. The content of this e-mail does not
constitute a commitment by the Company except where provided for in a written
agreement between this e-mail addressee and the Company.
If you are not an intended recipient(s), please notify the sender promptly and
destroy this message and its attachments without reading or saving it in any
manner.
Any non authorized use of the content of this message constitutes a violation
of the obligation to abstain from learning of the correspondence among other
subjects, except for more serious offence, and exposes the person responsible
to the relevant consequences.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---