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

All Samples(12248)  |  Call(12028)  |  Derive(0)  |  Import(220)
getcwd() -> path

Return a string representing the current working directory.

src/p/y/python-sapnwrfc-HEAD/examples/sapnwrfc_test.py   python-sapnwrfc(Download)
    sys.exit(1)
  import os
  path = ""
  if 'build' in os.listdir(os.getcwd()):
    path = os.path.join(os.getcwd(), 'build')
  elif os.listdir(os.path.join(os.getcwd(), '../')):
    path = os.path.join(os.getcwd(), '../build')
  else:
    print "cant find ./build directory to load the saprfc module, try runnig from the package root dir"
    print "   looked in:", os.getcwd(), " and ", os.path.join(os.getcwd(), '../')
      libdir = os.path.join(path, i)
  if libdir == "":
    print "cant find ./build directory to load the saprfc module, try runnig from the package root dir"
    print "   looked in:", os.getcwd(), " and ", os.path.join(os.getcwd(), '../')
    sys.exit(1)
 
  sys.path.append(libdir)

src/p/y/python-sapnwrfc-HEAD/examples/greek_test.py   python-sapnwrfc(Download)
    sys.exit(1)
  import os
  path = ""
  if 'build' in os.listdir(os.getcwd()):
    path = os.path.join(os.getcwd(), 'build')
  elif os.listdir(os.path.join(os.getcwd(), '../')):
    path = os.path.join(os.getcwd(), '../build')
  else:
    print "cant find ./build directory to load the saprfc module, try runnig from the package root dir"
    print "   looked in:", os.getcwd(), " and ", os.path.join(os.getcwd(), '../')
      libdir = os.path.join(path, i)
  if libdir == "":
    print "cant find ./build directory to load the saprfc module, try runnig from the package root dir"
    print "   looked in:", os.getcwd(), " and ", os.path.join(os.getcwd(), '../')
    sys.exit(1)
 
  sys.path.append(libdir)

src/p/y/python-sapnwrfc-HEAD/examples/conn_test.py   python-sapnwrfc(Download)
  sys.exit(1)
import os
path = ""
if 'build' in os.listdir(os.getcwd()):
  path = os.path.join(os.getcwd(), 'build')
elif os.listdir(os.path.join(os.getcwd(), '../')):
  path = os.path.join(os.getcwd(), '../build')
else:
  print "cant find ./build directory to load the saprfc module, try runnig from the package root dir"
  print "   looked in:", os.getcwd(), " and ", os.path.join(os.getcwd(), '../')
    libdir = os.path.join(path, i)
if libdir == "":
  print "cant find ./build directory to load the saprfc module, try runnig from the package root dir"
  print "   looked in:", os.getcwd(), " and ", os.path.join(os.getcwd(), '../')
  sys.exit(1)
sys.path.append(libdir)
print "using library path: " + libdir

src/p/y/python-sapnwrfc-HEAD/examples/basic.py   python-sapnwrfc(Download)
  sys.exit(1)
import os
path = ""
if 'build' in os.listdir(os.getcwd()):
  path = os.path.join(os.getcwd(), 'build')
elif os.listdir(os.path.join(os.getcwd(), '../')):
  path = os.path.join(os.getcwd(), '../build')
else:
  print "cant find ./build directory to load the saprfc module, try runnig from the package root dir"
  print "   looked in:", os.getcwd(), " and ", os.path.join(os.getcwd(), '../')
    libdir = os.path.join(path, i)
if libdir == "":
  print "cant find ./build directory to load the saprfc module, try runnig from the package root dir"
  print "   looked in:", os.getcwd(), " and ", os.path.join(os.getcwd(), '../')
  sys.exit(1)
sys.path.append(libdir)
print "using library path: " + libdir

src/p/y/pyfsevents-0.2b1/examples/testwatcher.py   pyfsevents(Download)
    def create(self):
        "creae a file in current directory"
        name = genname()
        path = os.getcwd() + "/" + name
        if os.path.exists(path):
            return False
        open(path, 'w+')
        fd = open(name, 'w+')
        fd.write('x')
        fd.close()
        self.compare("modified", os.getcwd() + "/" + name)
        return True
 
    def delete(self):
        "delete a file in current directory"
        if not self.curdir:
            return False
        name = random.choice(self.curdir.keys())
        full = os.path.join(os.getcwd(), name)
        self.curdir[name] = {}
        self.curdir = self.curdir[name]
        os.mkdir(name)
        self.compare("created", os.path.join(os.getcwd(), name))
        os.chdir(name)
        return True
 

src/p/y/pysys-HEAD/trunk/pysys-examples/internal/testcases/PySys_internal_025/Input/workingdir.py   pysys(Download)
# Print out the process environment
#
import os, os.path, sys, string
 
# entry point for running the script as an executable
if __name__ == "__main__":
	sys.stderr.write("Current working directory is %s\n" % string.replace(os.getcwd(), "\\", "/"))
	sys.stderr.flush()
 
	sys.stdout.write("Writing contents of working directory\n")
	for file in os.listdir(os.getcwd()):

src/d/i/diksel-HEAD/trunk/thirdparty/pyjamasdev/examples/infohierarchy/public/services/EchoService.py   diksel(Download)
    def index(self, dirname, recursive):
        """ return list of directory, including indicating whether each
            path is a directory or not
        """
        pth = os.path.join(os.getcwd(), "structure")
        pth = os.path.join(pth, dirname)
        res = get_directory_info(dirname, pth, recursive)
        return res
 
    def get_rightpanel_datanames(self, fname):
        pth = os.path.join(os.getcwd(), "data")
    def get_rightpanel_data(self, fname, name, index):
        pth = os.path.join(os.getcwd(), "data")
        pth = "%s/%s" % (pth, fname)
        f = open(pth)
        res = []
        fmt = f.readline()
        if fmt[:4] == 'html':
    def get_midpanel_data(self, fname):
        pth = os.path.join(os.getcwd(), "structure")
        pth = "%s/%s" % (pth, fname)
        f = open(pth)
        res = []
        for l in f.readlines():
            l = l.strip()

src/p/y/pysys-HEAD/pysys-examples/internal/testcases/PySys_internal_025/Input/workingdir.py   pysys(Download)
# Print out the process environment
#
import os, os.path, sys, string
 
# entry point for running the script as an executable
if __name__ == "__main__":
	sys.stderr.write("Current working directory is %s\n" % string.replace(os.getcwd(), "\\", "/"))
	sys.stderr.flush()
 
	sys.stdout.write("Writing contents of working directory\n")
	for file in os.listdir(os.getcwd()):

src/d/i/diksel-HEAD/thirdparty/pyjamasdev/examples/infohierarchy/public/services/EchoService.py   diksel(Download)
    def index(self, dirname, recursive):
        """ return list of directory, including indicating whether each
            path is a directory or not
        """
        pth = os.path.join(os.getcwd(), "structure")
        pth = os.path.join(pth, dirname)
        res = get_directory_info(dirname, pth, recursive)
        return res
 
    def get_rightpanel_datanames(self, fname):
        pth = os.path.join(os.getcwd(), "data")
    def get_rightpanel_data(self, fname, name, index):
        pth = os.path.join(os.getcwd(), "data")
        pth = "%s/%s" % (pth, fname)
        f = open(pth)
        res = []
        fmt = f.readline()
        if fmt[:4] == 'html':
    def get_midpanel_data(self, fname):
        pth = os.path.join(os.getcwd(), "structure")
        pth = "%s/%s" % (pth, fname)
        f = open(pth)
        res = []
        for l in f.readlines():
            l = l.strip()

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)
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)

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