Access to variable from external imported module

robert no-spam at no-spam-no-spam.invalid
Thu Nov 23 23:34:37 CET 2006


GinTon wrote:
> Sorry, I mean access to local variable from a method
> 
> import module
> method(value)
> 
> I would to access to values that are created locally in that method

after the method has executed? usually the return value?
or you want to get all local variables, then make a func/method

def f(a=1):
    b=2
    c=3
    return locals()  #X/Object(locals())


--------


d=module.f()
print d['c']         # d.c
   




Robert



More information about the Python-list mailing list