Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
7127634a
Commit
7127634a
authored
Nov 10, 2014
by
Shiquan Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mod: Open header files with `io.open` for Python 2/3 compatibility.
parent
4f2aeeff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
hdr_parser.py
modules/python/src2/hdr_parser.py
+2
-2
No files found.
modules/python/src2/hdr_parser.py
View file @
7127634a
#!/usr/bin/env python
from
__future__
import
print_function
import
os
,
sys
,
re
,
string
import
os
,
sys
,
re
,
string
,
io
# the list only for debugging. The real list, used in the real OpenCV build, is specified in CMakeLists.txt
opencv_hdr_list
=
[
...
...
@@ -734,7 +734,7 @@ class CppHeaderParser(object):
"""
self
.
hname
=
hname
decls
=
[]
f
=
open
(
hname
,
"rt"
)
f
=
io
.
open
(
hname
,
'rt'
,
encoding
=
'utf-8'
)
linelist
=
list
(
f
.
readlines
())
f
.
close
()
...
...
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