summaryrefslogtreecommitdiffstats
path: root/Demo/scripts/script.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-07-18 05:56:09 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-07-18 05:56:09 (GMT)
commite6ddc8b20b493fef2e7cffb2e1351fe1d238857e (patch)
tree3b3d8fcd92e1d8f0cad44297d5c2ae8522bb984c /Demo/scripts/script.py
parent4fba4521e836e0cab08316592392b1e4d06eb6ef (diff)
downloadcpython-e6ddc8b20b493fef2e7cffb2e1351fe1d238857e.zip
cpython-e6ddc8b20b493fef2e7cffb2e1351fe1d238857e.tar.gz
cpython-e6ddc8b20b493fef2e7cffb2e1351fe1d238857e.tar.bz2
Whitespace normalization. Ran reindent.py over the entire source tree.
Diffstat (limited to 'Demo/scripts/script.py')
-rwxr-xr-xDemo/scripts/script.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Demo/scripts/script.py b/Demo/scripts/script.py
index cbad367..6eaa7ae 100755
--- a/Demo/scripts/script.py
+++ b/Demo/scripts/script.py
@@ -1,8 +1,8 @@
#! /usr/bin/env python
# script.py -- Make typescript of terminal session.
# Usage:
-# -a Append to typescript.
-# -p Use Python as shell.
+# -a Append to typescript.
+# -p Use Python as shell.
# Author: Steen Lumholt.
@@ -10,19 +10,19 @@ import os, time, sys
import pty
def read(fd):
- data = os.read(fd, 1024)
- file.write(data)
- return data
+ data = os.read(fd, 1024)
+ file.write(data)
+ return data
shell = 'sh'
filename = 'typescript'
mode = 'w'
if os.environ.has_key('SHELL'):
- shell = os.environ['SHELL']
+ shell = os.environ['SHELL']
if '-a' in sys.argv:
- mode = 'a'
+ mode = 'a'
if '-p' in sys.argv:
- shell = 'python'
+ shell = 'python'
file = open(filename, mode)