|
@ -66,6 +66,23 @@ def view_traceback(): |
|
|
traceback.print_tb(tb) |
|
|
traceback.print_tb(tb) |
|
|
del tb |
|
|
del tb |
|
|
|
|
|
|
|
|
|
|
|
def print_file(path, indent=""): |
|
|
|
|
|
try: |
|
|
|
|
|
if os.path.isfile(path): |
|
|
|
|
|
if indent is None: |
|
|
|
|
|
indent = "" |
|
|
|
|
|
ins = open(path, 'r') |
|
|
|
|
|
line = True |
|
|
|
|
|
while line: |
|
|
|
|
|
line = ins.readline() |
|
|
|
|
|
if line: |
|
|
|
|
|
print(indent+line) |
|
|
|
|
|
ins.close() |
|
|
|
|
|
else: |
|
|
|
|
|
print (indent+"print_file: missing path") |
|
|
|
|
|
except: |
|
|
|
|
|
print(indent+"print_file: could not finish") |
|
|
|
|
|
|
|
|
def get_dict_modified_by_conf_file(this_dict, path,assignment_operator="="): |
|
|
def get_dict_modified_by_conf_file(this_dict, path,assignment_operator="="): |
|
|
results = None |
|
|
results = None |
|
|
#print ("Checking "+str(path)+" for settings...") |
|
|
#print ("Checking "+str(path)+" for settings...") |
|
@ -670,22 +687,6 @@ class MTChunks: |
|
|
if os.path.isfile(yaml_path): |
|
|
if os.path.isfile(yaml_path): |
|
|
self.chunks[chunk_luid].load_yaml(yaml_path) |
|
|
self.chunks[chunk_luid].load_yaml(yaml_path) |
|
|
|
|
|
|
|
|
def print_file(path, indent=""): |
|
|
|
|
|
try: |
|
|
|
|
|
if os.path.isfile(path): |
|
|
|
|
|
if indent is None: |
|
|
|
|
|
indent = "" |
|
|
|
|
|
ins = open(path, 'r') |
|
|
|
|
|
line = True |
|
|
|
|
|
while line: |
|
|
|
|
|
line = ins.readline() |
|
|
|
|
|
if line: |
|
|
|
|
|
print(indent+line) |
|
|
|
|
|
ins.close() |
|
|
|
|
|
else: |
|
|
|
|
|
print (indent+"print_file: missing path") |
|
|
|
|
|
except: |
|
|
|
|
|
print(indent+"print_file: could not finish") |
|
|
|
|
|
|
|
|
|
|
|
# normally call check_chunk instead, which renders chunk only if necessary |
|
|
# normally call check_chunk instead, which renders chunk only if necessary |
|
|
def _render_chunk(self, x, z): |
|
|
def _render_chunk(self, x, z): |
|
|