Hi!
I'm working with ArcGis program who read python scripts.
I need to run in background a gams file, .gms but I don't know how can I do this.
I searched at the internet and I saw this in this forum:
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
output = subprocess.Popen("gams " + gamspath + "\\" + filename + ".gms Lo=2 Lf="+ gamspath + "\\" + filename +"solved.txt" , stdout=subprocess.PIPE, startupinfo=startupinfo)
solvedFile = open(gamspath + "\\" + filename +"solved.txt" )
but when I run this code, changing only the filename, gives me an error like this: "NameError: name 'gamspath' is not defined" and I don't know how can I solve this...
Someone can help me please? Thank's!!