Is there any way to access attributes from an imported module?
Andrew Berg
bahamutzero8825 at gmail.com
Sun Oct 2 04:01:20 EDT 2011
More information about the Python-list mailing list
Sun Oct 2 04:01:20 EDT 2011
- Previous message (by thread): Is there any way to access attributes from an imported module?
- Next message (by thread): Is there any way to access attributes from an imported module?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2011.10.02 01:55 AM, Steven D'Aprano wrote: > Have I missed something? Why can't you just import the module and call the > methods like you would for any other module and class? > > import module > instance = module.Some_Class() > result = instance.method(some, arguments, may, be, needed) I need to affect the instance created in the main script; creating a new instance would be pointless (and AFAICT would result in the interpreter hitting a recursion limit since the module is imported during creation of the instance). -- CPython 3.2.2 | Windows NT 6.1.7601.17640 | Thunderbird 7.0
- Previous message (by thread): Is there any way to access attributes from an imported module?
- Next message (by thread): Is there any way to access attributes from an imported module?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list