File: view_trajectory.py

package info (click to toggle)
mmtk 2.7.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,788 kB
  • ctags: 6,600
  • sloc: python: 18,050; ansic: 12,400; makefile: 129; csh: 3
file content (18 lines) | stat: -rw-r--r-- 491 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# This program will show an animation of the trajectory file given as
# an argument. Optional parameters indicate the configurations to be
# included (first, last, step).
#

from MMTK.Visualization import viewTrajectory
import string, sys

first, last, step = 0, None, 1
argc = len(sys.argv)
if argc > 2:
    first = string.atoi(sys.argv[2])
    if argc > 3:
	last = string.atoi(sys.argv[3])
	if argc > 4:
	    step = string.atoi(sys.argv[4])

viewTrajectory(sys.argv[1], first, last, step)