summaryrefslogtreecommitdiff
path: root/examples/ftp.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ftp.py')
-rwxr-xr-xexamples/ftp.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/ftp.py b/examples/ftp.py
index 18e444e..1a4d192 100755
--- a/examples/ftp.py
+++ b/examples/ftp.py
@@ -24,6 +24,10 @@ PEXPECT LICENSE
'''
+from __future__ import print_function
+
+from __future__ import absolute_import
+
import pexpect
import sys
@@ -50,7 +54,7 @@ child.interact() # Escape character defaults to ^]
# to each other now.
# At this point the script is running again.
-print 'Left interactve mode.'
+print('Left interactve mode.')
# The rest is not strictly necessary. This just demonstrates a few functions.
# This makes sure the child is dead; although it would be killed when Python exits.
@@ -59,7 +63,7 @@ if child.isalive():
child.close()
# Print the final state of the child. Normally isalive() should be FALSE.
if child.isalive():
- print 'Child did not exit gracefully.'
+ print('Child did not exit gracefully.')
else:
- print 'Child exited gracefully.'
+ print('Child exited gracefully.')