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

All Samples(70)  |  Call(70)  |  Derive(0)  |  Import(0)
Generate a list of candidate temporary directories which
_get_default_tempdir will try.

        def _candidate_tempdir_list():
    """Generate a list of candidate temporary directories which
    _get_default_tempdir will try."""

    dirlist = []

    # First, try the environment.
    for envname in 'TMPDIR', 'TEMP', 'TMP':
        dirname = _os.getenv(envname)
        if dirname: dirlist.append(dirname)

    # Failing that, try OS-specific locations.
    if _os.name == 'riscos':
        dirname = _os.getenv('Wimp$ScrapDir')
        if dirname: dirlist.append(dirname)
    elif _os.name == 'nt':
        dirlist.extend([ r'c:\temp', r'c:\tmp', r'\temp', r'\tmp' ])
    else:
        dirlist.extend([ '/tmp', '/var/tmp', '/usr/tmp' ])

    # As a last resort, the current directory.
    try:
        dirlist.append(_os.getcwd())
    except (AttributeError, _os.error):
        dirlist.append(_os.curdir)

    return dirlist
        


src/u/n/unixpiger-HEAD/trunk/monitor/api/python/Lib/test/test_tempfile.py   unixpiger(Download)
    def test_nonempty_list(self):
        # _candidate_tempdir_list returns a nonempty list of strings
 
        cand = tempfile._candidate_tempdir_list()
 
        self.failIf(len(cand) == 0)
        for c in cand:
                    os.environ[envname] = os.path.abspath(envname)
                    added.append(envname)
 
            cand = tempfile._candidate_tempdir_list()
 
            for envname in 'TMPDIR', 'TEMP', 'TMP':
                dirname = os.getenv(envname)

src/u/n/unixpiger-HEAD/monitor/api/python/Lib/test/test_tempfile.py   unixpiger(Download)
    def test_nonempty_list(self):
        # _candidate_tempdir_list returns a nonempty list of strings
 
        cand = tempfile._candidate_tempdir_list()
 
        self.failIf(len(cand) == 0)
        for c in cand:
                    os.environ[envname] = os.path.abspath(envname)
                    added.append(envname)
 
            cand = tempfile._candidate_tempdir_list()
 
            for envname in 'TMPDIR', 'TEMP', 'TMP':
                dirname = os.getenv(envname)

src/b/d/bdk-c-HEAD/workspace/script/python/Lib/test/test_tempfile.py   bdk-c(Download)
    def test_nonempty_list(self):
        # _candidate_tempdir_list returns a nonempty list of strings
 
        cand = tempfile._candidate_tempdir_list()
 
        self.assertFalse(len(cand) == 0)
        for c in cand:
                if not dirname:
                    env[envname] = os.path.abspath(envname)
 
            cand = tempfile._candidate_tempdir_list()
 
            for envname in 'TMPDIR', 'TEMP', 'TMP':
                dirname = os.getenv(envname)

src/b/d/bdk-c-HEAD/trunk/workspace/script/python/Lib/test/test_tempfile.py   bdk-c(Download)
    def test_nonempty_list(self):
        # _candidate_tempdir_list returns a nonempty list of strings
 
        cand = tempfile._candidate_tempdir_list()
 
        self.assertFalse(len(cand) == 0)
        for c in cand:
                if not dirname:
                    env[envname] = os.path.abspath(envname)
 
            cand = tempfile._candidate_tempdir_list()
 
            for envname in 'TMPDIR', 'TEMP', 'TMP':
                dirname = os.getenv(envname)

src/s/p/spike-HEAD/vendor/stackless/v2.5.1/Lib/test/test_tempfile.py   spike(Download)
    def test_nonempty_list(self):
        # _candidate_tempdir_list returns a nonempty list of strings
 
        cand = tempfile._candidate_tempdir_list()
 
        self.failIf(len(cand) == 0)
        for c in cand:
                    os.environ[envname] = os.path.abspath(envname)
                    added.append(envname)
 
            cand = tempfile._candidate_tempdir_list()
 
            for envname in 'TMPDIR', 'TEMP', 'TMP':
                dirname = os.getenv(envname)

src/s/p/spike-HEAD/vendor/stackless/current/Lib/test/test_tempfile.py   spike(Download)
    def test_nonempty_list(self):
        # _candidate_tempdir_list returns a nonempty list of strings
 
        cand = tempfile._candidate_tempdir_list()
 
        self.failIf(len(cand) == 0)
        for c in cand:
                    os.environ[envname] = os.path.abspath(envname)
                    added.append(envname)
 
            cand = tempfile._candidate_tempdir_list()
 
            for envname in 'TMPDIR', 'TEMP', 'TMP':
                dirname = os.getenv(envname)

src/s/p/spike-HEAD/vendor/Python/v2.5.1/Lib/test/test_tempfile.py   spike(Download)
    def test_nonempty_list(self):
        # _candidate_tempdir_list returns a nonempty list of strings
 
        cand = tempfile._candidate_tempdir_list()
 
        self.failIf(len(cand) == 0)
        for c in cand:
                    os.environ[envname] = os.path.abspath(envname)
                    added.append(envname)
 
            cand = tempfile._candidate_tempdir_list()
 
            for envname in 'TMPDIR', 'TEMP', 'TMP':
                dirname = os.getenv(envname)

src/s/p/spike-HEAD/vendor/Python/current/Lib/test/test_tempfile.py   spike(Download)
    def test_nonempty_list(self):
        # _candidate_tempdir_list returns a nonempty list of strings
 
        cand = tempfile._candidate_tempdir_list()
 
        self.failIf(len(cand) == 0)
        for c in cand:
                    os.environ[envname] = os.path.abspath(envname)
                    added.append(envname)
 
            cand = tempfile._candidate_tempdir_list()
 
            for envname in 'TMPDIR', 'TEMP', 'TMP':
                dirname = os.getenv(envname)

src/p/y/pyvm-HEAD/projects/python_in_a_can/trunk/win32/python-2.7/Lib/test/test_tempfile.py   pyvm(Download)
    def test_nonempty_list(self):
        # _candidate_tempdir_list returns a nonempty list of strings
 
        cand = tempfile._candidate_tempdir_list()
 
        self.assertFalse(len(cand) == 0)
        for c in cand:
                if not dirname:
                    env[envname] = os.path.abspath(envname)
 
            cand = tempfile._candidate_tempdir_list()
 
            for envname in 'TMPDIR', 'TEMP', 'TMP':
                dirname = os.getenv(envname)

src/s/a/sage-HEAD/trunk/local/lib/python2.4/test/test_tempfile.py   sage(Download)
    def test_nonempty_list(self):
        # _candidate_tempdir_list returns a nonempty list of strings
 
        cand = tempfile._candidate_tempdir_list()
 
        self.failIf(len(cand) == 0)
        for c in cand:
                    os.environ[envname] = os.path.abspath(envname)
                    added.append(envname)
 
            cand = tempfile._candidate_tempdir_list()
 
            for envname in 'TMPDIR', 'TEMP', 'TMP':
                dirname = os.getenv(envname)

  1 | 2 | 3 | 4  Next