当前位置: 首页>>代码示例>>Python>>正文


Python FileSystem.get_extended_url方法代码示例

本文整理汇总了Python中pyon.util.file_sys.FileSystem.get_extended_url方法的典型用法代码示例。如果您正苦于以下问题:Python FileSystem.get_extended_url方法的具体用法?Python FileSystem.get_extended_url怎么用?Python FileSystem.get_extended_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyon.util.file_sys.FileSystem的用法示例。


在下文中一共展示了FileSystem.get_extended_url方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: on_start

# 需要导入模块: from pyon.util.file_sys import FileSystem [as 别名]
# 或者: from pyon.util.file_sys.FileSystem import get_extended_url [as 别名]
    def on_start(self):
        #these values should come in from a config file, maybe pyon.yml
        self.pydap_host = self.CFG.get_safe('server.pydap.host', 'localhost')
        self.pydap_port = self.CFG.get_safe('server.pydap.port', '8001')
        self.pydap_url  = 'http://%s:%s/' % (self.pydap_host, self.pydap_port)
        self.pydap_data_path = self.CFG.get_safe('server.pydap.data_path', 'RESOURCE:ext/pydap')
        self.datasets_xml_path = self.CFG.get_safe('server.pydap.datasets_xml_path', "RESOURCE:ext/datasets.xml")
        self.pydap_data_path = FileSystem.get_extended_url(self.pydap_data_path) + '/'

        filename = self.datasets_xml_path.split('/')[-1]
        base = '/'.join(self.datasets_xml_path.split('/')[:-1])
        real_path = FileSystem.get_extended_url(base)
        self.datasets_xml_path = os.path.join(real_path, filename)
        self.setup_filesystem(real_path)
开发者ID:mbarry02,项目名称:coi-services,代码行数:16,代码来源:registration_process.py

示例2: get_datasets_xml_path

# 需要导入模块: from pyon.util.file_sys import FileSystem [as 别名]
# 或者: from pyon.util.file_sys.FileSystem import get_extended_url [as 别名]
    def get_datasets_xml_path(cls, cfg):
        datasets_xml_path = cfg.get_safe('server.pydap.datasets_xml_path', 'RESOURCE:ext/datasets.xml')
        base, filename = os.path.split(datasets_xml_path)
        base = FileSystem.get_extended_url(base)
        path = os.path.join(base, filename)

        return path
开发者ID:n1ywb,项目名称:coi-services,代码行数:9,代码来源:registration_process.py

示例3: _get_cov

# 需要导入模块: from pyon.util.file_sys import FileSystem [as 别名]
# 或者: from pyon.util.file_sys.FileSystem import get_extended_url [as 别名]
 def _get_cov(self, name, nt):
     path = CFG.get_safe('server.pydap.data_path', "RESOURCE:ext/pydap")
     ext_path = FileSystem.get_extended_url(path)
     cov,filename = _make_coverage(ext_path, "the_cov")
     cov.insert_timesteps(nt) 
     cov.set_parameter_values("time", value=nt)
     return cov, filename
开发者ID:blazetopher,项目名称:coi-services,代码行数:9,代码来源:test_coverage_handler.py

示例4: refresh_datasets_xml

# 需要导入模块: from pyon.util.file_sys import FileSystem [as 别名]
# 或者: from pyon.util.file_sys.FileSystem import get_extended_url [as 别名]
    def refresh_datasets_xml(self):
        datasets_xml_path = self.CFG.get_safe('server.pydap.datasets_xml_path', "RESOURCE:ext/datasets.xml")
        filename = datasets_xml_path.split('/')[-1]
        base = '/'.join(datasets_xml_path.split('/')[:-1])
        real_path = FileSystem.get_extended_url(base)
        datasets_xml_path = os.path.join(real_path, filename)

        os.remove(datasets_xml_path)
开发者ID:Bobfrat,项目名称:coi-services,代码行数:10,代码来源:registration_bootstrap.py

示例5: on_start

# 需要导入模块: from pyon.util.file_sys import FileSystem [as 别名]
# 或者: from pyon.util.file_sys.FileSystem import get_extended_url [as 别名]
    def on_start(self):
        #these values should come in from a config file, maybe pyon.yml
        self.pydap_host = self.CFG.get_safe('server.pydap.host', 'localhost')
        self.pydap_port = self.CFG.get_safe('server.pydap.port', '8001')
        self.pydap_url  = 'http://%s:%s/' % (self.pydap_host, self.pydap_port)
        self.pydap_data_path = self.CFG.get_safe('server.pydap.data_path', 'RESOURCE:ext/pydap')
        self.datasets_xml_path = self.get_datasets_xml_path(self.CFG)
        self.pydap_data_path = FileSystem.get_extended_url(self.pydap_data_path) + '/'
        self.setup_filesystem(self.datasets_xml_path)

        self.ux_url = self.CFG.get_safe('system.web_ui_url','http://localhost:3000/')
