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


Python FileSystem.dirname方法代码示例

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


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

示例1: get_repo_url

# 需要导入模块: from common_py.system.filesystem import FileSystem [as 别名]
# 或者: from common_py.system.filesystem.FileSystem import dirname [as 别名]
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


import sys
import subprocess
import getpass

from common_py.system.filesystem import FileSystem as fs
from common_py.system.executor import Executor as ex

SCRIPT_PATH = fs.dirname(fs.abspath(__file__))

BUILD_SCRIPT_DEBUG = fs.join(SCRIPT_PATH,
    'build.py --clean --config=.build.default.config --buildtype=debug')

BUILD_SCRIPT_RELEASE = fs.join(SCRIPT_PATH,
    'build.py --clean --config=.build.default.config --buildtype=release')

GIT_REPO_FORMAT = 'https://github.com/%s/iotjs.git'


def get_repo_url(fork_name):
    return GIT_REPO_FORMAT % fork_name


def get_merge_branch_name(fork_name, branch_name):
开发者ID:esevan,项目名称:iotjs,代码行数:33,代码来源:merge.py

示例2:

# 需要导入模块: from common_py.system.filesystem import FileSystem [as 别名]
# 或者: from common_py.system.filesystem.FileSystem import dirname [as 别名]
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

""" common path for scripts """

from common_py.system.filesystem import FileSystem as fs

# Root directory for the project.
PROJECT_ROOT = fs.abspath(fs.join(fs.dirname(__file__), fs.pardir, fs.pardir))

# Source code directory.
SRC_ROOT = fs.join(PROJECT_ROOT, 'src')

# Root Build directory.
BUILD_ROOT = fs.join(PROJECT_ROOT, 'build')

# Root Build directory.
TOOLS_ROOT = fs.join(PROJECT_ROOT, 'tools')

# Root directory for dependencies.
DEPS_ROOT = fs.join(PROJECT_ROOT, 'deps')

# Root directory for test.
TEST_ROOT = fs.join(PROJECT_ROOT, 'test')
开发者ID:drashti304,项目名称:TizenRT,代码行数:33,代码来源:path.py


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