У меня есть main.py
import application
def foo(args):
print("Invoked!")
def main():
app = application.Application()
# here i want to connect app.receivedMessage to foo
и мой application.py
class Application:
def __init__(self):
pass
def receivedMessage(self, args):
# somehow call foo(args)
В принципе, как я могу вызвать foo и передать аргументы при вызове ReceiveMessage. У меня есть и другие части класса Application, которые прослушивают сообщение USB и вызывают «gotMessage»
Спасибо