All Samples(10523) | Call(10413) | Derive(0) | Import(110)
chdir(path) Change the current working directory to the specified path.
src/d/j/django-userlibs-HEAD/trunk/libs.common/src/common/utils/latexrender.py django-userlibs(Download)
from md5 import md5 from random import random from os import path, getcwd, chdir, system, unlink, popen2 from shutil import copy class LatexRender(object):
def renderLatex(self, latex_formula): latex_document = self.wrap_latex(latex_formula) current_dir = getcwd() chdir(self._tmp_dir) # build temporary filenames with extension
if status_code: self.cleanTemporaryDirectory() chdir(current_dir) self._error_code = 4 return False
if dim['x'] > self._xsize_limit or dim['y'] > self._ysize_limit: self.cleanTemporaryDirectory() chdir(current_dir) self._error_code = 5 self._error_extra = ":%sx%s" % (dim['x'], dim['y']) return False
self.cleanTemporaryDirectory() chdir(current_dir) return True def cleanTemporaryDirectory(self): current_dir = getcwd() chdir(self._tmp_dir)
if path.isfile(filename): unlink(filename) chdir(current_dir)
src/e/u/eurasia-HEAD/Eurasia/daemon.py eurasia(Download)
SimpleXMLRPCRequestHandler, SimpleXMLRPCServer from xmlrpclib import Fault, Transport, dumps as xmlrpc_dumps, \ _Method as _XMLRPCMethod, ServerProxy as ServerProxy_N___G from os import execv, chdir, chmod, dup2, fork, geteuid, getpid, \ kill, setgid, setuid, umask, unlink, waitpid, \ error as OSError, WNOHANG
if args['directory']: try: chdir(args['directory']) except OSError, err: print >> stderr, ( 'can\'t chdir into %r: %s' % (args['directory'], err) )
src/d/j/django-userlibs-HEAD/libs.common/src/common/utils/latexrender.py django-userlibs(Download)
from md5 import md5 from random import random from os import path, getcwd, chdir, system, unlink, popen2 from shutil import copy class LatexRender(object):
def renderLatex(self, latex_formula): latex_document = self.wrap_latex(latex_formula) current_dir = getcwd() chdir(self._tmp_dir) # build temporary filenames with extension
if status_code: self.cleanTemporaryDirectory() chdir(current_dir) self._error_code = 4 return False
if dim['x'] > self._xsize_limit or dim['y'] > self._ysize_limit: self.cleanTemporaryDirectory() chdir(current_dir) self._error_code = 5 self._error_extra = ":%sx%s" % (dim['x'], dim['y']) return False
self.cleanTemporaryDirectory() chdir(current_dir) return True def cleanTemporaryDirectory(self): current_dir = getcwd() chdir(self._tmp_dir)
if path.isfile(filename): unlink(filename) chdir(current_dir)
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Doc/sphinx/ext/pngmath.py ironruby(Download)
import shutil
import tempfile
import posixpath
from os import path, getcwd, chdir
from subprocess import Popen, PIPE
try:
from hashlib import sha1 as sha
ltx_args.append('math.tex')
curdir = getcwd()
chdir(tempdir)
try:
try:
self.builder._mathpng_warned_latex = True
return None, None
finally:
chdir(curdir)
stdout, stderr = p.communicate()
if p.returncode != 0:
src/p/y/pypy3-HEAD/pypy/tool/statistic_irc_log.py pypy3(Download)
import py
from os import system, chdir
from urllib import urlopen
log_URL = 'http://tismerysoft.de/pypy/irc-logs/'
archive_FILENAME = 'pypy.tar.gz'
tempdir = py.test.ensuretemp("irc-log")
# get compressed archive
chdir( str(tempdir))
system('wget -q %s%s' % (log_URL, archive_FILENAME))
system('tar xzf %s' % archive_FILENAME)
chdir('pypy')
src/p/y/pypy-HEAD/pypy/tool/statistic_irc_log.py pypy(Download)
import py
from os import system, chdir
from urllib import urlopen
log_URL = 'http://tismerysoft.de/pypy/irc-logs/'
archive_FILENAME = 'pypy.tar.gz'
tempdir = py.test.ensuretemp("irc-log")
# get compressed archive
chdir( str(tempdir))
system('wget -q %s%s' % (log_URL, archive_FILENAME))
system('tar xzf %s' % archive_FILENAME)
chdir('pypy')
src/d/0/d-rose-HEAD/rel_0_01_03/unstable/release.py d-rose(Download)
from os import access from os import chdir from os import F_OK from os import listdir from os import mkdir from os import rmdir from os import unlink
mkdir( argv[1] ) for file in currentFiles: copy( file, argv[1] ) chdir( argv[1] ) # "tar cfj ../d-rose-unstable-<argv[1]>.tar.bz2 *" # "zip ../d-rose-unstable-<argv[1]>.zip *" for file in currentFiles: unlink( file ) chdir( '..' )
src/b/o/booggie-HEAD/projects/FBSsynthesis2/trunk/src/evaluation/statistics/statistic_evaluation.py booggie(Download)
#!/usr/bin/env python #from tempfile import TemporaryFile from xlwt import * from xlrd import * from xlutils import * from os import path, listdir, getcwd, system,remove, chdir
self.manipulate_grs()
workingdir = getcwd()
chdir(self.dirpath)
command = "GrShell " + self.name +"_temp.grs"
# print command
system(command)
chdir(workingdir)
src/i/d/id3tagger-HEAD/common/files.py id3tagger(Download)
__AUTHOR__ = "Gustavo Serra Scalet <gsscalet@gmail.com>" from os import path,listdir,getcwd,chdir,rename from structure import Directory, TagElement def getAllFilesRecursive(_dir = '.', ext = None, hide_hidden = True): """Returns all matched @EXT files under @_DIR arg recursivelly with the Directory struct""" things = Directory(_dir) old_dir = getcwd() chdir(things.basename)
else: # regular file if not things.addFile(TagElement(file_rel)): raise Exception chdir(old_dir) return things def makeRenamingChanges(parsed_files): """Apply renaming to the files on @PARSED_FILES as described by updateDictWithReplacement""" def makeRenamingChangesAux(parsed_files): root = getcwd() chdir(path.join(root, parsed_files['basename']))
makeRenamingChangesAux(f) elif type(f) is tuple or type(f) is list: rename(*f) # rename(f[0], f[1]) chdir(root) # ignores the first basename as it's the same of the current dir old = parsed_files['basename']
src/z/a/zamboni-lib-HEAD/lib/python/sphinx/ext/pngmath.py zamboni-lib(Download)
import shutil
import tempfile
import posixpath
from os import path, getcwd, chdir
from subprocess import Popen, PIPE
try:
from hashlib import sha1 as sha
ltx_args.append('math.tex')
curdir = getcwd()
chdir(tempdir)
try:
try:
self.builder._mathpng_warned_latex = True
return None, None
finally:
chdir(curdir)
stdout, stderr = p.communicate()
if p.returncode != 0:
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next