Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6e62c564
Commit
6e62c564
authored
Oct 11, 2009
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless script "mkrcs" and update README.
parent
86d38e9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
64 deletions
+3
-64
Demo/scripts/README
Demo/scripts/README
+3
-3
Demo/scripts/mkrcs.py
Demo/scripts/mkrcs.py
+0
-61
No files found.
Demo/scripts/README
View file @
6e62c564
...
...
@@ -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
...
...
Demo/scripts/mkrcs.py
deleted
100755 → 0
View file @
86d38e9e
#! /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
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment