update to python3
1 parent 36f0516 commit 02a996d34deedb1cfdac171b55d75e6a63fe3cc3
@tundra tundra authored on 20 Jun 2020
Showing 1 changed file
View
12
tperimeter.py
#!/usr/local/bin/python
#!/usr/bin/env python
# tperimeter.py
# Copyright (c) 2006-2012 TundraWare Inc. All Rights Reserved.
# Copyright (c) 2006-2020 TundraWare Inc. All Rights Reserved.
# For Updates See: http://www.tundraware.com/Software/tperimeter
 
# Program Information
 
#####
 
def Print(s):
 
print "[User@%s] %s" % (requestor, s)
print(("[User@%s] %s" % (requestor, s)))
 
#####
# Error/Abort Routine
#####
Print( "Please Try Again ...<br><br>")
sys.exit(1)
 
# End of 'Error()'
 
 
#####
# Print The HTML Header
####
 
print "Content-type: text/html\n\n"
print("Content-type: text/html\n\n")
 
#####
# Process Passed Parameters
# Save locally in a variable of the same name
# Make sure address is in quad format
 
if not re.match(IPQuad, address):
Error("You Must Specify Address In IP Quad Format")
 
 
# Make sure each quad element is in range
 
for q in address.split("."):