[Tutor] Python Help

Nirav Patel nimmy021 at yahoo.com
Wed Jun 24 21:25:46 CEST 2015


Hi, my name is Nirav. 
I have a question about my code. I am a student at a university that does research using a program called VisIt. We use VisIt to help our learning in computational fluid dynamics and using the information, we study the turbulence of scramjets. 
One simple thing I am trying to do is using python to call a command that processes all the files that exist within the directory by having visit access the files. 
I have started to code below, but every time the code is executed, I get an error that says, "u-name command not found" along with an error that says, "VisIt is not supported by platform." I know my information is hard to follow or comprehend, but I really need to find a way to get this code working. 
Thank you in advance!
import osos.environ["PATH"]= '/Applications/VisIt.app/Contents/Resources/bin/'files = os.listdir('/Users/niravpatel/Desktop/Visit /plotfiles')print filesfor file in files:    if '.py' in file:        import subprocess        subprocess.call(['visit', '-nowin', '-cli'])        


More information about the Tutor mailing list