Open salastro opened 2 years ago
Currently, exec is used, which is very unpythonic and inefficient. There should be a way to get all the functions in the func.py and link them accordingly.
exec
func.py
operations = ["inte", "diff", "lim", "fact", "sol", "simp", "eval", "plot", "generate_pdf", "generate_latex"] for func in operations: exec(f""" \n@pyqtSlot() \ndef on_{func}_bt_clicked(self): \n self.mathdoc.{func}(self.expression.toPlainText().\ replace(" ", "")) """)
https://stackoverflow.com/a/49631500
Currently,
exec
is used, which is very unpythonic and inefficient. There should be a way to get all the functions in thefunc.py
and link them accordingly.