• 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/a/u/audiolab-HEAD/docs/src/examples/matlab1.py   audiolab(Download)
from tempfile import mkstemp
from os.path import join, dirname
from os import remove
 
from scikits.audiolab import wavread, wavwrite
 
(tmp, fs, enc)  = wavread('test.wav')
try:
    wavwrite(tmp, cfilename, fs = 16000, enc = 'pcm24')
finally:
    remove(cfilename)
 

src/a/u/audiolab-HEAD/docs/src/examples/obsolete/write1.py   audiolab(Download)
from tempfile import mkstemp
from os import remove
 
import numpy as N
from scikits.audiolab import formatinfo as format
import scikits.audiolab as audiolab
 
    assert(afile.get_channels() == nchannels)
    assert(afile.get_nframes() == 500)
finally:
    remove(filename)
 

src/s/c/scikits.audiolab-0.11.0/docs/src/examples/matlab1.py   scikits.audiolab(Download)
from tempfile import mkstemp
from os.path import join, dirname
from os import remove
 
from scikits.audiolab import wavread, wavwrite
 
(tmp, fs, enc)  = wavread('test.wav')
try:
    wavwrite(tmp, cfilename, fs = 16000, enc = 'pcm24')
finally:
    remove(cfilename)
 

src/s/c/scikits.audiolab-0.11.0/docs/src/examples/obsolete/write1.py   scikits.audiolab(Download)
from tempfile import mkstemp
from os import remove
 
import numpy as N
from scikits.audiolab import formatinfo as format
import scikits.audiolab as audiolab
 
    assert(afile.get_channels() == nchannels)
    assert(afile.get_nframes() == 500)
finally:
    remove(filename)
 

src/p/u/pumat-HEAD/tools/energy.py   pumat(Download)
from enthought.traits.api import HasTraits, File, Directory, Property, Float, Array, Int, Instance, Range
 
