Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess,datetime
- def startup(file):
- z = open(file,'r')
- # время начала запуска
- start = datetime.datetime.now().replace(microsecond=0)
- for i in z:
- v = ['/opt/mopac/MOPAC2012.exe',i]
- subprocess.check_output(v)
- # конечное время
- stop = datetime.datetime.now().replace(microsecond=0)
- z.close()
- return str(stop - start)
- # сколько времени понадобилось на расчет всех задач из файла /home/recrait/task.txt
- print 'Execution time: ' + startup('/home/recrait/task.txt')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement