本文整理汇总了Python中Configuration.Configuration.config_table方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.config_table方法的具体用法?Python Configuration.config_table怎么用?Python Configuration.config_table使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configuration.Configuration
的用法示例。
在下文中一共展示了Configuration.config_table方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Table
# 需要导入模块: from Configuration import Configuration [as 别名]
# 或者: from Configuration.Configuration import config_table [as 别名]
#.........这里部分代码省略.........
Get the zone corresponding to a specified user
:param user: the user to get the zone
:return: the thone of the user
"""
for zone in self.user_zones:
if zone.user == user :
return zone
return None
def config(self, id):
"""
Configure the application with the correct activity
:param id: the name of the activity
:return:
"""
self.menu_mode = False
if self.has_internet:
with open("tmp.json", "r") as fd:
json_data = fd.read()
data = json.loads(json_data)
for elmt in data[0]["items"]:
if elmt["fields"]["Nom"] == id.text:
identifier = int(elmt["fields"]["id"])
else:
for root, dirs, files in os.walk("../Activities"):
for name in files:
if name == "config.json":
with open(root+"/config.json", "r") as fd:
json_data = fd.read()
data = json.loads(json_data)
if data["name"] == id.text:
identifier = data["id"]
self.configuration.config_table(self,identifier)
links = Links(self.integrated_links)
self.add_widget(links)
links.draw_label()
def remove_user(self,user):
"""
Remove a specified user
:param user: the user to remove
"""
self.connected.remove(user.identifier)
for zone in self.user_zones:
if zone.user == user:
zone.set_name("")
zone.connected = False
def add_criterion(self, criterion):
"""
Add a criterion to the table
:param criterion: the criterion to add
"""
self.add_widget(criterion)
criterion.draw()
self.criterions.append(criterion)
self.logger.write("create_critere", criterion.createur.identifier, [1,criterion.texte])
for child in self.children:
if child.__class__ == ProgressObjectif or child.__class__ == IndicateurCritere:
child.update()
def new_criterion(self, text, user,fusionneurs=[],text_type=""):
"""
Create a new criterion
:param text: text of the criterion