本文整理汇总了Python中Interface.Interface.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Interface.__init__方法的具体用法?Python Interface.__init__怎么用?Python Interface.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Interface.Interface
的用法示例。
在下文中一共展示了Interface.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Interface import Interface [as 别名]
# 或者: from Interface.Interface import __init__ [as 别名]
def __init__(self, width, height, blocksize, fullscreen=False):
Interface.__init__(self, width, height, blocksize)
self.flags = pygame.DOUBLEBUF | pygame.HWSURFACE
if fullscreen:
self.flags |= pygame.FULLSCREEN
self.window = pygame.display.set_mode((self.width, self.height),
self.flags)
示例2: __init__
# 需要导入模块: from Interface import Interface [as 别名]
# 或者: from Interface.Interface import __init__ [as 别名]
def __init__(self, game_instance):
Interface.__init__(self, game_instance)
PygameHelper.__init__(self)
self.first_selected_square = None
self.second_selected_square = None
self.current_move = None
self.squares = []
self.region_to_coord = {}
self.coord_to_region = {}
self.sprites = {}
self.white_square_color = (247, 196, 145)
self.black_square_color = (188, 123, 64)
self.game = game_instance
self.setup()
示例3: __init__
# 需要导入模块: from Interface import Interface [as 别名]
# 或者: from Interface.Interface import __init__ [as 别名]
def __init__(self, width, height, pixelsize, fullscreen):
Interface.__init__(self, width, height, pixelsize)
glutInit()
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_ALPHA | GLUT_DEPTH)
glutInitWindowSize(self.width, self.height)
glutInitWindowPosition(self.width, self.height)
self.window = glutCreateWindow("matrix Sim")
glutKeyboardFunc(self.keyboardinput)
if fullscreen:
glutFullScreen()
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
glLoadIdentity()
glViewport(0, 0, self.width, self.height)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
glOrtho(0.0, self.width, 0.0, self.height, 0.0, 1.0)
glMatrixMode(GL_MODELVIEW)
glLoadIdentity()
glutMainLoopEvent()
示例4: __init__
# 需要导入模块: from Interface import Interface [as 别名]
# 或者: from Interface.Interface import __init__ [as 别名]
def __init__(self):
Interface.__init__(self)
self.A,self.C,self.G,self.T=0.25,0.25,0.25,0.25
# This is a map from commands to their functions and
# at least required number of arguments
self.__commands={'about': (self.about,0),
'h': (self.help,0),
'help': (self.help,0),
'?': (self.help,0),
'addMatrix': (self.addMatrix,1),
'am': (self.addMatrix,1),
'removeMatrix': (self.removeMatrix,1),
'rm': (self.removeMatrix,1),
'align': (self.align,0),
'resetMatrices': (self.resetMatrices,0),
'resm': (self.resetMatrices,0),
'printMatrices': (self.printMatrices,0),
'pm': (self.printMatrices,0),
'pmw': (self.printMatrixWeights,0),
'printMatrixWeights': (self.printMatrixWeights,0),
'addSequence': (self.addSequence,1),
'as': (self.addSequence,1),
'removeSequence': (self.removeSequence,1),
'rs': (self.removeSequence,1),
'resetSequences': (self.resetSequences,0),
'ress': (self.resetSequences,0),
'reset': (self.reset,0),
"setBGfreq": (self.setBGFreq,1),
"setMarkovBG": (self._setMarkovBG,1),
'printSeqNames': (self.printSeqNames,0),
'ps': (self.printSeqNames,0),
'getTFBS': (self.getTFBS,0),
'getTFBSabsolute': (self.getTFBSabsolute,0),
'getTFBSpvalue': (self.getTFBSpvalue,0),
'showmatch': (self.showmatch,0),
'sm': (self.showmatch,0),
'q': (self.quit,0),
'quit': (self.quit,0),
'savematch': (self.savematch,0),
'savealign': (self.savealign,0),
'savealignGFF': (self.savealignGFF,0),
'savealignAnchor': (self.savealignAnchor,0),
'showpwbase': (self.showpwbase,0),
'savepwbase': (self.savepwbase,0),
'showalign': (self.showalign,0),
'sa': (self.showalign,0),
'setpseudocount': (self.setPseudoCnt,1),
'addSingleSequence': (self.addSingleSequence,1),
'ass': (self.addSingleSequence,1),
'saveMarkovBackground': (self.saveMarkovBackground,1),
'more': (self.moreAlignment,0),
'suboptimals': (self.suboptimalAlignment,0),
'suboptimalsDownTo': (self.suboptimalAlignmentsDownTo,1),
'__multipleAlignGreedy': (self.multiAlignGreedy,1),
'shortMultipleAlign': (self.shortMultiAlign,1),
'multiFromPairwise': (self.multiFromPairwise,2),
'treeMultipleAlign': (self.treeMultiAlign,2),
'nodeAlignments': (self.nodeAlignments,1),
'multipleAlign': (self.multiAlign,0),
'__showMultiAlign': (self.showMultiAlign,0),
'__saveMultiAlign': (self.saveMultiAlign,1),
'no-gui': (self.no_gui,0),
'computeKLdistances': (self.showKLdist,1),
'__computeEscores': (self.showExpectedScores,1),
'__head': (self.getHead,1),
'__randomize_full': (self.randomize_full,0)
}
# Add directory commands if available.
if globals().has_key("os") and hasattr(os,"getcwd") and hasattr(os,"chdir"):
self.__commands.update({'dir': (self.dirlist,0),
'cd': (self.chgdir,0)})
示例5: __init__
# 需要导入模块: from Interface import Interface [as 别名]
# 或者: from Interface.Interface import __init__ [as 别名]
def __init__(self, width, height, blocksize, fullscreen=False):
Interface.__init__(self, width, height, blocksize, fullscreen)
示例6: __init__
# 需要导入模块: from Interface import Interface [as 别名]
# 或者: from Interface.Interface import __init__ [as 别名]
def __init__(self):
Interface.__init__(self)
self.proxy = ('127.0.0.1', 8087)