• 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/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/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,

src/s/u/sutekh-HEAD/releases/unstable-tags/0.5.0/sutekh/gui/plugins/CardSetExportHTML.py   sutekh(Download)
from sutekh.gui.PluginManager import CardListPlugin
from sutekh.gui.SutekhDialog import SutekhDialog
from sutekh.io.WriteArdbXML import WriteArdbXML
from pkg_resources import resource_string
 
try:
    import libxml2
 
        # Check we can find the deck2html.xsl file
        try:
            sDeckXSL = resource_string(__name__,"deck2html.xsl")
            styledoc = libxml2.parseDoc(sDeckXSL)
            self._style = libxslt.parseStylesheetDoc(styledoc)
        except libxml2.parserError:
            print "Unable to load deck2html.xsl style sheet."
            return None
 
        # Check if we can enable the "Include Card Text" Option
        try:
            sDeckXSL = resource_string(__name__,"deck2html_with_text.xsl")

src/s/u/sutekh-HEAD/releases/unstable-branches/0.5.x/sutekh/gui/plugins/CardSetExportHTML.py   sutekh(Download)
from sutekh.gui.PluginManager import CardListPlugin
from sutekh.gui.SutekhDialog import SutekhDialog
from sutekh.io.WriteArdbXML import WriteArdbXML
from pkg_resources import resource_string
 
try:
    import libxml2
 
        # Check we can find the deck2html.xsl file
        try:
            sDeckXSL = resource_string(__name__,"deck2html.xsl")
            styledoc = libxml2.parseDoc(sDeckXSL)
            self._style = libxslt.parseStylesheetDoc(styledoc)
        except libxml2.parserError:
            print "Unable to load deck2html.xsl style sheet."
            return None
 
        # Check if we can enable the "Include Card Text" Option
        try:
            sDeckXSL = resource_string(__name__,"deck2html_with_text.xsl")

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