/[escript]/trunk/dudley/test/python/convection_viz.py
ViewVC logotype

Diff of /trunk/dudley/test/python/convection_viz.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3773 by jfenwick, Mon Oct 11 01:48:14 2010 UTC revision 3774 by jfenwick, Wed Jan 18 06:29:34 2012 UTC
# Line 46  filList = [] Line 46  filList = []
46  for i in range(i1, i2+1):  for i in range(i1, i2+1):
47    filList.append("state.%d.vtu" % (i))    filList.append("state.%d.vtu" % (i))
48    
49  print "Making a movie using files:  ", filList[0], "...", filList[len(filList)-1], "\n"  print("Making a movie using files:  ", filList[0], "...", filList[len(filList)-1], "\n")
50    
51  # Make sure all input files exist before starting  # Make sure all input files exist before starting
52  for filName in filList:  for filName in filList:
53    # Check that the name is a valid file    # Check that the name is a valid file
54    if not os.path.isfile(filName):    if not os.path.isfile(filName):
55      print "%s: Invalid input file '%s'\n" % (sys.argv[0], filName)      print("%s: Invalid input file '%s'\n" % (sys.argv[0], filName))
56      sys.exit(1)      sys.exit(1)
57    
58  # Now create the .jpg images for each input VTK file  # Now create the .jpg images for each input VTK file
# Line 62  for filName in filList: Line 62  for filName in filList:
62    
63    # Check that the name is a valid file    # Check that the name is a valid file
64    if not os.path.isfile(filName):    if not os.path.isfile(filName):
65      print "%s: Input file '%s' has disappeared\n" % (sys.argv[0], filName)      print("%s: Input file '%s' has disappeared\n" % (sys.argv[0], filName))
66      sys.exit(1)      sys.exit(1)
67    
68    print "Reading %s and writing %s" % (filName, imgName)    print("Reading %s and writing %s" % (filName, imgName))
69    imgList.append(imgName)    imgList.append(imgName)
70    
71    # Create a pyvisi Scene    # Create a pyvisi Scene
# Line 105  mov = Movie() Line 105  mov = Movie()
105  mov.imageList(input_directory = ".", image_list = imgList)  mov.imageList(input_directory = ".", image_list = imgList)
106  mov.makeMovie("movie.mpg")  mov.makeMovie("movie.mpg")
107    
108  print "\nCreated movie.mpg\n"  print("\nCreated movie.mpg\n")
109    

Legend:
Removed from v.3773  
changed lines
  Added in v.3774

  ViewVC Help
Powered by ViewVC 1.1.26