本文整理汇总了Python中useless.base.util.ujoin函数的典型用法代码示例。如果您正苦于以下问题:Python ujoin函数的具体用法?Python ujoin怎么用?Python ujoin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ujoin函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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)
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:7,代码来源:main.py
示例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'])
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:7,代码来源:template.py
示例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
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:8,代码来源:objects.py
示例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)
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:8,代码来源:paella_tables.py
示例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)
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:8,代码来源:traitgen.py
示例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
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:8,代码来源:template.py
示例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'
开发者ID:joelsefus,项目名称:paella,代码行数:9,代码来源:template.py
示例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)
开发者ID:umeboshi2,项目名称:paella,代码行数:9,代码来源:tables.py
示例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))
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:11,代码来源:paellascheme.py
示例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)
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:12,代码来源:main.py
示例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
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:12,代码来源:paellascheme.py
示例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'
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:6,代码来源:script.py
示例13: get_value
def get_value(self, keys):
return self[ujoin(*keys)]
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:2,代码来源:objects.py
示例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)
开发者ID:joelsefus,项目名称:paella,代码行数:5,代码来源:base.py
示例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)
开发者ID:BackupTheBerlios,项目名称:useless-svn,代码行数:5,代码来源:objects.py
示例16: reset_rows
def reset_rows(self):
rows = self.main.select(fields=['trait'], table=ujoin(self.suite, 'traits'))
self.set_rows(rows)
self.set_row_select(self.trait_selected)
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:4,代码来源:environ.py
示例17: make_tag
def make_tag(self, menuitem, name, parent):
parentname = parent.get_name()
tagname = ujoin(parentname, name)
self.editor.make_tag(tagname)
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:4,代码来源:template.py
示例18: __init__
def __init__(self, conn, suite):
table = ujoin(suite, 'trait', 'package')
TraitRelation.__init__(self, conn, suite, table, name='TraitPackage')
self.cmd.set_fields(['package', 'action'])
self.traitparent = TraitParent(conn, suite)
开发者ID:joelsefus,项目名称:paella,代码行数:5,代码来源:package.py
示例19: set_suite
def set_suite(self, suite):
self.suite = suite
self.set_table(ujoin(self.suite, 'traits'))
开发者ID:BackupTheBerlios,项目名称:paella-svn,代码行数:3,代码来源:base.py
注:本文中的useless.base.util.ujoin函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论