Did I find the right examples for you? yes no

All Samples(165)  |  Call(162)  |  Derive(0)  |  Import(3)

        def output(msg=''):
    if isinstance(msg, unicode):
        msg = msg.encode('utf-8')
    log("OUT: %s" % msg)
    print >> actual_stdout, msg

src/b/r/broctl-HEAD/BroControl/control.py   broctl(Download)
    for (node, success, output) in execute.runHelperParallel(cmds):
        if not success:
            util.output("cannot run post-terminate for %s" % node.name)
            util.sendMail("Crash report from %s" % node.name, msg + "\n".join(output))
            filtered += [node]
            if node.hasCrashed():
                util.output("starting %s (was crashed) ..." % node.name)
                util.output("starting %s ..." % node.name)
            util.output("%s still running" % node.name)
            nodes += [node]
            util.output("cannot create working directory for %s" % node.name)
            results += [(node, False)]

src/b/r/broctl-HEAD/BroControl/plugin.py   broctl(Download)
            h = config.Config.nodes(arg, True)
            if not h:
                util.output("unknown node '%s'" % arg)
                nodes += h
    def message(self, msg):
        """Reports a message to the user."""
        util.output(msg, prefix="plugin:%s" % self.prefix())

src/g/i/gitifyhg-0.8.4/gitifyhg/hgimporter.py   gitifyhg(Download)
from mercurial import encoding
from .util import (log, output, gittz, gitmode,
    git_to_hg_spaces, hg_to_git_spaces, branch_head, ref_to_name_reftype,
    BRANCH, BOOKMARK, TAG, relative_path)
    def process(self):
        output("feature done")
        if self.hgremote.marks_git_path.exists():
            output("feature import-marks=%s" % self.hgremote.marks_git_path)
        output("feature export-marks=%s" % self.hgremote.marks_git_path)
        output("feature notes")

src/b/r/broctl-HEAD/BroControl/install.py   broctl(Download)
    for p in policies:
        if os.path.isdir(p):
            util.output("removing old policies in %s ..." % p, False)
            if not execute.rmdir(manager, p):
                hadError = True
            util.output(" done.")
    util.output("creating policy directories ...", False)
        if not execute.mkdir(manager, p):
            hadError = True
    util.output(" done.")
    # Install local site policy.
    if config.Config.sitepolicypath:
        util.output("installing site policies ...", False)

src/g/i/gitifyhg-0.8.4/gitifyhg/gitifyhg.py   gitifyhg(Download)
from mercurial.bookmarks import listbookmarks, readcurrent
from .util import (log, die, output, branch_head, GitMarks,
    HGMarks, hg_to_git_spaces, name_reftype_to_ref, BRANCH, BOOKMARK, TAG,
    version, deactivate_stdout)
    def do_capabilities(self, parser):
        '''Process the capabilities request when incoming from git-remote.
        for reftype in (BRANCH, BOOKMARK, TAG):
            output(u"refspec %s:%s" %
        if self.marks_git_path.exists():
            output(u"*import-marks %s" % self.marks_git_path)
        output(u"*export-marks %s" % self.marks_git_path)

src/b/r/broctl-HEAD/BroControl/cron.py   broctl(Download)
    if not os.path.exists(os.path.join(config.Config.scriptsdir, "broctl-config.sh")):
        util.output("error: broctl-config.sh not found (try 'broctl install')") 
        (success, output) = execute.runLocalCmd(config.Config.croncmd)
        if not success:
            util.output("error running croncmd: %s" % config.Config.croncmd)
    # Mail potential output.
                    if float(val) == 0.0 and last != 0.0:
                        util.output("%s is not seeing any packets on interface %s" % (node.host, node.interface))
                    if float(val) != 0.0 and last == 0.0:
                        util.output("%s is seeing packets again on interface %s" % (node.host, node.interface))
                util.output("Disk space low on %s:%s - %.1f%% used." % (host, fs, perc))
            config.Config.state[key] = "%.1f" % perc

src/g/i/gitifyhg-0.8.4/gitifyhg/gitexporter.py   gitifyhg(Download)
from distutils.version import StrictVersion
from .util import (die, output, git_to_hg_spaces, hgmode, branch_tip,
    ref_to_name_reftype, BRANCH, BOOKMARK, TAG, user_config)
                    #  * [new branch]      master -> master
                    status = " up to date"
                output("ok %s%s" % (ref, status))
                output("error %s non-fast forward" % ref)  # TODO: other errors as well

src/b/r/broctl-HEAD/BroControl/pluginreg.py   broctl(Download)
                    p = cls()
                except Exception, e:
                    util.output("Error running __init__ for plugin class %s: %s" % (cls.__name__, str(e)))
                               % (p.name(), module.__file__, p.pluginVersion(), p.prefix()))
                except NotImplementedError:
                    util.output("Error in plugin at %s (does not override required methods)" % path)
                if p.apiVersion() != _CurrentAPIVersion:
                    util.output("Plugin %s disabled due to incompatible API version (uses %d, but current is %s)"

src/b/r/broctl-HEAD/BroControl/execute.py   broctl(Download)
def install(host, src, dstdir):
    if isLocal(host):
        if not exists(host, src):
            util.output("file does not exist: %s" % src)
            return False