コード例 #1
0
"""This is the entry point to load and run blade package.
"""

import sys
import os.path

# Load package from blade.zip or source dir?
blade_path = os.path.abspath(
    os.path.join(os.path.dirname(__file__), 'blade.zip'))
# blade_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src/blade'))
sys.path.insert(0, blade_path)
import blade_main

blade_main.main(blade_path)
コード例 #2
0
ファイル: bootstrap.py プロジェクト: AdolphLua/Pebble
"""This is the entry point to load and run blade package.
"""


import sys
import os.path

# Load package from blade.zip or source dir?
blade_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'blade.zip'))
# blade_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src/blade'))
sys.path.insert(0, blade_path)
import blade_main


blade_main.main(blade_path)

コード例 #3
0
ファイル: bootstrap.py プロジェクト: parety/typhoon-blade
"""
 Copyright (c) 2013 Tencent Inc.
 All rights reserved.
 Author: Feng chen <*****@*****.**>
"""

import sys
import os.path


def _find_package_path():
    self_path = os.path.dirname(__file__)
    package_path = os.path.join(self_path, 'src/blade')  # Develop mode
    if not os.path.exists(package_path):
        package_path = os.path.join(self_path, 'blade.zip')
    return package_path


package_path = _find_package_path()
sys.path.insert(0, package_path)

import blade_main

blade_main.main(package_path)

コード例 #4
0
ファイル: __main__.py プロジェクト: 343829084/typhoon-blade
#!/usr/bin/env python


"""About main entry

Main entry is placed to __main__.py, cause we need to pack
the python sources to a zip ball and invoke the blade through
command line in this way: python blade.zip

"""


import sys
from blade_main import main


if __name__ == '__main__':
    main(sys.argv[0])
コード例 #5
0
ファイル: bootstrap.py プロジェクト: yyqvod/typhoon-blade
"""
 Copyright (c) 2013 Tencent Inc.
 All rights reserved.
 Author: Feng chen <*****@*****.**>
"""

import sys
import os.path

zip_path = os.path.abspath(os.path.join(os.path.dirname(__file__),
                                        'blade.zip'))
sys.path.insert(0, zip_path)
import blade_main

blade_main.main(zip_path)
コード例 #6
0
ファイル: __main__.py プロジェクト: cica0/typhoon-blade_test
#!/usr/bin/env python
"""About main entry

Main entry is placed to __main__.py, cause we need to pack
the python sources to a zip ball and invoke the blade through
command line in this way: python blade.zip

"""

import sys
from blade_main import main

if __name__ == '__main__':
    main(sys.argv[0])
コード例 #7
0
ファイル: bootstrap.py プロジェクト: alaxwang/typhoon-blade
"""
 Copyright (c) 2013 Tencent Inc.
 All rights reserved.
 Author: Feng chen <*****@*****.**>
"""

import sys
import os.path

zip_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'blade.zip'))
sys.path.insert(0, zip_path)
import blade_main

blade_main.main(zip_path)