Did I find the right examples for you? yes no

All Samples(34)  |  Call(29)  |  Derive(0)  |  Import(5)
Provide the canonical form of the path suitable for storing in
the database.

        def normpath(path):
    """Provide the canonical form of the path suitable for storing in
    the database.
    """
    path = syspath(path)
    path = os.path.normpath(os.path.abspath(os.path.expanduser(path)))
    return bytestring_path(path)
        


src/h/u/humblebee-1.101/humblebee/virtualfs.py   humblebee(Download)
from .dbguy import TVDatabase
from .texceptions import NoSuchDatabaseError
from .util import replace_bad_chars, scene_style, zero_prefix_int, normpath, ensure_utf8
from .util import safe_make_dirs
 
def _full_path(root, path):
    return normpath(os.path.join(root, path))
 
def safe_symlink(target, linkn):
    try:
        epname = ep_filename(ep)
        seriesdir = normpath(
            os.path.join(ensure_utf8(destdir), sername)
            )
        seasondir = normpath(
            os.path.join(ensure_utf8(seriesdir), seasname)
            )
        epfile = normpath(
            os.path.join(ensure_utf8(seasondir), epname)

src/h/u/humblebee-1.101/humblebee/renaming.py   humblebee(Download)
import os, logging, shutil
 
from .util import zero_prefix_int as padnum
from .util import replace_bad_chars
from .util import normpath
            )
        if root:
            fp = normpath(os.path.join(root, fp))            
        return fp
 
    def __init__(self, rootdir, destdir, naming_scheme='friendly'):
        self.db = TVDatabase(rootdir)
        self.destdir = normpath(destdir)
        self.naming_scheme = naming_schemes[naming_scheme]()
        safe_make_dirs(self.destdir)
        pj = os.path.join
        unknown = normpath(
            pj(self.destdir, '_unknown')
            )
        safe_make_dirs(unknown)
        destfile = normpath(
            pj(unknown, os.path.split(fn)[1])

src/m/e/mercurial-2.9.1/mercurial/subrepo.py   Mercurial(Download)
    u = util.url(expandedpath)
    if not u.scheme:
        path = util.normpath(os.path.abspath(u.path))
    return path
 

src/h/g/hg-HEAD/mercurial/subrepo.py   hg(Download)
    u = util.url(expandedpath)
    if not u.scheme:
        path = util.normpath(os.path.abspath(u.path))
    return path
 

src/m/e/mercurial-2.9.1/mercurial/archival.py   Mercurial(Download)
 
    if prefix:
        prefix = util.normpath(prefix)
    else:
        if not isinstance(dest, str):

src/m/e/mercurial-2.9.1/mercurial/commands.py   Mercurial(Download)
    f = lambda fn: fn
    if ui.configbool('ui', 'slash') and os.sep != '/':
        f = lambda fn: util.normpath(fn)
    fmt = 'f  %%-%ds  %%-%ds  %%s' % (
        max([len(abs) for abs in items]),

src/h/g/hg-HEAD/mercurial/archival.py   hg(Download)
 
    if prefix:
        prefix = util.normpath(prefix)
    else:
        if not isinstance(dest, str):

src/h/g/hg-HEAD/mercurial/commands.py   hg(Download)
    f = lambda fn: fn
    if ui.configbool('ui', 'slash') and os.sep != '/':
        f = lambda fn: util.normpath(fn)
    fmt = 'f  %%-%ds  %%-%ds  %%s' % (
        max([len(abs) for abs in items]),

src/m/e/mercurial-2.9.1/mercurial/match.py   Mercurial(Download)
            name = pathutil.canonpath(root, cwd, name, auditor)
        elif kind in ('relglob', 'path'):
            name = util.normpath(name)
        elif kind in ('listfile', 'listfile0'):
            try:

src/h/u/humblebee-1.101/humblebee/dbguy.py   humblebee(Download)
 
from . import tvregexes, util
from .util import normpath, split_root_dir, ensure_utf8, ancestry, posixpath
from . import appconfig as cfg
from .texceptions import InitExistingDatabaseError, IncompleteEpisodeError, InvalidArgumentError
                )
        self['file_path'] = path        
        self.root_dir = normpath(root_dir)
        self.dvdrip = False
 
        if form == 'abs':
            root, path = split_root_dir(self['file_path'], self.root_dir)
            return normpath(os.path.join(root, path))
        elif form == 'rel':       
            return split_root_dir(self['file_path'], self.root_dir)[1]
    def __init__(self, directory):
        self.directory = normpath(util.ensure_utf8(directory))
        dbfile = os.path.join(
            directory,
            cfg.get('database', 'local-database-filename')

  1 | 2  Next