本文整理汇总了Python中Table.Table.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Table.__init__方法的具体用法?Python Table.__init__怎么用?Python Table.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table.Table
的用法示例。
在下文中一共展示了Table.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__ (self, callback, container, *args, **kwargs):
Table.__init__ (self, *args, **kwargs)
self.id = "sortablelist_%d" %(self.uniq_id)
self.url = "/sortablelist_%d"%(self.uniq_id)
self.container = container
# Register the public URL
publish (self.url, changed_handler_func, method='POST',
callback=callback, key_id='%s_order'%(self.id), **kwargs)
示例2: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__ ( self, handle ):
self.name = 'nrdb'
self.fields = (
('nid', 'INT UNSIGNED NOT NULL'),
)
self.indices = (
'UNIQUE (nid)',
)
Table.__init__( self, handle )
示例3: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__ (self, callback, container, *args, **kwargs):
Table.__init__ (self, *args, **kwargs)
self.id = "sortablelist_%d" %(self.uniq_id)
self.url = "/sortablelist_%d"%(self.uniq_id)
self.container = container
# Secure submit
srv = get_server()
if srv.use_sec_submit:
self.url += '?key=%s' %(srv.sec_submit)
# Register the public URL
publish (r"^/sortablelist_%d"%(self.uniq_id), changed_handler_func,
method='POST', callback=callback, key_id='%s_order'%(self.id), **kwargs)
示例4: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__ ( self, handle, root = "domains"):
self.fields = (
('nid', 'INT UNSIGNED NOT NULL'),
('start', 'SMALLINT UNSIGNED NOT NULL DEFAULT 0'),
('end', 'SMALLINT UNSIGNED NOT NULL DEFAULT 0'),
('rep_ali', 'BLOB NOT NULL'),
('domain_id', self.mTypeDomainId),
('domain_from', 'SMALLINT UNSIGNED NOT NULL DEFAULT 0'),
('domain_to', 'SMALLINT UNSIGNED NOT NULL DEFAULT 0'),
('domain_ali', 'BLOB NOT NULL'),
('family', self.mTypeDomainClass ),
) + self.mExtraFields
self.indices = (
'INDEX (nid)',
'INDEX (domain_id)',
'INDEX (family)'
) + self.mExtraIndices
self.mFieldsNr = (
('nid INT UNSIGNED NOT NULL'),
('start SMALLINT UNSIGNED NOT NULL DEFAULT 0'),
('end SMALLINT UNSIGNED NOT NULL DEFAULT 0'),
('family %s' % self.mTypeDomainClass),
)
self.mIndicesNr = ( 'INDEX (nid)',
'INDEX (family)',
)
self.mRootName = root
Table.__init__( self, handle )
# minimum length of an assignment
self.mMinAssignmentLength = 10
# whether or not to shorten domains
self.mShortenDomains = 0
# minimum overlap between domains of the same did in order
# for them to be joined for making non-redundant set
# (had problems with scop and hemoglobins, there was one residue overlap)
self.mMinRedundancyOverlap = 0
## field to use as class identifier, this is the default
self.mClassNr = "family"
## additional info in each row, used for propagation
self.mAdditionalInfo = []
示例5: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__(self, handle, root):
self.mRootName = root
Table.__init__(self, handle)
self.fields = (
("family", self.mTypeDomainClass),
("nunits", "INT UNSIGNED NOT NULL DEFAULT 0"),
("nsequences", "INT UNSIGNED NOT NULL DEFAULT 0"),
("nresidues", "INT UNSIGNED NOT NULL DEFAULT 0"),
("length", "SMALLINT UNSIGNED NOT NULL DEFAULT 0"),
) + self.mExtraFields
self.indices = ("UNIQUE (family)",) + self.mExtraIndices
示例6: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__ ( self, handle ):
self.name = 'nrdb'
self.fields = (
('updated', 'TIMESTAMP'),
('nid', 'INTEGER UNSIGNED NOT NULL AUTO_INCREMENT'),
('hid', 'CHAR(22) NOT NULL'),
('sequence', 'TEXT NOT NULL'),
('sequencedbs_id', 'TINYINT UNSIGNED NOT NULL'),
('accessionnumber', 'VARCHAR(20) BINARY NOT NULL'),
('identifier', "VARCHAR(20) BINARY NOT NULL DEFAULT ''"),
('description', "VARCHAR(255) NOT NULL DEFAULT ''"),
('created', 'DATE NOT NULL'),
('length', 'MEDIUMINT UNSIGNED NOT NULL DEFAULT 0'),
('filter', 'TINYINT UNSIGNED NOT NULL DEFAULT 100'),
)
self.indices = (
'PRIMARY KEY (nid)',
'INDEX hid (hid(4))',
'INDEX updated (updated)',
'INDEX filter (filter)',
)
Table.__init__( self, handle )
示例7: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__(self, scripts):
scriptlist = [Script(script) for script in scripts]
Table.__init__(self, scriptlist)
示例8: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__(self, root, key_name_style, keydoc_name_style, key_space_width=30):
self.root = root
self.key_name_style = key_name_style
self.keydoc_name_style = keydoc_name_style
self.key_space_width = key_space_width
Table.__init__(self, CacheMap(self._key_row, SortedItems(self.root)))
示例9: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__(self, config, nodes):
nodelist = [Node(config, node) for node in nodes]
Table.__init__(self, nodelist)
self.config = config
示例10: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__(self, Cursor):
Table.__init__(self, Cursor)
self.Table = 'Function'
示例11: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__(self, config, plcs):
plclist = [PLC(config, plc) for plc in plcs]
Table.__init__(self, plclist)
示例12: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__(self, year):
Table.__init__(self)
self.Year = year
self.TestCampaigns = self.get_test_campaigns()
示例13: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__(self, *p, **pp):
"""
See _init for arguments
"""
Table.__init__(self)
self._init(*p, **pp)
示例14: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__(self, sites):
sitelist = [Site(site) for site in sites]
Table.__init__(self, sitelist)
示例15: __init__
# 需要导入模块: from Table import Table [as 别名]
# 或者: from Table.Table import __init__ [as 别名]
def __init__(self):
Table.__init__(self)