开发者ID:Bobfrat,项目名称:coi-services,代码行数:13,代码来源:registration_process.py

示例6: on_start

# 需要导入模块: from pyon.util.file_sys import FileSystem [as 别名]
# 或者: from pyon.util.file_sys.FileSystem import get_extended_url [as 别名]
 def on_start(self):
     #these values should come in from a config file, maybe pyon.yml
     self.pydap_host = self.CFG.get_safe('server.pydap.host', 'localhost')
     self.pydap_port = self.CFG.get_safe('server.pydap.port', '8001')
     self.pydap_url  = 'http://%s:%s/' % (self.pydap_host, self.pydap_port)
     self.pydap_data_path = self.CFG.get_safe('server.pydap.data_path', 'RESOURCE:ext/pydap')
     self.datasets_xml_path = self.get_datasets_xml_path(self.CFG)
     self.pydap_data_path = FileSystem.get_extended_url(self.pydap_data_path) + '/'
     self.ux_url = self.CFG.get_safe('system.web_ui_url','http://localhost:3000/')
     self.jenv = Environment(loader=FileSystemLoader('res/templates'), trim_blocks=True, lstrip_blocks=True)
     self.resource_registry = self.container.resource_registry
     self.setup_filesystem(self.datasets_xml_path)
开发者ID:n1ywb,项目名称:coi-services,代码行数:14,代码来源:registration_process.py

示例7: setUp

# 需要导入模块: from pyon.util.file_sys import FileSystem [as 别名]
# 或者: from pyon.util.file_sys.FileSystem import get_extended_url [as 别名]
 def setUp(self):
     self._start_container()
     self.container.start_rel_from_url('res/deploy/r2deploy.yml')
     path = CFG.get_safe('server.pydap.data_path', "RESOURCE:ext/pydap")
     ext_path = FileSystem.get_extended_url(path)
     self.cov,self.filename = _make_coverage(ext_path)
     self.nt = 5
     self.cov.insert_timesteps(self.nt) 
     self.time_data = [i+1 for i in range(self.nt)]
     self.cov.set_parameter_values("time", value=self.time_data)
     host = CFG.get_safe('container.pydap_gateway.web_server.host', 'localhost')
     port = CFG.get_safe('container.pydap_gateway.web_server.port', '8001')
     self.request_url = "http://"+host+":"+str(port)+os.sep+os.path.basename(self.filename)
开发者ID:swarbhanu,项目名称:coi-services,代码行数:15,代码来源:test_coverage_handler.py

示例8: on_start

# 需要导入模块: from pyon.util.file_sys import FileSystem [as 别名]
# 或者: from pyon.util.file_sys.FileSystem import get_extended_url [as 别名]
    def on_start(self):
        super(LightweightPyDAP,self).on_start()
        self.pydap_host = self.CFG.get_safe('server.pydap.host', 'localhost')
        self.pydap_port = self.CFG.get_safe('server.pydap.port', '8001')

        self.pydap_data_path = self.CFG.get_safe('server.pydap.data_path', 'RESOURCE:ext/pydap')

        self.pydap_data_path = FileSystem.get_extended_url(self.pydap_data_path)

        self.app = make_app(None, self.pydap_data_path, 'ion/core/static/templates/')
        self.log = getLogger('pydap')
        self.log.write = self.log.info
        self.server = WSGIServer((self.pydap_host, int(self.pydap_port)), self.app, log=self.log)
        self.server.start()
开发者ID:kerfoot,项目名称:coi-services,代码行数:16,代码来源:lightweight_pydap.py

示例9: on_start

# 需要导入模块: from pyon.util.file_sys import FileSystem [as 别名]
# 或者: from pyon.util.file_sys.FileSystem import get_extended_url [as 别名]
    def on_start(self):
        try:
            SimpleProcess.on_start(self)
            self.pydap_host = self.CFG.get_safe('container.pydap_gateway.web_server.host', 'localhost')
            self.pydap_port = self.CFG.get_safe('container.pydap_gateway.web_server.port', '8001')

            self.pydap_data_path = self.CFG.get_safe('server.pydap.data_path', 'RESOURCE:ext/pydap')

            self.pydap_data_path = FileSystem.get_extended_url(self.pydap_data_path)
            self.app = make_app(None, self.pydap_data_path, 'ion/core/static/templates/')
            self.log = getLogger('pydap')
            self.log.write = self.log.info
            self.server = WSGIServer((self.pydap_host, int(self.pydap_port)), self.app, log=self.log)
            self.server.start()
        except: 
            log.exception('Unable to start PyDAP server')
            raise
开发者ID:Bobfrat,项目名称:coi-services,代码行数:19,代码来源:lightweight_pydap.py


注:本文中的pyon.util.file_sys.FileSystem.get_extended_url方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。