Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(49) | Call(39) | Derive(0) | Import(10)
def uniform_path(path): return os.path.abspath(os.path.normcase(os.path.normpath(path)).replace('\\', '/'))
from sitetool import help from bn import uniform_path log = logging.getLogger(__name__)
def path_from_config(filename, path): abs = uniform_path(path) if abs != path: # Relative path return os.path.abspath(os.path.normpath(os.path.join(os.path.split(filename)[0], path)))
raise getopt.GetoptError('Unexpected argument %r'%args[2]) # Note, the Python API has page as the first argument, not template page = uniform_path(args[1]) template = uniform_path(args[0]) from sitetool.api import create
elif len(args) > 1: raise getopt.GetoptError('Unexpected argument %r'%args[1]) page_or_template = uniform_path(args[0]) from sitetool.api import list_areas try:
src/d/r/DreamweaverTemplate-0.2.2/dreamweavertemplate/__init__.py DreamweaverTemplate(Download)
import re from bn import relpath, uniform_path log = logging.getLogger(__name__)
def update_links(site_root, old_path, new_path, content): site_root = uniform_path(site_root) add_new_path_slash = False if new_path.endswith('/'): add_new_path_slash = True old_path = uniform_path(old_path) new_path = uniform_path(new_path)
def get_new_link(old_path, old_link, new_path): # Calculate the absolute path of each link from the link and the # old_path link_path = uniform_path( posixpath.join(posixpath.dirname(old_path), old_link)
src/a/r/Archiver-0.2.2/archiver/api.py Archiver(Download)
import uuid from bn import relpath, uniform_path, AttributeDict from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey,\ DateTime, Enum, select, and_, create_engine, not_
def merge(dst, stores, skip_files=False): file_counts = [] if uniform_path(dst) in [uniform_path(store) for store in stores]: raise Exception('You can\'t merge %r into itself'%dst) log.info(
src/d/r/DreamweaverTemplate-0.2.2/dreamweavertemplate/service.py DreamweaverTemplate(Download)
import os from bn import AttributeDict, uniform_path from dreamweavertemplate import DWT from pipestack.pipe import Marble, MarblePipe
if not template.startswith('/'): template = uniform_path( os.path.join( self.bag.app.config[self.name].directory, template,
raise Exception('No such template %r'%template_path) new_path=uniform_path( os.path.join( self.bag.app.config[self.name].directory, '../',
new_path=new_path, template_path=uniform_path( os.path.join(self.bag.app.config[self.name].directory, '../', template_path) ), )
src/c/o/ConfigConvert-0.2.2/configconvert/__init__.py ConfigConvert(Download)
from configconvert.internal import eval_import, simple_import, import_module from bn import uniform_path as up, AttributeDict from nestedrecord import decodeNestedRecord, encode_error from conversionkit import Conversion
else: if uniform_path: conversion.result = up(directory) else: conversion.result = directory
else: if uniform_path: conversion.result = up(directory) else: conversion.result = directory
else: if uniform_path: conversion.result = up(filename) else: conversion.result = filename
else: if uniform_path: conversion.result = up(filename) else: conversion.result = filename
src/s/t/StaticDispatch-0.2.1/staticdispatch/__init__.py StaticDispatch(Download)
import os import logging import mimetypes from bn import AttributeDict, uniform_path
log.warning('PATH_INFO %r doesn\'t start with a \'/\' character') path_info = '/'+path_info resource = uniform_path(os.path.join(bag.app.config[name].site_root, path_info[1:])) path = u'' script = u''
log.info('Adding path %r and script %r to resolve cache. Using %r as the resource', path, script, resource) url_cache[resource] = path, script bag[name]['app'] = uniform_path(os.path.join(bag.app.config[name].site_root, script)) break elif counter == 0:
src/p/i/PipeStack-0.5.3/pipestack/app.py PipeStack(Download)
import warnings from bn import AttributeDict, uniform_path, OrderedDict from commandtool import handle_command, Cmd, LoggingCmd from configconvert import parse_and_split_options_change_dir, parse_config_string, split_options
src/c/o/ConfigConvert-0.2.2/configconvert/service.py ConfigConvert(Download)
import warnings from bn import absimport, AttributeDict, uniform_path from configconvert import existingDirectory, existingFile, parse_config,\ handle_option_error, handle_section_error, split_options
src/a/p/AppDispatch-0.3.4/appdispatch/__init__.py AppDispatch(Download)
import os import sys import logging from bn import AttributeDict, absimport, uniform_path
src/g/a/Gallery-0.1.0/gallery/__init__.py Gallery(Download)
import math from bn import uniform_path from bn import relpath from commandtool import parse_html_config