#!/usr/bin/env python
#
# This Python script launches OVITO in scripting mode and turns off
# the graphical user-interface.
#
# It should be invoked like this:
#
#   ./ovitos MyScript.py [param1] [param2] ...
#

from sys import argv
from os import system
from os.path import split, abspath

executable = split(abspath(argv[0]))[0] + "/ovito"
arguments = ""
for a in argv[1:]:
	arguments = arguments + " \"" + a + "\""
system(executable + " --nobanner --nogui --script %s" % arguments)
