本文整理汇总了Python中UI.building_generation方法的典型用法代码示例。如果您正苦于以下问题:Python UI.building_generation方法的具体用法?Python UI.building_generation怎么用?Python UI.building_generation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UI
的用法示例。
在下文中一共展示了UI.building_generation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: import UI [as 别名]
# 或者: from UI import building_generation [as 别名]
def main():
import sys, os
path=os.path.abspath(os.path.dirname(__file__))+"/.."
sys.path.append(path)
os.chdir(path)
loggerpath=path+"/procedural_city_generation/outputs/test.log"
logger = Logger(loggerpath)
logger.info("Initiating Tests")
logger.info("path= "+path)
import os, sys
"""
import test
test_funcs=import_submodules(test).items()
test_funcs=[x[0] for x in test_funcs if (not "test.Tester" in x[0] and x[0].endswith("Test"))]
for test in test_funcs:
module=importlib.import_module(test)
getattr(module, "main")()
"""
logger.info("Python Version:")
logger.info("\t"+sys.version)
logger.info("\t"+str(sys.version_info))
logger.info("OS: "+sys.platform)
logger.info("Current Git commmit: ")
logger.log_git_commit()
logger.info("Testing Dependencies")
try:
with open(path+"/requirements.txt","r") as f:
[test_dependency(x.split("==")[0],logger) for x in f.readlines()]
except IOError:
logger.error("Could not locate requirements.txt at "+os.path.abspath(path))
logger.info("Testing \"import procedural_city_generation\"")
import procedural_city_generation
logger.info("Testing \"import UI\"")
import UI
logger.info("Testing \"import GUI\"")
import GUI
logger.info("Testing roadmap creation")
UI.roadmap()
logger.info("Roadmap creation threw no exception")
logger.info("Testing roadmap creation")
UI.polygons()
logger.info("Roadmap creation threw no exception")
logger.info("Testing roadmap creation")
UI.building_generation()
logger.info("Roadmap creation threw no exception")
示例2: start_building_generation
# 需要导入模块: import UI [as 别名]
# 或者: from UI import building_generation [as 别名]
def start_building_generation(self):
self.active_widget=self.ui.building_generation_widget
self.active_widget.show()
self.clear()
UI.building_generation()