]> granicus.if.org Git - python/commitdiff
Only parsing requires Python 1.5
authorBarry Warsaw <barry@python.org>
Thu, 4 Dec 1997 19:44:30 +0000 (19:44 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 4 Dec 1997 19:44:30 +0000 (19:44 +0000)
Tools/world/world

index 01ec4c2a8ce57be30440c2fde193a4f9e298c3f9..e973adebc655bb352b588b7b00bb15dab9a3c1c8 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python1.5
+#! /usr/bin/env python
 
 """Print the long name of an Internet domain.
 
@@ -51,11 +51,6 @@ __source__ = '<url:http://www.python.org/~bwarsaw/pyware/>'
 import sys
 import string
 import getopt
-try:
-    import re
-except ImportError:
-    print 'Python 1.5 is required!'
-    sys.exit(1)
 
 
 \f
@@ -80,6 +75,12 @@ def resolve(rawaddr):
 
 \f
 def parse(file, normalize):
+    try:
+       import re
+    except ImportError:
+       print 'Parsing requires Python 1.5'
+       sys.exit(1)
+
     try:
        fp = open(file)
     except IOError, (err, msg):