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
7ff90ef7
Commit
7ff90ef7
authored
Aug 18, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt to new syntax and don't print garbage on self.close().
parent
843d153f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Demo/sgi/video/VFile.py
Demo/sgi/video/VFile.py
+4
-4
No files found.
Demo/sgi/video/VFile.py
View file @
7ff90ef7
...
...
@@ -50,7 +50,7 @@ def conv_rgb8(rgb,d1,d2):
# xorigin, yorigin
# fallback
class
VinFile
()
:
class
VinFile
:
# init() and initfp() raise Error if the header is bad.
# init() raises whatever open() raises if the file can't be opened.
...
...
@@ -60,7 +60,7 @@ class VinFile():
return
self
.
initfp
(
sys
.
stdin
,
filename
)
return
self
.
initfp
(
open
(
filename
,
'r'
),
filename
)
def
initfp
(
self
,
(
fp
,
filename
)
):
def
initfp
(
self
,
fp
,
filename
):
self
.
colormapinited
=
0
self
.
magnify
=
1.0
self
.
xorigin
=
self
.
yorigin
=
0
...
...
@@ -400,7 +400,7 @@ def grab_hsv(w, h, pf):
# Notably it will accept almost any garbage and write it to the video
# output file
#
class
VoutFile
()
:
class
VoutFile
:
def
init
(
self
,
filename
):
if
filename
==
'-'
:
return
self
.
initfp
(
sys
.
stdout
,
filename
)
...
...
@@ -421,7 +421,7 @@ class VoutFile():
def
close
(
self
):
self
.
fp
.
close
()
self
.
initfp
(
None
,
None
)
self
=
self
.
initfp
(
None
,
None
)
def
setinfo
(
self
,
values
):
self
.
format
,
self
.
width
,
self
.
height
,
self
.
packfactor
,
\
...
...
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