Did I find the right examples for you? yes no

All Samples(22)  |  Call(17)  |  Derive(0)  |  Import(5)
Create nested directories, not complaining if they exist

        def mkdir_p(path):
    """Create nested directories, not complaining if they exist"""
    try:
        os.makedirs(path)
    except OSError as exc:
        if exc.errno == errno.EEXIST:
            pass
        else: raise
        


src/f/e/fedup-HEAD/fedup/sysprep.py   fedup(Download)
from . import upgradeconf, upgradelink, upgraderoot
from .media import write_systemd_unit
from .util import listdir, mkdir_p, rm_f, rm_rf, is_selinux_enabled, kernelver
from .util import TemporaryDirectory
from .conf import Config
    log.info("linking required packages into packagedir")
    log.info("packagedir = %s", packagedir)
    mkdir_p(packagedir)
 
    pkgbasenames = set()
def setup_media_mount(mnt):
    # make a "media" subdir where all the packages are
    mountpath = os.path.join(upgradelink, "media")
    log.info("setting up mount for %s at %s", mnt.dev, mountpath)
    mkdir_p(mountpath)
    # make a directory to place a unit
    mkdir_p(upgrade_target_requires)
        moddir = os.path.join("/lib/modules", kv)
        log.info("creating module dir %s", moddir)
        mkdir_p(moddir)
    else:
        log.warn("can't determine version of kernel image '%s'", kernel)

src/v/i/vimpyre-0.2.5/vimpyre/bat.py   vimpyre(Download)
            raw_urlopen = urllib.urlopen(self.pathogen_url)
            if raw_urlopen.getcode() == 200:
                util.mkdir_p(self.AUTOLOAD_PATH)
                util.mkdir_p(self.VIMPYRE_PATH)
                raw_pathogen = raw_urlopen.read()
                fetch_url = self._render_fetch_url(ret)
                cmd_fetch = 'git clone --depth 1 %s' % fetch_url
                util.mkdir_p(self.VIMPYRE_PATH)
                with util.cd(self.VIMPYRE_PATH):
                    system(cmd_fetch)

src/v/i/vimpyre-HEAD/vimpyre/bat.py   vimpyre(Download)
            raw_urlopen = urllib.urlopen(self.PATHOGEN_URL)
            if raw_urlopen.getcode() == 200:
                util.mkdir_p(self.AUTOLOAD_PATH)
                util.mkdir_p(self.VIMPYRE_PATH)
                raw_pathogen = raw_urlopen.read()
                fetch_url = self._render_fetch_url(ret)
                cmd_fetch = 'git clone --depth 1 %s' % fetch_url
                util.mkdir_p(self.VIMPYRE_PATH)
                with util.cd(self.VIMPYRE_PATH):
                    system(cmd_fetch)

src/f/e/fedup-HEAD/fedup/download.py   fedup(Download)
from . import cachedir, upgradeconf, kernelpath, initrdpath, defaultkey
from . import mirrormanager
from .util import listdir, mkdir_p, rm_rf, isxen
from shutil import copy2
 
    def save_repo_configs():
        '''save repo configuration files for later use'''
        repodir = os.path.join(cachedir, 'yum.repos.d')
        mkdir_p(repodir)
        for repo in self.repos.listEnabled():
    def _get_treeinfo(self):
        mkdir_p(cachedir)
        outfile = os.path.join(cachedir, '.treeinfo')
 
        if self.cacheonly:
 
        # Save kernel/initrd info so we can clean it up later
        mkdir_p(os.path.dirname(upgradeconf))
        with Config(upgradeconf) as conf:
            conf.set("boot", "kernel", kernel)

src/r/b/rbco.nautilusscripts-0.7/rbco/nautilusscripts/install.py   rbco.nautilusscripts(Download)
        new_path = os.path.join(nautilus_scripts_dir, new_path)
 
        util.mkdir_p(os.path.dirname(new_path))
 
        print 'Symlinking %s to %s ...' % (original_path, new_path)

src/v/c/vcspull-0.0.8.4/vcspull/repo/base.py   vcspull(Download)
import logging
 
from ..util import mkdir_p
from .._compat import urlparse, text_type, console_to_str
 
    def check_destination(self, *args, **kwargs):
        """Assure destination path exists. If not, create directories."""
        if not os.path.exists(self['parent_path']):
            mkdir_p(self['parent_path'])
        else:
            if not os.path.exists(self['path']):
                self.info('Repo directory for %s (%s) does not exist @ %s' % (
                    self['name'], self['vcs'], self['path']))
                mkdir_p(self['path'])

src/v/c/vcspull-0.0.8.4/vcspull/__init__.py   vcspull(Download)
__copyright__ = 'Copyright 2013 Tony Narlock'
 
from .util import expand_config, get_repos, mkdir_p, run, scan, which
from .log import LogFormatter, DebugLogFormatter, RepoLogFormatter, \
    RepoFilter

src/n/e/neurotrends-HEAD/neurotrends/trendpath.py   neurotrends(Download)
 
import neurotrends
from util import mkdir_p
 
# Get home directory
 
for dir in [data_dir, log_dir, fig_dir]:
    mkdir_p(dir)
 
## Add directories to file_dirs