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
cd69b54a
Commit
cd69b54a
authored
Feb 14, 1996
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed makefile() args from r/w to rb/wb, for non-unix compatability.
parent
3ded58dc
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
Lib/SocketServer.py
Lib/SocketServer.py
+2
-2
Lib/ftplib.py
Lib/ftplib.py
+2
-2
Lib/gopherlib.py
Lib/gopherlib.py
+1
-1
Lib/httplib.py
Lib/httplib.py
+1
-1
Lib/nntplib.py
Lib/nntplib.py
+1
-1
No files found.
Lib/SocketServer.py
View file @
cd69b54a
...
...
@@ -392,8 +392,8 @@ class StreamRequestHandler(BaseRequestHandler):
def
setup
(
self
):
self
.
connection
=
self
.
request
self
.
rfile
=
self
.
connection
.
makefile
(
'r'
)
self
.
wfile
=
self
.
connection
.
makefile
(
'w'
,
0
)
self
.
rfile
=
self
.
connection
.
makefile
(
'r
b
'
)
self
.
wfile
=
self
.
connection
.
makefile
(
'w
b
'
,
0
)
def
finish
(
self
):
self
.
wfile
.
flush
()
...
...
Lib/ftplib.py
View file @
cd69b54a
...
...
@@ -95,7 +95,7 @@ class FTP:
if
port
:
self
.
port
=
port
self
.
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
sock
.
connect
(
self
.
host
,
self
.
port
)
self
.
file
=
self
.
sock
.
makefile
(
'r'
)
self
.
file
=
self
.
sock
.
makefile
(
'r
b
'
)
self
.
welcome
=
self
.
getresp
()
# Get the welcome message from the server
...
...
@@ -288,7 +288,7 @@ class FTP:
if
not
callback
:
callback
=
print_line
resp
=
self
.
sendcmd
(
'TYPE A'
)
conn
=
self
.
transfercmd
(
cmd
)
fp
=
conn
.
makefile
(
'r'
)
fp
=
conn
.
makefile
(
'r
b
'
)
while
1
:
line
=
fp
.
readline
()
if
self
.
debugging
>
2
:
print
'*retr*'
,
`line`
...
...
Lib/gopherlib.py
View file @
cd69b54a
...
...
@@ -69,7 +69,7 @@ def send_selector(selector, host, port = 0):
s
.
connect
(
host
,
port
)
s
.
send
(
selector
+
CRLF
)
s
.
shutdown
(
1
)
return
s
.
makefile
(
'r'
)
return
s
.
makefile
(
'r
b
'
)
# Send a selector and a query string
def
send_query
(
selector
,
query
,
host
,
port
=
0
):
...
...
Lib/httplib.py
View file @
cd69b54a
...
...
@@ -82,7 +82,7 @@ class HTTP:
self.send('
\
r
\
n
')
def getreply(self):
self.file = self.sock.makefile('r')
self.file = self.sock.makefile('r
b
')
self.sock = None
line = self.file.readline()
if self.debuglevel > 0: print '
reply
:
', `line`
...
...
Lib/nntplib.py
View file @
cd69b54a
...
...
@@ -68,7 +68,7 @@ class NNTP:
self
.
port
=
port
self
.
sock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
sock
.
connect
(
self
.
host
,
self
.
port
)
self
.
file
=
self
.
sock
.
makefile
(
'r'
)
self
.
file
=
self
.
sock
.
makefile
(
'r
b
'
)
self
.
debugging
=
0
self
.
welcome
=
self
.
getresp
()
...
...
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