-#! /usr/local/bin/python
+#! /usr/bin/env python
# 1) Regular Expressions Test
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# 2) Sorting Test
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# 3) System Test
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Call ibrowse (the info file browser) under UNIX.
-#! /projects/python/Python-1.4b2/python
+#! /usr/bin/env python
# (Force the script to use the latest build.)
#
# test_parser.py
-#! /usr/local/bin/python
+#! /usr/bin/env python
"""RCS Proxy.
-#! /usr/local/bin/python
+#! /usr/bin/env python
"""Turn a pile of RCS log output into ChangeLog file entries.
-#! /usr/local/bin/python
+#! /usr/bin/env python
"""Remote CVS -- command line interface"""
-#! /usr/local/bin/python
+#! /usr/bin/env python
"Remote RCS -- command line interface"
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Fix Python source files to use the new equality test operator, i.e.,
# if x = y: ...
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Factorize numbers.
# The algorithm is not efficient, but easy to understand.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Print From and Subject of messages in $MAIL.
# Extension to multiple mailboxes and other bells & whistles are left
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Extract statistics from ftp daemon log.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Watch line printer queue(s).
# Intended for BSD 4.3 lpq.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Like mkdir, but also make intermediate directories if necessary.
# It is not an error if the given directory already exists (as long
-#! /usr/local/bin/python
+#! /usr/bin/env python
class Markov:
def __init__(self, histsize, choice):
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Convert MH directories (1 message per file) or MMDF mailboxes (4x^A
# delimited) to unix mailbox (From ... delimited) on stdout.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# A rather specialized script to make sure that a symbolic link named
# RCS exists pointing to a real RCS directory in a parallel tree
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Print digits of pi forever.
#
# The algorithm, using Python's 'long' integers ("bignums"), works
-#! /usr/local/bin/python
+#! /usr/bin/env python
#######################################################################
# Newslist $Revision$
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Print digits of pi forever.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Emulate some Perl command line options.
# Usage: pp [-a] [-c] [-d] [-e scriptline] [-F fieldsep] [-n] [-p] [file] ...
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Print prime numbers in a given range
-#! /usr/local/bin/python
+#! /usr/bin/env python
# script.py -- Make typescript of terminal session.
# Usage:
# -a Append to typescript.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Calculate your unbirthday count (see Alice in Wonderland).
# This is defined as the number of days from your birth until today
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Update a bunch of files according to a script.
# The input file contains lines of the form <filename>:<lineno>:<text>,
-#! /usr/local/bin/python
+#! /usr/bin/env python
# broadcast [port]
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# radio [port]
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# unicast host [port]
#
-#! /usr/local/python
+#! /usr/bin/env python
import sys
import audio
-#! /usr/local/python
+#! /usr/bin/env python
# JUKEBOX: browse directories full of sampled sound files.
#
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
import sys
import audio
-#! /usr/local/python
+#! /usr/bin/env python
import audio
import stdwin
-#! /usr/local/bin/python
+#! /usr/bin/env python
# backface
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Print the values of all values that can be inquired with getgdesc().
# See man getgdesc() for a description.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# *** This only works correctly on a 24 bit-plane machine. ***
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Simulate the artwork in the hall.
# Jack Jansen, Feb 91.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# "M Clock"
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Use Gouraud shading to mix colors. Requires Z-buffer.
# It changes the color assignments so fast that you see white.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Rotate a 3D surface created using NURBS.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# zrgb (Requires Z buffer.)
#
-#!/ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Send live video UDP packets.
# Usage: Vsend [-b] [-h height] [-p port] [-s size] [-t ttl] [-w width]
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Copy a video file, interactively, frame-by-frame.
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Add a cache to each of the files given as command line arguments
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Video bag of tricks: record video(+audio) in various formats and modes
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Universal (non-interactive) CMIF video file copier.
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Edit CMIF movies interactively -- copy one or more files to an output file
-#!/ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Copy a video file, fixing the line width to be a multiple of 4
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Print some info about a CMIF movie file
-#!/ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Compress an rgb or grey video file to jpeg format
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Play CMIF movie files
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
#! /ufs/guido/bin/sgi/python-405
# Capture a CMIF movie using the Indigo video library and board
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Capture a CMIF movie using the Indigo video library and board in burst mode
-#!/ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Receive live video UDP packets.
# Usage: Vreceive [port]
-#!/ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Send live video UDP packets.
# Usage: Vsend [-b] [-h height] [-p port] [-s size] [-t ttl] [-w width]
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Print the value of all video parameters
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Manipulate the time base of CMIF movies
-#!/ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Decompress a jpeg or jpeggrey video file to rgb format
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Play synchronous video and audio.
# Highly experimental!
-#! /ufs/guido/bin/sgi/python
+#! /usr/bin/env python
# Convert CMIF movie file(s) to a sequence of rgb images
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Python implementation of an 'echo' tcp server: echo all data it receives.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Python interface to the Internet finger daemon.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# A simple gopher client.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Remote python client.
# Execute Python commands remotely and send output back.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Remote python server.
# Execute Python commands remotely and send output back.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Minimal interface to the Internet telnet protocol.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Test network throughput.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Client and server for udp (datagram) echo.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
testlabels = 'Name', 'Address', 'City', 'Country', 'Comments'
-#! /usr/local/bin/python
+#! /usr/bin/env python
# radiogroups.py
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# TestCSplit
-#! /usr/local/bin/python
+#! /usr/bin/env python
# TestDirList
-#! /usr/local/bin/python
+#! /usr/bin/env python
# TestFormSplit
-#! /usr/local/bin/python
+#! /usr/bin/env python
# TestSched
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Test TextEdit widgets
-#! /usr/local/bin/python
+#! /usr/bin/env python
# 'clock' -- A simple alarm clock
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Call ibrowse (the info file browser) under UNIX.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# XXX This only works on SGIs running IRIX 4.0 or higher
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Watch line printer queues (only works with BSD 4.3 lpq).
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# A minimal single-window text editor using STDWIN's text objects.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# A miniature multi-window editor using STDWIN's text objects.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# A STDWIN-based front end for the Python interpreter.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# A window-oriented recursive diff utility.
# NB: This uses undocumented window classing modules.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# View a single MIME multipart message.
# Display each part as a box.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# A Python function that generates dialog boxes with a text message,
# optional bitmap, and any number of buttons.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Simulate "electrons" migrating across the screen.
# An optional bitmap file in can be in the background.
-#!/usr/local/bin/python
+#! /usr/bin/env python
# Tkinter interface to Linux `kill' command.
from Tkinter import *
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Scan MH folder, display results in window
-#! /usr/local/bin/python
+#! /usr/bin/env python
# A Python program implementing rmt, an application for remotely
# controlling other Tk applications.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Tkinter interface to SYSV `ps' and `kill' commands.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Tk man page browser -- currently only shows the Tcl/Tk man pages
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www1.py -- print the contents of a URL on stdout
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www10.py -- display the contents of a URL in a Text widget
# - set window title
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www11.py -- display the contents of a URL in a Text widget
# - set window title
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www12.py -- display the contents of a URL in a Text widget
# - set window title
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www13.py -- display the contents of a URL in a Text widget
# - set window title
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www2.py -- print the contents of a URL on stdout
# - error checking
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www3.py -- print the contents of a URL on stdout
# - error checking
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www4.py -- display the contents of a URL in a Text widget
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www5.py -- display the contents of a URL in a Text widget
# - set window title
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www6.py -- display the contents of a URL in a Text widget
# - set window title
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www7.py -- display the contents of a URL in a Text widget
# - set window title
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www8.py -- display the contents of a URL in a Text widget
# - set window title
-#! /usr/local/bin/python
+#! /usr/bin/env python
# www9.py -- display the contents of a URL in a Text widget
# - set window title
-#!/usr/local/bin/python
+#! /usr/bin/env python
"""Support module for CGI (Common Gateway Interface) scripts.
that the first line of the script contains "#!" starting in column 1
followed by the pathname of the Python interpreter, for instance:
- #!/usr/local/bin/python
+ #! /usr/local/bin/python
Make sure the Python interpreter exists and is executable by "others".
+(Note that it's probably not a good idea to use #! /usr/bin/env python
+here, since the Python interpreter may not be on the default path
+given to CGI scripts!!!)
+
Make sure that any files your script needs to read or write are
readable or writable, respectively, by "others" -- their mode should
be 644 for readable and 666 for writable. This is because, for
-#!/usr/local/bin/python
+#! /usr/bin/env python
"""Classes to handle Unix style, MMDF style, and MH style mailboxes."""
-#!/usr/local/bin/python
+#! /usr/bin/env python
'''Mimification and unmimification of mail messages.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# pdb.py -- finally, a Python debugger!
-#! /usr/local/bin/python
+#! /usr/bin/env python
#
# Class for profiling python code. rev 1.0 6/2/94
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
"""
"PYSTONE" Benchmark Program
-#! /usr/local/bin/python
+#! /usr/bin/env python
import regex
import regsub
-#!/usr/local/bin/python
+#! /usr/bin/env python
# A somewhat-generalized FAQ-to-HTML converter (by Ka-Ping Yee, 10 Sept 96)
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Renumber the Python FAQ
-#! /usr/local/bin/python
+#! /usr/bin/env python
"""Freeze a Python script into a binary.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# A Python function that generates dialog boxes with a text message,
# optional bitmap, and any number of buttons.
-#! /usr/local/bin/python
+#! /usr/bin/env python
#
# Modulator - Generate skeleton modules.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Print the product of age and size of each file, in suitable units.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Check that all ".pyc" files exist and are up-to-date
# Uses module 'os'
-#! /usr/local/bin/python
+#! /usr/bin/env python
# This script is obsolete -- it is kept for historical purposes only.
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Copy one file's atime and mtime to another
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Format du output in a tree shape
import os, string, sys
-#! /usr/local/bin/python
+#! /usr/bin/env python
# eptags
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# findlinksto
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Perform massive identifier substitution on C source files.
# This actually tokenizes the files (to some extent) so it can
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Add some standard cpp magic to a header file
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Mirror a remote ftp subtree into a local directory tree.
# Basic usage: ftpmirror [options] host remotedir localdir
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Read #define's and translate to Python code.
# Handle #include statements.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Selectively preprocess #ifdef / #ifndef statements.
# Usage:
-#! /usr/local/bin/python
+#! /usr/bin/env python
# linktree
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Find symbolic links and show where they point to.
# Arguments are directories to search; default is current directory.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Fix Python source files to avoid using
# def method(self, (arg1, ..., argn)):
-#! /usr/local/bin/python
+#! /usr/bin/env python
# mkreal
#
-#!/usr/local/bin/python
+#! /usr/bin/env python
# objgraph
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# pdeps
#
-#! /usr/local/bin/python
-#! /usr/local/bin/python
+#! /usr/bin/env python
# This file contains a class and a main program that perform two
# related (though complimentary) formatting operations on Python
-#! /usr/local/bin/python
+#! /usr/bin/env python
# ptags
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
"""
"PYSTONE" Benchmark Program
-#! /usr/local/bin/python
+#! /usr/bin/env python
# suff
#
-#! /usr/local/bin/python
+#! /usr/bin/env python
# print md5 checksum for files
-#! /usr/local/bin/python
+#! /usr/bin/env python
# Variant of "which".
# On stderr, near and total misses are reported.
-#! /usr/local/bin/python
+#! /usr/bin/env python
# xxci
#