diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 06:49:51 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-17 06:49:51 +0000 |
commit | ce96f69d69a6020c780145c89a17a8391b63624b (patch) | |
tree | 7325a9bfaddf191e49910532df1fa4210c335196 /Demo/sockets/ftp.py | |
parent | 9e2b9665ae9f94a07da54156c48e2cd411a23746 (diff) | |
download | cpython-git-ce96f69d69a6020c780145c89a17a8391b63624b.tar.gz |
Get rid of a bunch more raw_input references
Diffstat (limited to 'Demo/sockets/ftp.py')
-rwxr-xr-x | Demo/sockets/ftp.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Demo/sockets/ftp.py b/Demo/sockets/ftp.py index 6e9282a592..eed45befc4 100755 --- a/Demo/sockets/ftp.py +++ b/Demo/sockets/ftp.py @@ -130,6 +130,11 @@ def getdata(r): sys.stdout.write(data) print '(end of data connection)' +def raw_input(prompt): + sys.stdout.write(prompt) + sys.stdout.flush() + return sys.stdin.readline() + # Get a command from the user. # def getcommand(): @@ -143,4 +148,5 @@ def getcommand(): # Call the main program. # -main() +if __name__ == '__main__': + main() |