All Samples(17050) | Call(16291) | Derive(0) | Import(759)
listdir(path) -> list_of_strings
Return a list containing the names of the entries in the directory.
path: path of directory to list
The list is in arbitrary order. It does not include the special
entries '.' and '..' even if they are present in the directory.src/f/u/fuse-python-0.2/example/xmp.py fuse-python(Download)
def readdir(self, path, offset):
for e in os.listdir("." + path):
yield fuse.Direntry(e)
def unlink(self, path):
os.unlink("." + path)
src/m/a/matplotlib-HEAD/matplotlib/examples/tests/backend_driver.py matplotlib(Download)
path = backend
if os.path.exists(path):
import glob
for fname in os.listdir(path):
os.unlink(os.path.join(path,fname))
else:
os.mkdir(backend)
src/m/a/matplotlib-HEAD/examples/tests/backend_driver.py matplotlib(Download)
path = backend
if os.path.exists(path):
import glob
for fname in os.listdir(path):
os.unlink(os.path.join(path,fname))
else:
os.mkdir(backend)
src/p/y/pypy3-HEAD/pypy/interpreter/pyparser/test/unittest_samples.py pypy3(Download)
def read_samples_dir():
return [osp.join('samples', fname) for fname in os.listdir('samples') if fname.endswith('.py')]
def print_sym_tuple(nested, level=0, limit=15, names=False, trace=()):
buf = []
if level <= limit:
buf.append("%s(" % (" "*level))
src/m/a/Matplotlib--JJ-s-dev-HEAD/examples/tests/backend_driver.py Matplotlib--JJ-s-dev(Download)
path = backend
if os.path.exists(path):
import glob
for fname in os.listdir(path):
os.unlink(os.path.join(path,fname))
else:
os.mkdir(backend)
src/p/y/pypy-HEAD/pypy/interpreter/pyparser/test/unittest_samples.py pypy(Download)
def read_samples_dir():
return [osp.join('samples', fname) for fname in os.listdir('samples') if fname.endswith('.py')]
def print_sym_tuple(nested, level=0, limit=15, names=False, trace=()):
buf = []
if level <= limit:
buf.append("%s(" % (" "*level))
src/m/o/modu-HEAD/examples/modusite/modusite/scripts/release.py modu(Download)
def create(hostname, source, destination, nightly=False):
os.chdir(source)
os.system('svn update')
existing = os.listdir(destination)
os.system('python setup.py egg_info %s sdist' % (('-RDb ""', '')[int(nightly)]))
filename = None
for item in os.listdir(os.path.join(source, 'dist')):
src/d/i/diksel-HEAD/trunk/thirdparty/pyjamasdev/examples/buildall.py diksel(Download)
#!/usr/bin/env python
import os
for d in os.listdir('.'):
if os.path.isdir(d):
os.chdir(d)
for f in os.listdir("."):
src/s/k/skeleton-0.6/skeleton/examples/basic-package/distribute_setup.py skeleton(Download)
tar.close()
# going in the directory
subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
os.chdir(subdir)
log.warn('Now working in %s', subdir)
tar.close()
# going in the directory
subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
os.chdir(subdir)
log.warn('Now working in %s', subdir)
def _remove_flat_installation(placeholder):
if not os.path.isdir(placeholder):
log.warn('Unkown installation at %s', placeholder)
return False
found = False
for file in os.listdir(placeholder):
if fnmatch.fnmatch(file, 'setuptools*.egg-info'):
src/d/i/diksel-HEAD/thirdparty/pyjamasdev/examples/buildall.py diksel(Download)
#!/usr/bin/env python
import os
for d in os.listdir('.'):
if os.path.isdir(d):
os.chdir(d)
for f in os.listdir("."):
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next