summaryrefslogtreecommitdiff
path: root/third_party/Python/module/pexpect-2.4/examples/python.py
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 18:01:57 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 18:01:57 +0000
commit88c643b6fec27eec436c8d138fee6346e92337d6 (patch)
tree82cd13b2f3cde1c9e5f79689ba4e6ba67694843f /third_party/Python/module/pexpect-2.4/examples/python.py
parent94994d372d014ce4c8758b9605d63fae651bd8aa (diff)
Notes
Diffstat (limited to 'third_party/Python/module/pexpect-2.4/examples/python.py')
-rw-r--r--third_party/Python/module/pexpect-2.4/examples/python.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/third_party/Python/module/pexpect-2.4/examples/python.py b/third_party/Python/module/pexpect-2.4/examples/python.py
deleted file mode 100644
index e7ef462ba680..000000000000
--- a/third_party/Python/module/pexpect-2.4/examples/python.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env python
-
-"""This starts the python interpreter; captures the startup message; then gives
-the user interactive control over the session. Why? For fun... """
-
-# Don't do this unless you like being John Malkovich
-# c = pexpect.spawn ('/usr/bin/env python ./python.py')
-
-import pexpect
-c = pexpect.spawn('/usr/bin/env python')
-c.expect('>>>')
-print 'And now for something completely different...'
-f = lambda s: s and f(s[1:]) + s[0] # Makes a function to reverse a string.
-print f(c.before)
-print 'Yes, it\'s python, but it\'s backwards.'
-print
-print 'Escape character is \'^]\'.'
-print c.after,
-c.interact()
-c.kill(1)
-print 'is alive:', c.isalive()