All Samples(242) | Call(155) | Derive(0) | Import(87)
Return a readable file-like object for specified resource
src/p/y/pydataportability.examples-0.1dev-r42/pydataportability/examples/scripts/xrds.py pydataportability.examples(Download)
from pydataportability.xrds.parser import XRDSParser
from pkg_resources import resource_stream
def main():
# egg style retrieval of the file "xrds.xml"
fp = resource_stream(__name__, 'xrds.xml')
p = XRDSParser(fp)
src/u/l/uliweb-HEAD/uliweb/lib/werkzeug/utils.py uliweb(Download)
def get_package_loader(self, package, package_path):
from pkg_resources import resource_exists, resource_stream
def loader(path):
path = posixpath.join(package_path, path)
if resource_exists(package, path):
return posixpath.basename(path), \
lambda: resource_stream(package, path)
src/s/u/sutekh-HEAD/releases/unstable-branches/0.7.x/sutekh/gui/MultiPaneWindow.py sutekh(Download)
import gtk # pylint: disable-msg=E0611 # pylint doesn't see resource_stream here, for some reason from pkg_resources import resource_stream, resource_exists from itertools import chain # pylint: enable-msg=E0611 from sutekh.core.SutekhObjectCache import SutekhObjectCache
def _link_resource(self, sLocalUrl):
"""Return a file-like object which sLocalUrl can be read from."""
sResource = '/docs/html/%s' % sLocalUrl
if resource_exists('sutekh', sResource):
return resource_stream('sutekh', sResource)
else:
raise ValueError("Unknown resource %s" % sLocalUrl)
src/s/u/sutekh-HEAD/releases/stable-tags/0.6.4/sutekh/gui/MultiPaneWindow.py sutekh(Download)
import gtk # pylint: disable-msg=E0611 # pylint doesn't see resource_stream here, for some reason from pkg_resources import resource_stream, resource_exists # pylint: enable-msg=E0611 from sqlobject import SQLObjectNotFound from sutekh.core.SutekhObjectCache import SutekhObjectCache
def _link_resource(self, sLocalUrl):
"""Return a file-like object which sLocalUrl can be read from."""
sResource = '/docs/html/%s' % sLocalUrl
if resource_exists('sutekh', sResource):
return resource_stream('sutekh', sResource)
else:
raise ValueError("Unknown resource %s" % sLocalUrl)
src/s/u/sutekh-HEAD/releases/stable-tags/0.6.3/sutekh/gui/MultiPaneWindow.py sutekh(Download)
import gtk # pylint: disable-msg=E0611 # pylint doesn't see resource_stream here, for some reason from pkg_resources import resource_stream, resource_exists # pylint: enable-msg=E0611 from sqlobject import SQLObjectNotFound from sutekh.core.SutekhObjectCache import SutekhObjectCache
def _link_resource(self, sLocalUrl):
"""Return a file-like object which sLocalUrl can be read from."""
sResource = '/docs/html/%s' % sLocalUrl
if resource_exists('sutekh', sResource):
return resource_stream('sutekh', sResource)
else:
raise ValueError("Unknown resource %s" % sLocalUrl)
src/s/u/sutekh-HEAD/releases/stable-tags/0.6.2/sutekh/gui/MultiPaneWindow.py sutekh(Download)
import gtk # pylint: disable-msg=E0611 # pylint doesn't see resource_stream here, for some reason from pkg_resources import resource_stream, resource_exists # pylint: enable-msg=E0611 from sqlobject import SQLObjectNotFound from sutekh.core.SutekhObjectCache import SutekhObjectCache
def _link_resource(self, sLocalUrl):
"""Return a file-like object which sLocalUrl can be read from."""
sResource = '/docs/html/%s' % sLocalUrl
if resource_exists('sutekh', sResource):
return resource_stream('sutekh', sResource)
else:
raise ValueError("Unknown resource %s" % sLocalUrl)
src/s/u/sutekh-HEAD/releases/stable-tags/0.6.1/sutekh/gui/MultiPaneWindow.py sutekh(Download)
import gtk # pylint: disable-msg=E0611 # pylint doesn't see resource_stream here, for some reason from pkg_resources import resource_stream, resource_exists # pylint: enable-msg=E0611 from sqlobject import SQLObjectNotFound from sutekh.core.SutekhObjectCache import SutekhObjectCache
def _link_resource(self, sLocalUrl):
"""Return a file-like object which sLocalUrl can be read from."""
sResource = '/docs/html/%s' % sLocalUrl
if resource_exists('sutekh', sResource):
return resource_stream('sutekh', sResource)
else:
raise ValueError("Unknown resource %s" % sLocalUrl)
src/s/u/sutekh-HEAD/releases/stable-tags/0.6.0rc2/sutekh/gui/MultiPaneWindow.py sutekh(Download)
import gtk # pylint: disable-msg=E0611 # pylint doesn't see resource_stream here, for some reason from pkg_resources import resource_stream, resource_exists # pylint: enable-msg=E0611 from sqlobject import SQLObjectNotFound from sutekh.core.SutekhObjectCache import SutekhObjectCache
def _link_resource(self, sLocalUrl):
"""Return a file-like object which sLocalUrl can be read from."""
sResource = '/docs/html/%s' % sLocalUrl
if resource_exists('sutekh', sResource):
return resource_stream('sutekh', sResource)
else:
raise ValueError("Unknown resource %s" % sLocalUrl)
src/s/u/sutekh-HEAD/releases/stable-tags/0.6.0rc1/sutekh/gui/MultiPaneWindow.py sutekh(Download)
import gtk # pylint: disable-msg=E0611 # pylint doesn't see resource_stream here, for some reason from pkg_resources import resource_stream, resource_exists # pylint: enable-msg=E0611 from sqlobject import SQLObjectNotFound from sutekh.core.SutekhObjectCache import SutekhObjectCache
def _link_resource(self, sLocalUrl):
"""Return a file-like object which sLocalUrl can be read from."""
sResource = '/docs/html/%s' % sLocalUrl
if resource_exists('sutekh', sResource):
return resource_stream('sutekh', sResource)
else:
raise ValueError("Unknown resource %s" % sLocalUrl)
src/s/u/sutekh-HEAD/releases/stable-tags/0.6.0/sutekh/gui/MultiPaneWindow.py sutekh(Download)
import gtk # pylint: disable-msg=E0611 # pylint doesn't see resource_stream here, for some reason from pkg_resources import resource_stream, resource_exists # pylint: enable-msg=E0611 from sqlobject import SQLObjectNotFound from sutekh.core.SutekhObjectCache import SutekhObjectCache
def _link_resource(self, sLocalUrl):
"""Return a file-like object which sLocalUrl can be read from."""
sResource = '/docs/html/%s' % sLocalUrl
if resource_exists('sutekh', sResource):
return resource_stream('sutekh', sResource)
else:
raise ValueError("Unknown resource %s" % sLocalUrl)
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next