Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(0)  |  Derive(0)  |  Import(4)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/w/h/whack-0.7.0/whack/deployer.py   whack(Download)
import os
import stat
 
from .common import WHACK_ROOT
from .files import copy_dir
                '#!/usr/bin/env sh\n\n' +
                'MY_ROOT=`readlink --canonicalize-missing "$(dirname $0)"`\n' +
                'if [ "$MY_ROOT" = "{0}" ]; then\n'.format(WHACK_ROOT) +
                '   exec "$@"\n' +
                'else\n' +
                    '#!/usr/bin/env sh\n\n' +
                    'MY_ROOT=`readlink --canonicalize-missing "$(dirname $0)/.."`\n' +
                    'TARGET="{0}/.{1}/{2}"\n'.format(WHACK_ROOT, bin_dir_name, bin_filename) +
                    'exec "$MY_ROOT/run" "$TARGET" "$@"\n'
                )
            # Valid symlink
            path = link_target
        elif link_target.startswith("{0}/".format(WHACK_ROOT)):
            # Valid symlink, but whack root isn't mounted
            path = os.path.join(root_dir, link_target[len(WHACK_ROOT) + 1:])

src/w/h/whack-HEAD/whack/deployer.py   whack(Download)
import os
import stat
 
from .common import WHACK_ROOT
from .files import copy_dir
                '#!/usr/bin/env sh\n\n' +
                'MY_ROOT=`readlink --canonicalize-missing "$(dirname $0)"`\n' +
                'if [ "$MY_ROOT" = "{0}" ]; then\n'.format(WHACK_ROOT) +
                '   exec "$@"\n' +
                'else\n' +
                    '#!/usr/bin/env sh\n\n' +
                    'MY_ROOT=`readlink --canonicalize-missing "$(dirname $0)/.."`\n' +
                    'TARGET="{0}/.{1}/{2}"\n'.format(WHACK_ROOT, bin_dir_name, bin_filename) +
                    'exec "$MY_ROOT/run" "$TARGET" "$@"\n'
                )
            # Valid symlink
            path = link_target
        elif link_target.startswith("{0}/".format(WHACK_ROOT)):
            # Valid symlink, but whack root isn't mounted
            path = os.path.join(root_dir, link_target[len(WHACK_ROOT) + 1:])

src/w/h/whack-0.7.0/whack/builder.py   whack(Download)
import os
import dodge
 
from .tempdir import create_temporary_dir
from .common import WHACK_ROOT
            os.path.abspath(package_dir), # package_dir is mounted at WHACK_ROOT
            build_script_path, # build_script is executed
            WHACK_ROOT # WHACK_ROOT is passed as the first argument to build_script
        ]
        local.run(build_command, cwd=build_dir, update_env=build_env)

src/w/h/whack-HEAD/whack/builder.py   whack(Download)
import os
import dodge
 
from .tempdir import create_temporary_dir
from .common import WHACK_ROOT
            os.path.abspath(package_dir), # package_dir is mounted at WHACK_ROOT
            build_script_path, # build_script is executed
            WHACK_ROOT # WHACK_ROOT is passed as the first argument to build_script
        ]
        local.run(build_command, cwd=build_dir, update_env=build_env)