Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- # TODO: довести тут кое что до ума
- import guidata
- import guidata.dataset.datatypes as dt
- import guidata.dataset.dataitems as di
- class MopacAuto(dt.DataSet):
- mpath = di.StringItem("Mopac path:", default='/opt/mopac/MOPAC2012.exe')
- wfile = di.StringItem("Task file:",default='')
- def run_files(self):
- if self.wfile == '':
- raise IOError
- else:
- f = open(self.wfile,'r')
- import subprocess
- for i in f:
- p = [self.mpath,i]
- subprocess.check_output(p)
- f.close()
- if __name__ == "__main__":
- _app = guidata.qapplication()
- param = MopacAuto()
- e = param.edit()
- if e:
- param.run_files()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement