python中的sleep cmd是如何工作的?

2024-04-25 09:21:39 发布

您现在位置:Python中文网/ 问答频道 /正文

在一个文件test1.py中,我调用另一个文件test2.py的函数。你知道吗

test1.py

def attente_evenements(self):
            self.checkLog.evnt_findLogIdentity()
            print "\t\t\t SHOULD HAVE GOT THE LOG FILE \n"

测试2.py

def evnt_findLogIdentity(self):
            sleep(180)
            print "\t\tLogging in is done \n "

我应该得到打印报表的顺序

  1. 登录完成
  2. 应该有日志文件

但为什么我会反过来呢

  1. 应该有日志文件
  2. 登录完成

??????你知道吗


Tags: 文件函数pyselfdefhaveprinttest1

热门问题