Did I find the right examples for you? yes no

All Samples(65)  |  Call(8)  |  Derive(0)  |  Import(57)
path.py - An object representing a path to a file or directory.

Example:

from path import path
d = path('/home/guido/bin')
for f in d.files('*.py'):
    f.chmod(0755)

This module requires Python 2.2 or later.(more...)

src/d/i/digsby-HEAD/digsby/src/util/diagnostic.py   digsby(Download)
def save_diagnostic():
    d = Diagnostic()
    d.prepare_data()
    from util import path
    import stdpaths
    import cPickle
    pth = path(stdpaths.temp) / 'digsby_diagnostic'

src/p/y/pyrabj-HEAD/src/rabj/containers.py   pyrabj(Download)
    def __init__(self, url):
        self.url = url
        self.host_url = u.host_url(url)
        self.path = u.path(url)
 

src/r/o/rootpy-0.7.1/rootpy/tree/cut.py   rootpy(Download)
from .. import log; log = log[__name__]
from .. import QROOT
from ..util import path
 
 

src/r/o/rootpy-0.7.1/rootpy/io/file.py   rootpy(Download)
from .. import asrootpy, QROOT
from . import utils, DoesNotExist
from ..util import path
 
import tempfile

src/g/l/gloopy-0.1.3a/gloopy/view/shader.py   gloopy(Download)
from os.path import join
from ..util import path
 
from OpenGL import GL
from OpenGL.GL.shaders import compileShader, compileProgram

src/o/h/oh-mainline-HEAD/vendor/packages/sphinx/tests/test_intl.py   oh-mainline(Download)
from sphinx.util.pycompat import relpath
 
from util import test_roots, path, with_app, SkipTest
 
 
    # Compile all required catalogs into binary format (*.mo).
    for dirpath, dirs, files in os.walk(root):
        dirpath = path(dirpath)
        for f in [f for f in files if f.endswith('.po')]:
            po = dirpath / f

src/o/h/oh-mainline-HEAD/vendor/packages/sphinx/tests/test_build.py   oh-mainline(Download)
"""
 
from util import with_app, test_root, path, SkipTest
from textwrap import dedent
 
def test_nonascii_path(app):
    srcdir = path(app.srcdir)
    mb_name = u'\u65e5\u672c\u8a9e'
    try:
        (srcdir / mb_name).makedirs()

src/o/h/oh-mainline-HEAD/vendor/packages/sphinx/tests/test_env.py   oh-mainline(Download)
import sys
 
from util import TestApp, remove_unicode_literals, path
 
from sphinx.builders.html import StandaloneHTMLBuilder
def test_second_update():
    # delete, add and "edit" (change saved mtime) some files and update again
    env.all_docs['contents'] = 0
    root = path(app.srcdir)
    # important: using "autodoc" because it is the last one to be included in

src/s/p/Sphinx-1.2.2/tests/test_intl.py   Sphinx(Download)
from sphinx.util.pycompat import relpath
 
from util import test_roots, path, with_app, SkipTest
 
 
    # Compile all required catalogs into binary format (*.mo).
    for dirpath, dirs, files in os.walk(root):
        dirpath = path(dirpath)
        for f in [f for f in files if f.endswith('.po')]:
            po = dirpath / f

src/s/p/Sphinx-1.2.2/tests/test_build.py   Sphinx(Download)
"""
 
from util import with_app, test_root, path, SkipTest
from textwrap import dedent
 
def test_nonascii_path(app):
    srcdir = path(app.srcdir)
    mb_name = u'\u65e5\u672c\u8a9e'
    try:
        (srcdir / mb_name).makedirs()

  1 | 2 | 3 | 4 | 5 | 6  Next