[Python-checkins] r54764 - sandbox/trunk/pep0/pep0.py
brett.cannon
python-checkins at python.org
Thu Apr 12 04:06:33 CEST 2007
Author: brett.cannon
Date: Thu Apr 12 04:06:30 2007
New Revision: 54764
Modified:
sandbox/trunk/pep0/pep0.py
Log:
Allow for specifying a single PEP file (for testing purposes).
Modified: sandbox/trunk/pep0/pep0.py
==============================================================================
--- sandbox/trunk/pep0/pep0.py (original)
+++ sandbox/trunk/pep0/pep0.py Thu Apr 12 04:06:30 2007
@@ -139,13 +139,15 @@
from sys import argv, stdout
if not argv[1:]:
- directory = '.'
+ path = '.'
else:
- directory = argv[1]
- peps = consume_headers(directory)
+ path = argv[1]
+ if os.path.isdir(path):
+ peps = consume_headers(directory)
+ else:
+ peps = [consume_pep(path)]
- output = stdout
for pep in peps:
- write_pep(pep, output)
+ write_pep(pep, stdout)
#meta, info, accepted, open_, done, empty, dead = sort_peps(peps)
More information about the Python-checkins
mailing list