summaryrefslogtreecommitdiff
path: root/fancy_getopt.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2010-07-22 12:50:05 +0000
committerTarek Ziadé <ziade.tarek@gmail.com>2010-07-22 12:50:05 +0000
commit07be936471d1459a64a755dc90a53121a8ca41e9 (patch)
treeb0006ca9f93d98c5246224cd42692528e4ee20d4 /fancy_getopt.py
parentb97dbcf42d529ab4dfb2896cef8c0d53960595d7 (diff)
downloadpython-setuptools-git-07be936471d1459a64a755dc90a53121a8ca41e9.tar.gz
reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
Diffstat (limited to 'fancy_getopt.py')
-rw-r--r--fancy_getopt.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/fancy_getopt.py b/fancy_getopt.py
index 73343ad5..879d4d25 100644
--- a/fancy_getopt.py
+++ b/fancy_getopt.py
@@ -10,11 +10,9 @@ additional features:
__revision__ = "$Id$"
-import sys
-import string
-import re
+import sys, string, re
import getopt
-from distutils.errors import DistutilsGetoptError, DistutilsArgError
+from distutils.errors import *
# Much like command_re in distutils.core, this is close to but not quite
# the same as a Python NAME -- except, in the spirit of most GNU
@@ -446,3 +444,16 @@ class OptionDummy:
'options' will be initialized to None."""
for opt in options:
setattr(self, opt, None)
+
+
+if __name__ == "__main__":
+ text = """\
+Tra-la-la, supercalifragilisticexpialidocious.
+How *do* you spell that odd word, anyways?
+(Someone ask Mary -- she'll know [or she'll
+say, "How should I know?"].)"""
+
+ for w in (10, 20, 30, 40):
+ print("width: %d" % w)
+ print("\n".join(wrap_text(text, w)))
+ print()