Andrew Berg wrote:

> I'm not sure the subject's wording is the best, but I'll try to explain.
> I have a main script that imports several modules and I need to be able
> to call methods from a class instance inside that main script from a
> module. Currently, functions can be defined to access the methods, but
> such functions can only be called via commands sent to the main script
> (it's an IRC bot, and commands are sent via IRC). What I want to do is
> call those methods without sending commands (I want to send an IRC
> message from an except clause).


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)



-- 
Steven

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to