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

All Samples(13)  |  Call(13)  |  Derive(0)  |  Import(0)

src/p/y/pyrocore-0.4.2/src/pyrocore/torrent/rtorrent.py   pyrocore(Download)
                path = target
 
            if os.path.exists(path):
                rm_paths.append(path)
            else:
        doomed = files | dirs
        for path in sorted(dirs, reverse=True):
            residue = set(os.listdir(path) if os.path.exists(path) else [])
            ignorable = set(i for i in residue 
                if any(fnmatch.fnmatch(i, pat) for pat in config.waif_pattern_list)
                raise error.UserError("You need a session directory, read"
                    " http://code.google.com/p/pyroscope/wiki/UserConfiguration")
            if not os.path.exists(self._session_dir):
                raise error.UserError("Non-existing session directory %r" % self._session_dir)
            self._download_dir = os.path.expanduser(self._rpc.get_directory())
            if not os.path.exists(self._download_dir):

src/p/y/pyrocore-0.4.2/src/pyrocore/util/load_config.py   pyrocore(Download)
    def create(self):
        """ Create default configuration files at either the default location or the given directory.
        """
        # Check and create configuration directory
        if os.path.exists(self.config_dir):
            # Create missing subdirs
            config_file = self.config_dir + filepath
            if not os.path.exists(os.path.dirname(config_file)):
                os.makedirs(os.path.dirname(config_file))
 
            # Write configuration files
            config_trail = [".default"]
            if os.path.exists(config_file):

src/p/y/pyrocore-0.4.2/src/pyrocore/scripts/rtmv.py   pyrocore(Download)
            # Possibly create the rest
            target = target.replace("//", "/")
            if not os.path.exists(target):
                self.guarded(os.makedirs, target)
 

src/p/y/pyrocore-0.4.2/src/pyrocore/scripts/pyroadmin.py   pyrocore(Download)
            # Create screenlet stub
            stub_dir = os.path.expanduser("~/.screenlets/PyroScope")
            if os.path.exists(stub_dir):
                self.fatal("Screenlet stub %r already exists" % stub_dir)
 

src/p/y/pyrocore-0.4.2/src/pyrocore/scripts/base.py   pyrocore(Download)
        logging_cfg = os.path.expanduser(logging_cfg)
 
        if os.path.exists(logging_cfg):
            logging.HERE = os.path.dirname(logging_cfg)
            logging.config.fileConfig(logging_cfg)
                        __name__.split(".")[0] # package name
                    )
                    if os.path.exists(pkg_path + ".egg-info"):
                        pkg_path += ".egg-info"
                    else:

src/p/y/pyrocore-0.4.2/src/pyrocore/torrent/engine.py   pyrocore(Download)
        formatter=lambda val: "IGN!" if int(val) else "HEED")
    is_ghost = DynamicField(bool, "is_ghost", "has no data file or directory?", matcher=matching.BoolFilter,
        accessor=lambda o: not os.path.exists(fmt.to_unicode(o._fields["path"])),
        formatter=lambda val: "GHST" if val else "DATA")
 

src/p/y/pyrocore-0.4.2/src/tests/test_flexget.py   pyrocore(Download)
 
 
if os.path.exists(os.path.expanduser(FLEXGET_BOOTSTRAP)) and load_flexget_tests():
    from flexget_tests import FlexGetBase #@UnresolvedImport
    from flexget import plugin