Python script - complete execution of one line before the next

  • Hi friends,


    Perhaps someone can help with this problem.



    Question :- This code prints res = None. Without changing def main - how can the correct reply 'res' be printed ?


    Can 'timer' be used somehow in openTest to delay print "res =", res ?


    Regards, pcd.

  • The problem ist that the ChoiceBox is called non-blocking and you don't have any possibility to wait for it in the main-thread.


    A similar problem has been discussed in that German thread: [Gelöst] Python - Warten bis Unterfunktion beendet ist?
    Maybe the solutions presented there can help you :)

    so long
    m0rphU



    :aufsmaul: Kein Support per PN! :aufsmaul:

  • Thank you.


    The easy way will be to put a sleep loop in the main thread. But the main code represents a dialog event which occurs many times in the program. I was looking for a solution to avoid many code changes.


    Thanks again, pcd.