Did I find the right examples for you? yes no

All Samples(13)  |  Call(5)  |  Derive(0)  |  Import(8)
Only writes the contents of the string to a file if the file does not exist.
Useful for not tocuhing files.

Parameters
----------
s : str
    string contents of file to possible
filename : str
    Path to file.
vebose : bool, optional(more...)

        def writenewonly(s, filename, verbose=False):
    """Only writes the contents of the string to a file if the file does not exist.
    Useful for not tocuhing files.

    Parameters
    ----------
    s : str
        string contents of file to possible
    filename : str
        Path to file.
    vebose : bool, optional
        prints extra message

    """
    if os.path.isfile(filename):
        return
    with open(filename, 'w') as f:
        f.write(str(s))
    if verbose:
        print("  wrote " + filename)
        


src/x/d/xdress-0.4/xdress/base.py   xdress(Download)
from warnings import warn
 
from .utils import RunControl, NotSpecified, writenewonly, DescriptionCache, \
    DEFAULT_RC_FILE, DEFAULT_PLUGINS, nyansep, indent
from .plugins import Plugin
        if not os.path.isdir(rc.builddir):
            os.makedirs(rc.builddir)
        writenewonly("", os.path.join(rc.packagedir, '__init__.py'), rc.verbose)
        writenewonly("", os.path.join(rc.packagedir, '__init__.pxd'), rc.verbose)
        rc._cache = DescriptionCache(cachefile=os.path.join(rc.builddir, 'desc.cache'))

src/x/d/xdress-HEAD/xdress/base.py   xdress(Download)
from warnings import warn
 
from .utils import RunControl, NotSpecified, writenewonly, DescriptionCache, \
    DEFAULT_RC_FILE, DEFAULT_PLUGINS, nyansep, indent
from .plugins import Plugin
        if not os.path.isdir(rc.builddir):
            os.makedirs(rc.builddir)
        writenewonly("", os.path.join(rc.packagedir, '__init__.py'), rc.verbose)
        writenewonly("", os.path.join(rc.packagedir, '__init__.pxd'), rc.verbose)
        rc._cache = DescriptionCache(cachefile=os.path.join(rc.builddir, 'desc.cache'))

src/p/o/polyphemus-0.1/polyphemus/base.py   polyphemus(Download)
    import json
 
from .utils import RunControl, NotSpecified, writenewonly, DEFAULT_RC_FILE, \
    DEFAULT_PLUGINS, nyansep
from .plugins import Plugin
            key.write_private_key_file(key_file)
            pub = ssh_pub_key(key_file)
            writenewonly(pub, "{0}.pub".format(key_file))
        rc.ssh_key_file = key_file
 

src/p/o/polyphemus-0.1/polyphemus/apache2.py   polyphemus(Download)
from event import runfor
 
from .utils import RunControl, NotSpecified, writenewonly, newoverwrite, \
    DEFAULT_RC_FILE, DEFAULT_PLUGINS, nyansep, indent, check_cmd
from .plugins import Plugin

src/p/o/polyphemus-0.1/polyphemus/githubbase.py   polyphemus(Download)
from flask import request
 
from .utils import RunControl, NotSpecified, writenewonly, newoverwrite, \
    DEFAULT_RC_FILE, DEFAULT_PLUGINS, nyansep, indent, check_cmd
from .plugins import Plugin

src/p/o/polyphemus-0.1/polyphemus/batlabbase.py   polyphemus(Download)
import paramiko
 
from .utils import RunControl, NotSpecified, writenewonly, \
    DEFAULT_RC_FILE, DEFAULT_PLUGINS, nyansep, indent, check_cmd
from .plugins import Plugin

src/p/o/polyphemus-0.1/polyphemus/githubhook.py   polyphemus(Download)
from flask import request
 
from .utils import RunControl, NotSpecified, writenewonly, \
    DEFAULT_RC_FILE, DEFAULT_PLUGINS, nyansep, indent, check_cmd
from .plugins import Plugin

src/p/o/polyphemus-0.1/polyphemus/githubstat.py   polyphemus(Download)
import github3.events
 
from .utils import RunControl, NotSpecified, writenewonly
from .plugins import Plugin
from .event import Event, runfor