#Standard library imports
from os import access, pathsep, environ, X_OK, W_OK, R_OK, remove
from os.path import exists, split, join, abspath
from subprocess import Popen, PIPE
from sys import stdout
    def clean_up(self):
        remove(self.combined_file)
        remove(self.combined_topol)
 
    def initialize(self, traj, traj_topol):
        """Initialize the calculator with a trajectory that we're going to use
        for insertions.
        if 'Fatal error:' in err or 'Can not open file' in err:
            print err
            raise ValueError, 'grompp failed!'
        remove(mdpout)
 
        #Run mdrun with the -rerun flag set to get an energy file
        (edr, log, trr) = self.gen_tempfiles(['edr', 'log', 'trr'])
        cmdstr = [mdrun, '-s', tpr, '-e', edr, '-g', log, 
                  '-o', trr, '-rerun', xtc_out]
        proc = Popen(cmdstr, stdout=PIPE, stderr=PIPE)
        (out, err) = proc.communicate()
        if 'Fatal error:' in err or 'Can not open file' in err:
            print err
            remove(tpr), remove(trr), remove(log), remove(edr)
            print err
            remove(tpr), remove(trr), remove(log), remove(edr)
            raise ValueError, 'mdrun failed!'
        remove(tpr), remove(trr), remove(log)
 
        #Parse the energy file with g_energy, dumping the potential energies to 
        #the xvg file.
        (xvg,) = self.gen_tempfiles(['xvg'])
        cmdstr = [g_energy, '-f', edr, '-o', xvg]
        proc = Popen(cmdstr, stdin=PIPE, stdout=PIPE, stderr=PIPE)
        (out, err) = proc.communicate('Potential')
        if 'Fatal error:' in err or 'Can not open file' in err:
            print err
            remove(edr), remove(xvg)
            print err
            remove(edr), remove(xvg)
            raise ValueError, 'g_energy failed!'
        remove(edr)
 
        #Read the xvg file, pulling out the potential energies
        energies = self.parse_xvg(xvg)
        remove(xvg)
 
        #Remove the xtc file
        remove(xtc_out)
        (out, err) = proc.communicate()
        if 'Fatal error:' in err or 'Can not open file' in err:
            print err
            remove(grofile)
            raise ValueError, 'grompp failed!'
        remove(mdpout), remove(grofile)
 
        (out, err) = proc.communicate()
        if 'Fatal error:' in err or 'Can not open file' in err:
            print err
            remove(tpr), remove(trr), remove(log), remove(edr)
            raise ValueError, 'mdrun failed!'
        remove(tpr), remove(trr), remove(log)
 
        (out, err) = proc.communicate('Potential')
        if 'Fatal error:' in err or 'Can not open file' in err:
            print err
            remove(edr), remove(xvg)
            raise ValueError, 'g_energy failed!'
        remove(edr)
 
        #Read the xvg file, pulling out the potential energies
        energies = self.parse_xvg(xvg)
        remove(xvg)
        (out, err) = proc.communicate()
        if 'Fatal error:' in err or 'Can not open file' in err:
            print err
            remove(tpr), remove(mdpout)
            raise ValueError, 'grompp failed!'
        remove(mdpout)
 
        (out, err) = proc.communicate()
        if 'Fatal error:' in err or 'Can not open file' in err:
            print err
            remove(tpr), remove(trr), remove(log), remove(edr)
            raise ValueError, 'mdrun failed!'
        remove(tpr), remove(trr), remove(log), remove(grofile)
 
        (out, err) = proc.communicate('Potential')
        if 'Fatal error:' in err or 'Can not open file' in err:
            print err
            remove(edr), remove(xvg)
            raise ValueError, 'g_energy failed!'
        remove(edr)
 
        #Read the xvg file, pulling out the potential energies
        energies = self.parse_xvg(xvg)
        remove(xvg)

src/z/o/zope.app.twisted-3.5.0/src/twisted/python/lockfile.py   zope.app.twisted(Download)
try:
    from os import symlink
    from os import readlink
    from os import remove as rmlink
    from os import rename as mvlink
except:
    # XXX Implement an atomic thingamajig for win32
        try:
            os.rename(newlinkname, filename)
        except:
            os.remove(newvalname)
            os.rmdir(newlinkname)
            raise
 

src/o/r/organizasyonizm-HEAD/GuncellemeyeUydur.py   organizasyonizm(Download)
from shutil import move, copy
import time
import tempfile, random
from os import listdir,path,removedirs,makedirs, rmdir, remove
if sys.path[0]=="":
    sys.path.insert(0, sys.path[1])
 
    def __init__(self):
        global EAyarlar
        calis = True
        if len(sys.argv)>1:
            kaynak = sys.argv[1]
            if sys.argv[1]=="-GuncellemeyeUydur":
                remove(sys.path[0]+"/Guncelle.py")
                copy(sys.path[0]+"/GuncellemeyeUydur.py", sys.path[0]+"/Guncelle.py")
                popen = os.popen(pyqtconfig._pkg_config["pyqt_bin_dir"]+"/python "+sys.path[0]+ "/Guncelle.py -GuncellemeyeUyduruldu", "w", 1)
                calis = False
            elif sys.argv[1]=="-GuncellemeyeUyduruldu":
                time.sleep(1)
                remove(sys.path[0]+"/GuncellemeyeUydur.py")
                    if os.path.isdir(hedef+"/"+file):
                        sil(hedef+"/"+file, True)
                    else:
                        remove(hedef+"/"+file)
            for file in listdir(geciciDizin+"/OrganizasyonizM"):
                if file!="Guncelle.py":
                    move(geciciDizin+"/OrganizasyonizM/"+file,hedef)
    def sil(_yol, _dizinMi=False):
        global Ayarlar
        if _dizinMi==False:
            remove(_yol)
        else:
            for eleman in listdir(_yol):
                if os.path.isfile(_yol+"/"+eleman):

src/m/e/meresco-HEAD/meresco-core/workingsets/2.22.9-EduRep/version_8/merescocore/components/reindex.py   meresco(Download)
from lxml.etree import parse
from StringIO import StringIO
from os.path import isdir, join
from os import makedirs, listdir, remove, rmdir
 
EMPTYDOC = parse(StringIO('<empty/>'))
 
                return
            yield "+%s\n" % identifier
 
        remove(batchFile)
        yield "=batches left: %d" % len(listdir(sessionDirectory))
        if len(listdir(sessionDirectory)) == 0:
            rmdir(sessionDirectory)

src/m/e/meresco-HEAD/meresco-core/workingsets/2.22.9-EduRep/version_7/merescocore/components/reindex.py   meresco(Download)
from lxml.etree import parse
from StringIO import StringIO
from os.path import isdir, join
from os import makedirs, listdir, remove, rmdir
 
EMPTYDOC = parse(StringIO('<empty/>'))
 
                return
            yield "+%s\n" % identifier
 
        remove(batchFile)
        yield "=batches left: %d" % len(listdir(sessionDirectory))
        if len(listdir(sessionDirectory)) == 0:
            rmdir(sessionDirectory)

src/m/e/meresco-HEAD/meresco-core/workingsets/2.22.9-EduRep/version_6/merescocore/components/reindex.py   meresco(Download)
from lxml.etree import parse
from StringIO import StringIO
from os.path import isdir, join
from os import makedirs, listdir, remove, rmdir
 
EMPTYDOC = parse(StringIO('<empty/>'))
 
                return
            yield "+%s\n" % identifier
 
        remove(batchFile)
        yield "=batches left: %d" % len(listdir(sessionDirectory))
        if len(listdir(sessionDirectory)) == 0:
            rmdir(sessionDirectory)

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