All Samples(1013) | Call(713) | Derive(0) | Import(300)
Return a true filesystem path for specified resource
src/e/v/evserver-HEAD/evserver/examples/django_chat/urls.py evserver(Download)
from django.conf.urls.defaults import * from pkg_resources import resource_filename import os.path import django.views.static import django.views.generic.simple module_dir = resource_filename(__name__, '.')
src/e/v/evserver-HEAD/evserver/examples/django_chat/settings.py evserver(Download)
ROOT_URLCONF = 'django_chat.urls'
from pkg_resources import resource_filename
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
resource_filename(__name__, '.'),
src/e/v/evserver-HEAD/evserver/examples/comet.py evserver(Download)
import mimetypes import random import uuid from pkg_resources import resource_filename import os, os.path, logging
def GET(self, filename='index.html'):
path = resource_filename(__name__, os.path.join('static',filename))
#path = os.path.join('static',filename)
if not os.access(path, os.R_OK):
web.notfound()
return
if filename=='index.html':
src/n/o/notmm-0.4.1/examples/local_settings.py notmm(Download)
from pkg_resources import resource_filename
from helloworld.config.settings import *
MEDIA_ROOT = resource_filename('helloworld', 'static')
DEBUG = True
USE_I18N = True
# For backward-compatibility with Django
TEMPLATE_DIRS = (
(resource_filename('helloworld', 'templates')),
)
#DATABASE_ENGINE = 'sqlite3'
src/t/r/TracShellExampleMacro-1.0/shellexample/macro.py TracShellExampleMacro(Download)
from trac.web.chrome import ITemplateProvider, add_stylesheet
from genshi.core import Markup, escape
from genshi.builder import tag
from pkg_resources import resource_filename
class ShellExampleMacro(WikiMacroBase):
"""Preprocessor Highlight ShellExample"""
def get_htdocs_dirs(self):
yield 'shellexample', resource_filename(__name__, 'htdocs')
def get_templates_dirs(self):
return ()src/c/o/commentator-0.1/commentator/example.py commentator(Download)
import os from middleware import Commentator from paste.httpexceptions import HTTPExceptionHandler from paste.urlparser import StaticURLParser from pkg_resources import resource_filename
src/y/o/yould-0.3.7/yould/prob.py yould(Download)
from cPickle import load, dump from pprint import pformat, pprint from pkg_resources import resource_filename, resource_exists, resource_listdir from random import random from collections import deque from threading import Timer
def find_trainset(name):
if os.path.isfile(name):
return load_trainset(name)
elif resource_exists(trainsets.__name__, name):
return load_trainset(resource_filename(trainsets.__name__, name))
elif resource_exists(trainsets.__name__, name+".yould"):
return load_trainset(resource_filename(trainsets.__name__, name+".yould"))
src/v/u/vudo.skinsetup-0.1/src/vudo/skinsetup/__init__.py vudo.skinsetup(Download)
from optparse import OptionParser
from pkg_resources import iter_entry_points
from pkg_resources import resource_filename
from pkg_resources import DistributionNotFound
def provide_skin(package, name, skin_path="skin"):
"""create skin information and return it"""
skin = dict(
name=name,
package=package,
skin_path=resource_filename(package, skin_path))
src/r/i/rip-0.1.1/rip/settings.py rip(Download)
__revision__ = "$Revision: 37 $" from pkg_resources import Requirement, resource_filename package_name = 'rip' package_resource = Requirement.parse(package_name) create_template = resource_filename(package_resource, 'rip/templates/create') gen_template = resource_filename(package_resource, 'rip/templates/gen') plugin_template = resource_filename(package_resource, 'rip/templates/plugin')
src/f/m/fmspy-0.1.0/twisted/plugins/fmspy_plugin.py fmspy(Download)
examples_path = 'examples/'
try:
from pkg_resources import Requirement, resource_filename, DistributionNotFound
try:
examples_path = resource_filename(Requirement.parse("fmspy"), "share/examples")
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next