aboutsummaryrefslogtreecommitdiffstats
path: root/Demo
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-10-11 08:45:03 +0000
committerGeorg Brandl <georg@python.org>2009-10-11 08:45:03 +0000
commit6e62c564166c6b8e85cc6b543138ae08c21b5bc6 (patch)
treee068f9d591f19e09dfdf9c12263fbdca109ccb3d /Demo
parent86d38e9ecc458bf42afc39551e48d22fd7f86bc6 (diff)
downloadplatform_external_python_cpython2-6e62c564166c6b8e85cc6b543138ae08c21b5bc6.tar.gz
platform_external_python_cpython2-6e62c564166c6b8e85cc6b543138ae08c21b5bc6.tar.bz2
platform_external_python_cpython2-6e62c564166c6b8e85cc6b543138ae08c21b5bc6.zip
Remove useless script "mkrcs" and update README.
Diffstat (limited to 'Demo')
-rw-r--r--Demo/scripts/README6
-rwxr-xr-xDemo/scripts/mkrcs.py61
2 files changed, 3 insertions, 64 deletions
diff --git a/Demo/scripts/README b/Demo/scripts/README
index d8434e8d43..8e1b26f42f 100644
--- a/Demo/scripts/README
+++ b/Demo/scripts/README
@@ -5,15 +5,15 @@ See also the Tools/scripts directory!
beer.py Print the classic 'bottles of beer' list.
eqfix.py Fix .py files to use the correct equality test operator
fact.py Factorize numbers
-find-uname.py Search for Unicode characters using regexps.
+find-uname.py Search for Unicode characters using regexps
from.py Summarize mailbox
ftpstats.py Summarize ftp daemon log file
lpwatch.py Watch BSD line printer queues
makedir.py Like mkdir -p
markov.py Markov chain simulation of words or characters
-mboxconvvert.py Convert MH or MMDF mailboxes to unix mailbox format
-mkrcs.py Fix symlinks named RCS into parallel tree
+mboxconvert.py Convert MH or MMDF mailboxes to unix mailbox format
morse.py Produce morse code (audible or on AIFF file)
+newslist.py List all newsgroups on a NNTP server as HTML pages
pi.py Print all digits of pi -- given enough time and memory
pp.py Emulate some Perl command line options
primes.py Print prime numbers
diff --git a/Demo/scripts/mkrcs.py b/Demo/scripts/mkrcs.py
deleted file mode 100755
index cacdda0a54..0000000000
--- a/Demo/scripts/mkrcs.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#! /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
-# referenced as RCStree in an ancestor directory.
-# (I use this because I like my RCS files to reside on a physically
-# different machine).
-
-import os
-
-def main():
- rcstree = 'RCStree'
- rcs = 'RCS'
- if os.path.islink(rcs):
- print '%r is a symlink to %r' % (rcs, os.readlink(rcs))
- return
- if os.path.isdir(rcs):
- print '%r is an ordinary directory' % (rcs,)
- return
- if os.path.exists(rcs):
- print '%r is a file?!?!' % (rcs,)
- return
- #
- p = os.getcwd()
- up = ''
- down = ''
- # Invariants:
- # (1) join(p, down) is the current directory
- # (2) up is the same directory as p
- # Ergo:
- # (3) join(up, down) is the current directory
- #print 'p =', repr(p)
- while not os.path.isdir(os.path.join(p, rcstree)):
- head, tail = os.path.split(p)
- #print 'head = %r; tail = %r' % (head, tail)
- if not tail:
- print 'Sorry, no ancestor dir contains %r' % (rcstree,)
- return
- p = head
- up = os.path.join(os.pardir, up)
- down = os.path.join(tail, down)
- #print 'p = %r; up = %r; down = %r' % (p, up, down)
- there = os.path.join(up, rcstree)
- there = os.path.join(there, down)
- there = os.path.join(there, rcs)
- if os.path.isdir(there):
- print '%r already exists' % (there, )
- else:
- print 'making %r' % (there,)
- makedirs(there)
- print 'making symlink %r -> %r' % (rcs, there)
- os.symlink(there, rcs)
-
-def makedirs(p):
- if not os.path.isdir(p):
- head, tail = os.path.split(p)
- makedirs(head)
- os.mkdir(p, 0777)
-
-if __name__ == "__main__":
- main()