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

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

src/p/y/pyrocore-0.4.2/src/pyrocore/scripts/rtmv.py   pyrocore(Download)
            # Create parts of target path
            existing, _ = target.split("//", 1)
            if not os.path.isdir(existing):
                self.fatal("Path before '//' MUST exists in %s" % (pretty_path(target),))
 
        ##for path in source_paths: print path, "==>"; print "  " + "\n  ".join(i.path for i in source_items[path])
 
        if not os.path.isdir(target) and len(source_paths) > 1:
            self.fatal("Can't move multiple files to %s which is no directory!" % (pretty_path(target),))
 
                moved_count += 1
                dst = target
                if os.path.isdir(dst):
                    dst = os.path.join(dst, os.path.basename(path))
                self.LOG.info("Moving to %s..." % (pretty_path(dst),))

src/p/y/pyrocore-0.4.2/src/pyrocore/torrent/rtorrent.py   pyrocore(Download)
            # (this prevents losing the chain when there's permission problems)
            for path in reversed(rm_paths):
                is_dir = os.path.isdir(path)
                self._engine.LOG.debug("Deleting '%s%s'" % (path, '/' if is_dir else ''))
                if not dry_run:
            raise error.EngineError("Directory '%s' for item #%s is not absolute, which is a bad idea;"
                " fix your .rtorrent.rc, and use 'directory.default.set = /...' with rTorrent 0.8.7+" % (self.directory, self._fields["hash"],))
        if len(item_files) > 1 and os.path.isdir(self.directory):
            dirs.add(self.directory)
 

src/p/y/pyrocore-0.4.2/src/pyrocore/util/metafile.py   pyrocore(Download)
    single = files is None
    if single:
        if os.path.isdir(datapath):
            datapath = os.path.join(datapath, meta["info"]["name"])
        files = [Bunch(
 
        # Directory?
        elif os.path.isdir(self.datapath):
            # Walk the directory tree
            for dirpath, dirnames, filenames in os.walk(self.datapath): #, followlinks=True):
 
        # Handle directory/FIFO vs. single file        
        if self._fifo or os.path.isdir(self.datapath):
            metainfo["files"] = file_list
        else:

src/p/y/pyrocore-0.4.2/src/pyrocore/scripts/mktor.py   pyrocore(Download)
        if self.options.output_filename:
            metapath = self.options.output_filename
            if os.path.isdir(metapath):
                metapath = os.path.join(metapath, os.path.basename(datapath))
        torrent = metafile.Metafile(metapath + ".torrent")

src/p/y/pyrocore-0.4.2/src/pyrocore/scripts/pyroadmin.py   pyrocore(Download)
            for dirname in self.CONFIG_DIRS:
                dirpath = os.path.join(config_loader.config_dir, dirname)
                if not os.path.isdir(dirpath):
                    self.LOG.info("Creating %r..." % (dirpath,))
                    os.mkdir(dirpath)

src/p/y/pyrocore-0.4.2/src/tests/test_flexget.py   pyrocore(Download)
        flexget_tests_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(flexget.__file__))), "tests")
        #print flexget_tests_dir
        if os.path.isdir(flexget_tests_dir):
            tests.__path__.append(flexget_tests_dir) #@UndefinedVariable
            imp.acquire_lock()