summaryrefslogtreecommitdiffstats
path: root/Demo/sockets/ftp.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/sockets/ftp.py')
-rwxr-xr-xDemo/sockets/ftp.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Demo/sockets/ftp.py b/Demo/sockets/ftp.py
index 6e9282a..eed45be 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()