本文整理汇总了Python中server.server.Server.source_directory方法的典型用法代码示例。如果您正苦于以下问题:Python Server.source_directory方法的具体用法?Python Server.source_directory怎么用?Python Server.source_directory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类server.server.Server
的用法示例。
在下文中一共展示了Server.source_directory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Tree
# 需要导入模块: from server.server import Server [as 别名]
# 或者: from server.server.Server import source_directory [as 别名]
"""Script to launch the Python Aboard server."""
import os
import sys
from command.tree import Tree
from server.server import Server
from model import Model
from system import *
from tools.console import Console
commands = Tree()
commands.add_default_commands()
command, args = commands.process(sys.argv[1:])
source_directory = get_source_directory()
if command:
directory = args.path
server = Server(directory, check_dir=command.project_created)
server.source_directory = source_directory
if command.project_created and not command.children:
server.load_configurations()
server.prepare()
server.load_bundles()
command.server = server
command.execute(args)
if command.project_created:
Model.data_connector.repository_manager.save()