mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Whitespace normalization. Ran reindent.py over the entire source tree.
This commit is contained in:
parent
4fba4521e8
commit
e6ddc8b20b
62 changed files with 5050 additions and 5061 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue