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

All Samples(301)  |  Call(175)  |  Derive(0)  |  Import(126)
Return specified resource as a string

src/p/y/pydataportability.examples-0.1dev-r42/pydataportability/examples/scripts/twitter2.py   pydataportability.examples(Download)
from zope.component import getUtility
 
from pkg_resources import resource_string
 
import pydataportability.microformats.hcard
import pydataportability.microformats.xfn
 
from pydataportability.microformats.base.htmlparsers.etree import ElementTreeHTMLParser
from pydataportability.microformats.base.interfaces import IHTMLParser
 
def main():
    # egg style retrieval of the file "mrtopf.html"
    data = resource_string(__name__, 'mrtopf.html')

src/p/y/pydataportability.examples-0.1dev-r42/pydataportability/examples/scripts/twitter.py   pydataportability.examples(Download)
from zope.component import getUtility
 
from pkg_resources import resource_string
 
import pydataportability.microformats.hcard
import pydataportability.microformats.xfn
 
from pydataportability.microformats.base.htmlparsers.etree import ElementTreeHTMLParser
from pydataportability.microformats.base.interfaces import IHTMLParser
 
def main():
    # egg style retrieval of the file "mrtopf_tidy.html"
    data = resource_string(__name__, 'mrtopf_tidy.html')

src/r/e/repoze.bfg-1.3a15/repoze/bfg/resource.py   repoze.bfg(Download)
    def get_string(self, resource_name):
        for package, rname in self.search_path(resource_name):
            if pkg_resources.resource_exists(package, rname):
                return pkg_resources.resource_string(package, rname)
 
    def has_resource(self, resource_name):
        for package, rname in self.search_path(resource_name):

src/d/i/distribute-0.6.14/setuptools/command/easy_install.py   distribute(Download)
from setuptools.package_index import PackageIndex
from setuptools.package_index import URL_SCHEME
from setuptools.command import bdist_egg, egg_info
from pkg_resources import yield_lines, normalize_path, resource_string, \
        ensure_directory, get_distribution, find_distributions, \
        Environment, Requirement, Distribution, \
        PathMetadata, EggMetadata, WorkingSet, \
            return  # already did it, or don't need to
 
        sitepy = os.path.join(self.install_dir, "site.py")
        source = resource_string(Requirement.parse("distribute"), "site.py")
        current = ""
 
        if os.path.exists(sitepy):
                    hdr = header
                yield (name+ext, hdr+script_text, 't', [name+x for x in old])
                yield (
                    name+'.exe', resource_string('setuptools', launcher),
                    'b' # write in binary mode
                )
            else:

src/e/p/epywing-HEAD/src/epywing/bookfilter.py   epywing(Download)
from functools import wraps
from utils.plugin import PluginMount
#from glob import glob
from pkg_resources import resource_listdir, resource_filename, resource_isdir, resource_string
import os
import imp
from functools import partial
        # filter collection, thanks to BookFilter's PluginMount metaclass.
        module_name = os.path.splitext(os.path.basename(file_))[0]
        file_path = u'{0}/{1}'.format(directory, file_)
        file_string = resource_string(__name__, file_path)
 
        code = compile(file_string, module_name, 'exec')
        namespace = {}

src/p/y/pyobjc-core-2.3/Lib/objc/_bridgesupport.py   pyobjc-core(Download)
 
        else:
            if exists:
                data = pkg_resources.resource_string(frameworkResourceName,
                    "PyObjC.bridgesupport")
                if data:
                    _parseBridgeSupport(data, globals, frameworkName, inlineTab=inlineTab)
 
        else:
            if exists:
                data = pkg_resources.resource_string(frameworkResourceName,
                    "PyObjCOverrides.bridgesupport")
                if data:
                    _parseBridgeSupport(data, globals, frameworkName, inlineTab=inlineTab)
 
            else:
                if exists:
                    data = pkg_resources.resource_string(frameworkResourceName,
                        "PyObjCOverrides.bridgesupport")
                    if data:
                        _parseBridgeSupport(data, globals, frameworkName, inlineTab=inlineTab)
            return bundle
 
    # And if that fails look for the metadata in the framework wrapper
    if pkg_resources.resource_exists(
            frameworkName, "PyObjC.bridgesupport"):
        data = pkg_resources.resource_string(frameworkResourceName,

src/n/o/Nodes-1.2/setup.py   Nodes(Download)
import ez_setup
ez_setup.use_setuptools()
from setuptools import setup
from pkg_resources import resource_filename, resource_string, resource_listdir
import glob, os, sys
setup(
	name='Nodes',
	version='1.2',
	author='Alexander Sedov aka Electronic from Lomy.RU',
	author_email='Elec.Lomy.RU@gmail.com',
	description='Neuralnets-based Artificial Intelligence implementation',
	long_description=resource_string(__name__, 'desc.txt'),

src/u/l/uliweb-HEAD/uliweb/lib/migrate/versioning/repository.py   uliweb(Download)
from pkg_resources import resource_string,resource_filename
import os,shutil
import string
from migrate.versioning.base import *
from migrate.versioning.template import template
from migrate.versioning import exceptions,script,version,pathed,cfgparse
 
            if (key not in opts) or (opts[key] is None):
                opts[key]=val
 
        tmpl = resource_string(pkg,rsrc)
        ret = string.Template(tmpl).substitute(opts)
        return ret
 
def manage(file,**opts):
    """Create a project management script"""
    pkg,rsrc = template.manage(as_pkg=True)
    tmpl = resource_string(pkg,rsrc)
    vars = ",".join(["%s='%s'"%vars for vars in opts.iteritems()])
    result = tmpl%dict(defaults=vars)
 

src/u/l/Uliweb-0.0.1a2/uliweb/lib/migrate/versioning/repository.py   Uliweb(Download)
from pkg_resources import resource_string,resource_filename
import os,shutil
import string
from migrate.versioning.base import *
from migrate.versioning.template import template
from migrate.versioning import exceptions,script,version,pathed,cfgparse
 
            if (key not in opts) or (opts[key] is None):
                opts[key]=val
 
        tmpl = resource_string(pkg,rsrc)
        ret = string.Template(tmpl).substitute(opts)
        return ret
 
def manage(file,**opts):
    """Create a project management script"""
    pkg,rsrc = template.manage(as_pkg=True)
    tmpl = resource_string(pkg,rsrc)
    vars = ",".join(["%s='%s'"%vars for vars in opts.iteritems()])
    result = tmpl%dict(defaults=vars)
 

src/p/a/PasteOb-0.7/pasteob/fileapp.py   PasteOb(Download)
import os, mimetypes, zipfile, tarfile
from datetime import datetime
from pkg_resources import resource_string, resource_exists, resource_isdir
from pasteob import *
 
__all__ = [
    'DataApp', 'FileApp', 'DirectoryApp',
        except KeyError:
            path = self.prefix + path_info
            if resource_exists(self.module, path) and not resource_isdir(self.module, path):
                data = resource_string(self.module, path)
                content_type, content_encoding = mimetypes.guess_type(path_info)
                app = DataApp(data,
                    content_type=content_type,

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next