All Samples(119) | Call(71) | Derive(0) | Import(48)
List the contents of the named resource directory
src/p/y/pythia-0.8.1.11/pyre/inventory/odb/Curator.py pythia(Download)
systemDepository = self.setSystemDepository(system)
# create the built-in depositories
from pkg_resources import resource_listdir, resource_isdir, resource_exists, resource_filename, Requirement
pythia = Requirement.parse("pythia")
entries = resource_listdir(pythia, "")
for entry in entries:
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
def load_filter_plugins(directory='filters'):
'''Imports all source files in `directory`, which should contain
filter plugin subclasses of BookFilter.
'''
files = [f for f in resource_listdir(__name__, directory) if not resource_isdir(__name__, f) and f[-3:] == '.py']
for file_ in files:
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 list_trainsets():
# FIXME: won't work with a zipped egg
return [f for f, e in
filter(lambda t:t[1] == ".yould",
map(os.path.splitext,
resource_listdir(data.__name__, "trainsets")))]
src/v/o/vogeler-client-HEAD/vogelerclient/command/__init__.py vogeler-client(Download)
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. """ import logging,optparse,os,sys,glob,ConfigParser,socket,platform from pkg_resources import Requirement, resource_filename, resource_string, resource_stream, resource_listdir import locale try: locale.setlocale(locale.LC_ALL,'fr_FR')
def get_module_conf_files():
list_files = resource_listdir(MODULENAME,'data')
# The name of the configuration file HAS to be the name of the module (here, server)
for fil in list_files:
if fil.endswith('.conf'):
yield fil
src/v/o/vogeler-server-HEAD/vogelerserver/command/__init__.py vogeler-server(Download)
# -*- coding: utf-8 -*- import logging,optparse,os,sys,glob,ConfigParser from pkg_resources import Requirement, resource_filename, resource_string, resource_stream, resource_listdir import locale try: locale.setlocale(locale.LC_ALL,'fr_FR') except: pass
def get_module_conf_files():
list_files = resource_listdir(MODULENAME,'data')
# The name of the configuration file HAS to be the name of the module (here, server)
for fil in list_files:
if fil.endswith('.conf'):
yield fil
src/v/o/vogeler-runner-HEAD/vogelerunner/command/__init__.py vogeler-runner(Download)
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. """ import logging,optparse,os,sys,glob,ConfigParser from pkg_resources import Requirement, resource_filename, resource_string, resource_stream, resource_listdir import locale try: locale.setlocale(locale.LC_ALL,'fr_FR')
def get_module_conf_files():
list_files = resource_listdir(MODULENAME,'data')
# The name of the configuration file HAS to be the name of the module (here, server)
for fil in list_files:
if fil.endswith('.conf'):
yield fil
src/a/l/alacarte-HEAD/alacarte/resolver.py alacarte(Download)
# encoding: utf-8 import os from pkg_resources import resource_listdir, resource_filename from alacarte.util import Cache
path = path.split('/')
possibilities = [i for i in resource_listdir('.'.join(parts), '/'.join(path[:-1])) if i.startswith(path[-1] + '.')]
if len(possibilities) == 1:
path[-1] = possibilities[0]
src/g/r/GromacsWrapper-HEAD/gromacs/config.py GromacsWrapper(Download)
""" import os from pkg_resources import resource_filename, resource_listdir import utilities
:data:`config.templates`.
"""
return dict((resource_basename(fn), resource_filename(__name__, dirname+'/'+fn))
for fn in resource_listdir(__name__, dirname)
if not fn.endswith('~'))
def resource_basename(resource):
src/t/e/TemplateInterface-0.5.4/cti/resolver.py TemplateInterface(Download)
# encoding: utf-8 import os from pkg_resources import resource_listdir, resource_filename from cti.util import Cache
path = path.split('/')
possibilities = [i for i in resource_listdir('.'.join(parts), '/'.join(path[:-1])) if i.startswith(path[-1] + '.')]
if len(possibilities) == 1:
path[-1] = possibilities[0]
src/a/l/alacarte-0.6.2/alacarte/resolver.py alacarte(Download)
# encoding: utf-8 import os from pkg_resources import resource_listdir, resource_filename from alacarte.util import Cache
path = path.split('/')
possibilities = [i for i in resource_listdir('.'.join(parts), '/'.join(path[:-1])) if i.startswith(path[-1] + '.')]
if len(possibilities) == 1:
path[-1] = possibilities[0]
1 | 2 | 3 | 4 | 5 Next