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
e466217a
Commit
e466217a
authored
Feb 19, 2006
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #1337756: fileinput now accepts Unicode filenames.
parent
e9b1949f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
Lib/fileinput.py
Lib/fileinput.py
+1
-1
Lib/test/test_fileinput.py
Lib/test/test_fileinput.py
+10
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/fileinput.py
View file @
e466217a
...
...
@@ -184,7 +184,7 @@ class FileInput:
"""
def
__init__
(
self
,
files
=
None
,
inplace
=
0
,
backup
=
""
,
bufsize
=
0
):
if
type
(
files
)
==
type
(
''
):
if
isinstance
(
files
,
basestring
):
files
=
(
files
,)
else
:
if
files
is
None
:
...
...
Lib/test/test_fileinput.py
View file @
e466217a
...
...
@@ -157,3 +157,13 @@ try:
verify
(
fi
.
lineno
()
==
6
)
finally
:
remove_tempfiles
(
t1
,
t2
)
if
verbose
:
print
"15. Unicode filenames"
try
:
t1
=
writeTmp
(
1
,
[
"A
\
n
B"
])
fi
=
FileInput
(
files
=
unicode
(
t1
,
sys
.
getfilesystemencoding
()))
lines
=
list
(
fi
)
verify
(
lines
==
[
"A
\
n
"
,
"B"
])
finally
:
remove_tempfiles
(
t1
)
Misc/NEWS
View file @
e466217a
...
...
@@ -366,6 +366,8 @@ Extension Modules
Library
-------
- Patch #1337756: fileinput now accepts Unicode filenames.
- Patch #1373643: The chunk module can now read chunks larger than
two gigabytes.
...
...
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