堂弟高考完,现在在选专业,主要是选择计算机和云计算这两个,对云计算比较关注,因为觉得是技术趋势,但是不太懂是该学计算机的时候兼顾云计算,还是直接选择云计算了。个人是怕计算机基础差,学了出来实践能力不够
import os
import time
file_path="AIMP2.lnk"
if os.path.lexists(file_path):
time.sleep(1)
if os.path.isfile(file_path):
fob=open(file_path,'r');
read=fob.readlines();
for i in read:
print i
else:
print "Selected path is not file"
else:
print "File not Found "+file_path
import os.path
import time
while not os.path.exists(file_path):
time.sleep(1)
if os.path.isfile(file_path):
# read file
else:
raise ValueError("%s isn't a file!" % file_path)
每次检查之后,需要等待一定的时间