Mar-31-2018, 02:37 PM
(This post was last modified: Mar-31-2018, 02:37 PM by Gribouillis.)
(Mar-31-2018, 02:15 PM)Zatox11 Wrote: Yes it works! Now I have to implement this into my GUI. GL meIt is not very comfortable to write a lot of code in a
if __name__ == '__main__'
block. I strongly suggest that you split your code into several files. For example the do_solve()
function could go in solvesudo
module, and you could write# tksudo.py if __name__ == '__main__': from guicode import main main()This allows you to write the GUI code in a separate module
guicode
without the __name__ == '__main__'
. The child process would not import the guicode module because the import statement is in the __name__ == '__main__'
part.