Il giorno 28 marzo 2013 15:22, Marco Buttu <[email protected]> ha
scritto:
> for n_f in nfiles:
> mod = __import__(n_f)
> attributes = [getattr(mod, name) for name in dir(mod)]
> functions = [obj for obj in attributes if inspect.isfunction(obj)]
> for f in functions:
> print(f())
>
Grazie, è proprio quello che mi serviva... getattr continua a rimanere un
lato oscuro di Python per me.
Grazie
--
Daniele
www.fugamatematica.blogspot.com
giusto!
nel verso
forse è perché non guardiamo le cose
Quando non ci capiamo,
_______________________________________________
Python mailing list
[email protected]
http://lists.python.it/mailman/listinfo/python