Answer the question
In order to leave comments, you need to log in
How to pass parameters between modules in Python?
Hello. Please tell me there are 2 modules.
1.
import primer
class MyWin(QtGui.QMainWindow):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
# Write here button click event
self.ui.pushButton.clicked.connect(self.one)
def one(self):
info=str(self.ui.lineEdit.text())
primer.start(info) try like this but get error
2 .and the second, in which you need to accept the info parameter from the one function of the first module.
def start (info):
print(info)
throws an error : The event loop is already running
Please help resolve this issue.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question