How would i do this?
import random name = random random.name
I dont cant to use name = random.random, as name is something that could change
Not really sure what exactly you're trying to do... Read More
[QUOTE=lukerobi;1018593]thanks for the replies, but unfortunatly none of thee will work. I am basically trying to return a function from a library if it is not in a class. [code] import random class whatever(object): def __getattr___(self, name): if name not in locals(): return random.name [/code][/QUOTE] you should use [icode]getattr(random, name)[/icode] Read More
Edited by AutoPython: n/a