diff options
author | Constantin Shalnev <c.shalnev@corp.mail.ru> | 2015-12-08 17:47:18 +0300 |
---|---|---|
committer | Ilya Zverev <ilya@zverev.info> | 2017-07-04 11:26:12 +0300 |
commit | 93035f266a9b1efa135e16eacb114ec5d73959c4 (patch) | |
tree | 951076ed1ca531dacb5dd0b5429563183272e5dd /tools/python | |
parent | 5830ef2737b73a58bd6bf1f0a1fd7542e119221d (diff) |
The MAPS.ME.Designer tool for DRAPE 2.0
Diffstat (limited to 'tools/python')
-rw-r--r-- | tools/python/stylesheet/drules_info.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/python/stylesheet/drules_info.py b/tools/python/stylesheet/drules_info.py index 596e3a6d76..97ffa823db 100644 --- a/tools/python/stylesheet/drules_info.py +++ b/tools/python/stylesheet/drules_info.py @@ -2,6 +2,17 @@ # - zooms range, for classes with a style # - classes without a style +# If path to the protobuf EGG is specified then apply it before import drules_struct_pb2 +import os +import sys +PROTOBUF_EGG_PATH = os.environ.get("PROTOBUF_EGG_PATH") +if PROTOBUF_EGG_PATH: + # another version of protobuf may be installed, override it + for i in range(len(sys.path)): + if -1 != sys.path[i].find("protobuf-"): + sys.path[i] = PROTOBUF_EGG_PATH + sys.path.append(PROTOBUF_EGG_PATH) + import sys import csv import drules_struct_pb2 @@ -55,11 +66,12 @@ def ShowZoomInfo(mapping_path, drules_path): print "Classes with a style: (%s)" % (str(len(classes_with_style))) for c in classes_with_style: - print " %s - [%s, %s]" % (c, str(classes_zooms[c][0]), str(classes_zooms[c][1])) + print " %s - [%s, %s]" % (c, str(classes_zooms[c][0]), str(classes_zooms[c][1])) + print "" print "Classes without a style (%s):" % (len(classes_without_style)) for c in classes_without_style: - print " %s" % c + print " %s" % c if __name__ == "__main__": |