Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6f00a317
Commit
6f00a317
authored
Nov 06, 1991
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduced getopt.
Added -d option: print deltas instead of absolute times.
parent
b3c493cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
Demo/sgi/video/vinfo.py
Demo/sgi/video/vinfo.py
+15
-5
No files found.
Demo/sgi/video/vinfo.py
View file @
6f00a317
...
...
@@ -3,6 +3,7 @@ from GL import *
from
DEVICE
import
*
import
time
import
sys
import
getopt
class
Struct
():
pass
epoch
=
Struct
()
...
...
@@ -43,19 +44,28 @@ def saveframe(name, w, h, tijd, data):
f
.
close
()
def
main
():
if
len
(
sys
.
argv
)
>
1
:
names
=
sys
.
argv
[
1
:]
else
:
delta
=
0
opts
,
names
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'd'
)
for
opt
,
arg
in
opts
:
if
opt
=
'-d'
:
delta
=
1
if
names
=
[]:
names
=
[
'film.video'
]
for
name
in
names
:
f
,
w
,
h
,
pf
=
openvideo
(
name
)
try
:
f
,
w
,
h
,
pf
=
openvideo
(
name
)
except
:
sys
.
stderr
.
write
(
name
+
': cannot open
\
n
'
)
continue
print
name
,
':'
,
w
,
'x'
,
h
,
'; pf ='
,
pf
num
=
0
try
:
otijd
=
0
while
1
:
try
:
tijd
=
loadframe
(
f
,
w
,
h
,
pf
)
print
'
\
t
'
,
tijd
,
if
delta
:
print
'
\
t
'
,
tijd
-
otijd
,
else
:
print
'
\
t
'
,
tijd
,
otijd
=
tijd
num
=
num
+
1
if
num
%
8
=
0
:
print
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment