本文整理汇总了Python中useless.base.util.ujoin函数的典型用法代码示例。如果您正苦于以下问题:Python ujoin函数的具体用法?Python ujoin怎么用?Python ujoin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ujoin函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __set_suite_cursors__
def __set_suite_cursors__(self, suite):
self.traits = StatementCursor(self.conn, 'traits')
self.traits.set_table(ujoin(suite, 'traits'))
self.traitparent = TraitParent(self.conn, suite)
self.traitpackage = TraitPackage(self.conn, suite)
self.traittemplate = TraitTemplate(self.conn, suite)
self.family = Family(self.conn)
示例2: create_entry
def create_entry(self, *args):
var = dict(self.editor.dialogs['create'].items())
debug('var is %s' % var)
self.environ[self.trait][var['name']] = var['value']
tagname = ujoin(self.trait, var['name'])
self.editor.make_tag(tagname)
self.editor.destroy_dialog(self.editor.dialogs['create'])
示例3: insert_item
def insert_item(self, order, fields, value):
fieldkeys = self['___field_keys___']
orders = self['___orders___']
for k,v in zip(orders[order], fields):
fieldkeys[k].add(v)
fullkey = ujoin(*fields)
self[fullkey] = value
self['___field_keys___'] = fieldkeys
示例4: __init__
def __init__(self, suite, traits_table):
tablename = ujoin(suite, 'scripts')
script_column = PkName('script')
script_column.set_fk('scriptnames')
sfile_column = Num('scriptfile')
sfile_column.set_fk('textfiles')
script_columns = [script_column, sfile_column]
_TraitRelation.__init__(self, traits_table, tablename, script_columns)
示例5: __init__
def __init__(self, conn, suite, name='TraitsWindow'):
self.cmd = StatementCursor(conn, name=name)
self.cmd.set_table(ujoin(suite, 'traits'))
rows = self.cmd.select()
packer = lambda x : rowpacker('trait', x)
DragListWindow.__init__(self, '%s traits' % suite, packer, rows,
TARGETS.get('trait', suite), name=name)
self.set_size_request(400, 300)
示例6: _trait_select_dialog
def _trait_select_dialog(self, name):
dialog = dialogs.CList(name, name=name)
self.main.set_table(ujoin(self.browser.suite, 'traits'))
traits = self.main.select(fields=['trait'])
dialog.set_rows(traits)
dialog.set_ok(self.select_trait)
dialog.set_cancel(self.destroy_dialog)
self.dialogs[name] = dialog
示例7: __init__
def __init__(self, conn, suite):
table = ujoin(suite, 'templates')
TraitRelation.__init__(self, conn, suite, table, name='TraitTemplate')
self.traitparent = TraitParent(conn, suite)
self.template = Template()
self.template_path = None
self.textfiles = TextFileManager(self.conn)
self._jtable = '%s as s join textfiles as t ' % table
self._jtable += 'on s.templatefile = t.fileid'
示例8: __init__
def __init__(self, suite, traits_table, packages_table):
packs_column = PkBigname('package')
if not os.environ.has_key('PAELLA_DB_NOPACKAGETABLES'):
packs_column.set_fk(packages_table)
action_column = PkName('action')
action_column.constraint.default = 'install'
columns = [packs_column, action_column]
tablename = ujoin(suite, 'trait', 'package')
_TraitRelation.__init__(self, traits_table, tablename, columns)
示例9: insert_suite_packages
def insert_suite_packages(cursor, repos, quick=False):
prow = package_to_row
if quick:
prow = package_to_row_quick
suite = repos.source.suite
if isnonus(suite):
suite = suite.split('/')[0]
table = ujoin(suite, 'packages')
for section in repos.source.sections:
for package in repos.full_parse(section).values():
cursor.insert(table, prow(package))
示例10: __init__
def __init__(self, conn, suite):
Element.__init__(self, 'traits')
self.conn = conn
self.suite = suite
self.setAttribute('suite', self.suite)
self._traits_ = StatementCursor(self.conn, 'Traits')
self._traits_.set_table(ujoin(self.suite, 'traits'))
self.traitnames = [row.trait for row in self._traits_.select(order='trait')]
for t in self.traitnames:
t_element = Element('trait')
t_element.setAttribute('name', t)
self.appendChild(t_element)
示例11: insert_more_packages
def insert_more_packages(cursor, repos, suite=None, quick=False):
prow = package_to_row
if quick:
prow = package_to_row_quick
repos.source.set_path()
repos.parse_release()
table = ujoin(suite, 'packages')
for package in repos.full_parse().values():
try:
cursor.insert(table, prow(package))
except OperationalError:
pass
示例12: __init__
def __init__(self, conn, suite):
table = ujoin(suite, 'scripts')
TraitRelation.__init__(self, conn, suite, table, name='TraitScript')
self.textfiles = TextFileManager(self.conn)
self._jtable = '%s as s join textfiles as t ' % table
self._jtable += 'on s.scriptfile = t.fileid'
示例13: get_value
def get_value(self, keys):
return self[ujoin(*keys)]
示例14: __init__
def __init__(self, conn, suite, trait):
self.suite = suite
table = ujoin(suite, 'variables')
Environment.__init__(self, conn, table, 'trait')
self.set_main(trait)
示例15: __make_superdict__
def __make_superdict__(self):
self.__superdict__ = {}
for field in self.main_values:
for key in self.__keyfunction__(field):
self.__superdict__[ujoin(field, key)] = (field, key)