mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #7994 from nnadeau:master
Fixed exceptions, print statements, and long types for gen_pattern.py to be Python 3 compatible (#7994) * fixed exceptions and print statements to be python 3 compatible; removed long type checks (py3 uses int); whitespace reformatting * Pulled latest svgfig from upstream https://github.com/jpivarski/svgfig/commit/f3179a8926508bf0f9021fd4e1f9731c95524a38
This commit is contained in:
committed by
Alexander Alekhin
parent
5b363df2ae
commit
256aa53326
@@ -70,9 +70,9 @@ def main():
|
||||
opts, args = getopt.getopt(sys.argv[1:], "Ho:c:r:T:u:s:R:w:h:a:", ["help","output=","columns=","rows=",
|
||||
"type=","units=","square_size=","radius_rate=",
|
||||
"page_width=","page_height=", "page_size="])
|
||||
except getopt.error, msg:
|
||||
print msg
|
||||
print "for help use --help"
|
||||
except getopt.error as msg:
|
||||
print(msg)
|
||||
print("for help use --help")
|
||||
sys.exit(2)
|
||||
output = "out.svg"
|
||||
columns = 8
|
||||
@@ -89,7 +89,7 @@ def main():
|
||||
# process options
|
||||
for o, a in opts:
|
||||
if o in ("-H", "--help"):
|
||||
print __doc__
|
||||
print(__doc__)
|
||||
sys.exit(0)
|
||||
elif o in ("-r", "--rows"):
|
||||
rows = int(a)
|
||||
|
||||
Reference in New Issue
Block a user