view pyloader/invoke.py @ 2:6cb7696edc4d

add some more stuff for string loady type things and rearrange structure
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 10 May 2011 09:28:40 -0700
parents
children 65d9a7c7ac63
line wrap: on
line source

import inspect

def call(obj, *args, **kwargs):
    """call a thing with string arguments"""
    inspected = obj
    if inspect.isclass(obj):
        inspected = obj.__init__ # inspect the ctor
    argspec = inspect.getargspec(inspected)