Skip to content
Snippets Groups Projects
Commit fa71894b authored by Yngve Levinsen's avatar Yngve Levinsen
Browse files

path handling

parent f7d07484
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,10 @@ args = parser.parse_args()
# A list to be filled depending on arguments given...
cmd = ["TraceWin64_noX11", "'"+args.project+"'"]
# Check that project path exist:
if not os.path.isfile(args.project):
raise ValueError('Project file does not exist')
if args.lattice:
cmd.append("dat_file="+args.lattice)
if args.frequency:
......@@ -37,6 +41,9 @@ if args.npart:
if args.energy:
cmd.append("energy1="+args.energy)
if args.outpath:
if not os.path.isdir(args.outpath):
print "WARNING: output directory does not exist, creating.."
os.makedirs(args.outpath)
cmd.append("path_cal='"+os.path.abspath(args.outpath)+"'")
if args.seed:
cmd.append("random_seed="+str(args.seed))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment