• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(16184)  |  Call(15625)  |  Derive(0)  |  Import(559)
remove(path)

Remove a file (same as unlink(path)).

src/d/u/dutils-0.0.10/dutils/sample/path.py   dutils(Download)
    def remove(self):
        os.remove(self)
 
    def unlink(self):
        os.unlink(self)
 
 

src/p/y/PyMT-0.5.1/examples/apps/mtwitter/twitter.py   PyMT(Download)
      raise _FileCacheError('%s does not appear to live under %s' %
                            (path, self._root_directory))
    if os.path.exists(path):
      os.remove(path)
    os.rename(temp_path, path)
 
  def Remove(self,key):
    path = self._GetPath(key)
    if not path.startswith(self._root_directory):
      raise _FileCacheError('%s does not appear to live under %s' %
                            (path, self._root_directory ))
    if os.path.exists(path):
      os.remove(path)

src/m/a/matplotlib-HEAD/matplotlib/examples/tests/backend_driver.py   matplotlib(Download)
        end_time = time.time()
        print (end_time - start_time), ret
        #os.system('%s %s %s' % (python, tmpfile_name, ' '.join(switches)))
        os.remove(tmpfile_name)
        if ret:
            failures.append(fullpath)
    return failures
                continue
            print 'removing %s'%d
            for fname in glob.glob(os.path.join(d, '*')):
                os.remove(fname)
            os.rmdir(d)
        for fname in glob.glob('_tmp*.py'):
            os.remove(fname)

src/p/e/pexpect-HEAD/pexpect/examples/bd_serv.py   pexpect(Download)
    virtual_screen.write (child.before)
    virtual_screen.write (child.after)
 
    if os.path.exists("/tmp/mysock"): os.remove("/tmp/mysock")
    s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
    localhost = '127.0.0.1'
    s.bind('/tmp/mysock')
        r.cancel()
        print "cleaning up socket"
        s.close()
        if os.path.exists("/tmp/mysock"): os.remove("/tmp/mysock")
        print "done!"
 
def pretty_box (rows, cols, s):

src/m/a/matplotlib-HEAD/examples/tests/backend_driver.py   matplotlib(Download)
        end_time = time.time()
        print (end_time - start_time), ret
        #os.system('%s %s %s' % (python, tmpfile_name, ' '.join(switches)))
        os.remove(tmpfile_name)
        if ret:
            failures.append(fullpath)
    return failures
                continue
            print 'removing %s'%d
            for fname in glob.glob(os.path.join(d, '*')):
                os.remove(fname)
            os.rmdir(d)
        for fname in glob.glob('_tmp*.py'):
            os.remove(fname)

src/m/a/Matplotlib--JJ-s-dev-HEAD/examples/tests/backend_driver.py   Matplotlib--JJ-s-dev(Download)
        end_time = time.time()
        print (end_time - start_time), ret
        #os.system('%s %s %s' % (python, tmpfile_name, ' '.join(switches)))
        os.remove(tmpfile_name)
        if ret:
            failures.append(fullpath)
    return failures
                continue
            print 'removing %s'%d
            for fname in glob.glob(os.path.join(d, '*')):
                os.remove(fname)
            os.rmdir(d)
        for fname in glob.glob('_tmp*.py'):
            os.remove(fname)

src/p/y/pyfsevents-0.2b1/examples/testwatcher.py   pyfsevents(Download)
def unlink(path):
    "rm -rf path"
    for root, dirs, files in os.walk(path, topdown=False):
        for name in files:
            os.remove(os.path.join(root, name))
        for dir in dirs:
            os.rmdir(os.path.join(root, dir))
            else:
                os.rmdir(full)
        else:
            os.remove(name)
 
        del self.curdir[name]
        self.compare("deleted", full)

src/p/e/pexpect-2.4/examples/bd_serv.py   pexpect(Download)
    virtual_screen.write (child.before)
    virtual_screen.write (child.after)
 
    if os.path.exists("/tmp/mysock"): os.remove("/tmp/mysock")
    s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
    localhost = '127.0.0.1'
    s.bind('/tmp/mysock')
        r.cancel()
        print "cleaning up socket"
        s.close()
        if os.path.exists("/tmp/mysock"): os.remove("/tmp/mysock")
        print "done!"
 
def pretty_box (rows, cols, s):

src/m/a/matplotlib-HEAD/py4science/examples/mkprob.py   matplotlib(Download)
    except AttributeError:
        copy = shutil.copy
    if os.path.isfile(dest):
        os.remove(dest)
    copy(src,dest)
 
 
def mvforce(src,dest):
    """Forceful file copy that overwrites destination files."""
    if os.path.isfile(dest):
        os.remove(dest)

src/b/o/boxc-HEAD/trunk/web/in/examples/create_example.py   boxc(Download)
print "Removing old figure if present..."
if out_eps and os.access(out_eps, os.W_OK):
  try:
    os.remove(out_eps)
  except:
    print "Failed to remove the figure: continuing anyway..."
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next