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
261cbb21
Commit
261cbb21
authored
Feb 19, 1991
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use readfile from util.py.
parent
56098fa2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
28 deletions
+2
-28
Lib/lib-stdwin/filewin.py
Lib/lib-stdwin/filewin.py
+1
-14
Lib/stdwin/filewin.py
Lib/stdwin/filewin.py
+1
-14
No files found.
Lib/lib-stdwin/filewin.py
View file @
261cbb21
# Module 'filewin'
# Module 'filewin'
# File windows, a subclass of textwin (which is a subclass of gwin)
# File windows, a subclass of textwin (which is a subclass of gwin)
import
stdwin
import
textwin
import
textwin
import
path
from
util
import
readfile
builtin_open
=
open
def
readfile
(
fn
):
# Return a string containing the file's contents
fp
=
builtin_open
(
fn
,
'r'
)
a
=
''
n
=
8096
while
1
:
b
=
fp
.
read
(
n
)
if
not
b
:
break
a
=
a
+
b
return
a
# FILE WINDOW
# FILE WINDOW
...
...
Lib/stdwin/filewin.py
View file @
261cbb21
# Module 'filewin'
# Module 'filewin'
# File windows, a subclass of textwin (which is a subclass of gwin)
# File windows, a subclass of textwin (which is a subclass of gwin)
import
stdwin
import
textwin
import
textwin
import
path
from
util
import
readfile
builtin_open
=
open
def
readfile
(
fn
):
# Return a string containing the file's contents
fp
=
builtin_open
(
fn
,
'r'
)
a
=
''
n
=
8096
while
1
:
b
=
fp
.
read
(
n
)
if
not
b
:
break
a
=
a
+
b
return
a
# FILE WINDOW
# FILE WINDOW
...
...
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