3 # Add a cache to each of the files given as command line arguments
13 # file ... : file(s) to modify; default film.video
17 sys
.path
.append('/ufs/guido/src/video')
27 # Main program -- mostly command line parsing
30 opts
, args
= getopt
.getopt(sys
.argv
[1:], '')
42 def process(filename
):
44 fp
= open(filename
, 'r+')
45 vin
= VFile
.RandomVinFile(fp
)
46 vin
.filename
= filename
48 sys
.stderr
.write(filename
+ ': I/O error: ' + `msg`
+ '\n')
50 except VFile
.Error
, msg
:
51 sys
.stderr
.write(msg
+ '\n')
54 sys
.stderr
.write(filename
+ ': EOF in video file\n')
64 sys
.stderr
.write(filename
+ ': already has a cache\n')
75 # Don't forget to call the main program
79 except KeyboardInterrupt: