All Samples(10523) | Call(10413) | Derive(0) | Import(110)
chdir(path) Change the current working directory to the specified path.
src/p/e/pexpect-HEAD/pexpect/examples/bd_serv.py pexpect(Download)
sys.exit(1)
# Decouple from parent environment.
os.chdir("/")
os.umask(0)
os.setsid()
src/s/k/skeleton-0.6/skeleton/examples/basic-package/distribute_setup.py skeleton(Download)
def _install(tarball):
# extracting the tarball
tmpdir = tempfile.mkdtemp()
log.warn('Extracting in %s', tmpdir)
old_wd = os.getcwd()
try:
os.chdir(tmpdir)
tar = tarfile.open(tarball)
_extractall(tar)
tar.close()
# going in the directory
subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
os.chdir(subdir)
log.warn('Something went wrong during the installation.')
log.warn('See the error message above.')
finally:
os.chdir(old_wd)
def _build_egg(egg, tarball, to_dir):
# extracting the tarball
tmpdir = tempfile.mkdtemp()
log.warn('Extracting in %s', tmpdir)
old_wd = os.getcwd()
try:
os.chdir(tmpdir)
# going in the directory
subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
os.chdir(subdir)
log.warn('Now working in %s', subdir)
# building an egg
log.warn('Building a Distribute egg in %s', to_dir)
_python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
finally:
os.chdir(old_wd)
src/f/u/fuse-python-0.2/example/xmp.py fuse-python(Download)
def fsinit(self):
os.chdir(self.root)
class XmpFile(object):
def __init__(self, path, flags, *mode):
self.file = os.fdopen(os.open("." + path, flags, *mode),
try:
if server.fuse_args.mount_expected():
os.chdir(server.root)
except OSError:
print >> sys.stderr, "can't enter root of underlying filesystem"
sys.exit(1)
src/m/a/matplotlib-HEAD/py4science/examples/sphinx_template/make.py matplotlib(Download)
os.system('sphinx-build -b latex -d build/doctrees . build/latex')
# Produce pdf.
os.chdir('build/latex')
# Copying the makefile produced by sphinx...
os.system('pdflatex sampledoc.tex')
os.system('pdflatex sampledoc.tex')
os.system('makeindex -s python.ist sampledoc.idx')
os.system('makeindex -s python.ist modsampledoc.idx')
os.system('pdflatex sampledoc.tex')
os.chdir('../..')
src/p/y/pyfsevents-0.2b1/examples/testwatcher.py pyfsevents(Download)
full = os.path.join(os.getcwd(), name)
if os.path.isdir(name):
if self.curdir[name]:
os.chdir(name)
self.parentdirs.append(self.curdir)
self.curdir = self.curdir[name]
self.delete()
self.curdir = self.curdir[name]
os.mkdir(name)
self.compare("created", os.path.join(os.getcwd(), name))
os.chdir(name)
return True
def up(self):
"cd .."
if not self.parentdirs:
return self.down()
os.chdir('..')
stderr=subprocess.STDOUT)
time.sleep(2)
os.chdir(tmpdir)
t = Tester(child)
t.run()
finally:
os.chdir(tmpdir + '/..')
src/p/e/pexpect-2.4/examples/bd_serv.py pexpect(Download)
sys.exit(1)
# Decouple from parent environment.
os.chdir("/")
os.umask(0)
os.setsid()
src/p/y/python-cookbook-HEAD/cb2_examples/cb2_9_13_sol_1.py python-cookbook(Download)
sys.stderr.write("fork #1 failed: (%d) %s\n" % (e.errno, e.strerror))
sys.exit(1)
# Decouple from parent environment.
os.chdir("/")
os.umask(0)
os.setsid()
# Perform second fork.
src/p/y/pyfusion-HEAD/examples/test_savez.py pyfusion(Download)
tim=discretise_array(noisytime,eps=eps,verbose=verbose)
pushd=os.getcwd()
os.chdir(os.getenv('PYFUSIONPATH'))
os.chdir('..')
os.chdir('local_data')
try:
test_compress('33373_HAARRAY31.npz',verbose=verbose)
test_compress('18993_densitymediaIR.npz')
os.chdir(pushd)
src/c/y/cycad-HEAD/trunk/src/pexpect-2.0/examples/bd_serv.py cycad(Download)
sys.exit(1)
# Decouple from parent environment.
os.chdir("/")
os.umask(0)
os.setsid()
src/c/y/cycad-HEAD/src/pexpect-2.0/examples/bd_serv.py cycad(Download)
sys.exit(1)
# Decouple from parent environment.
os.chdir("/")
os.umask(0)
os.setsid()
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next