Only parsing requires Python 1.5

This commit is contained in:
Barry Warsaw 1997-12-04 19:44:30 +00:00
parent 00727b0022
commit 90136b08b6
1 changed files with 7 additions and 6 deletions

View File

@ -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)
@ -80,6 +75,12 @@ def resolve(rawaddr):
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):