【问题标题】:Waiting for some time before executing the next segment of codes in python3.2等待一段时间再执行python3.2中的下一段代码
【发布时间】:2012-06-28 15:51:24
【问题描述】:

我正在编写一个代码来运行一个 gui 应用程序(winmerge),然后向它发送一些击键。我需要在程序中等待一段时间,直到 GUI 完成运行,然后向它发送一些击键以保存报告。我该如何实施? wait() 不起作用,因为调用它后我无法将密钥发送到同一个窗口。

【问题讨论】:

    标签: python winapi user-interface python-3.x pywin32


    【解决方案1】:
    from time import sleep
    print "hi,"
    sleep(5)
    print "this is printed 5 seconds later"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多