当前位置: 首页>>代码示例>>Python>>正文


Python Text.__init__方法代码示例

本文整理汇总了Python中Text.Text.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Text.__init__方法的具体用法?Python Text.__init__怎么用?Python Text.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Text.Text的用法示例。


在下文中一共展示了Text.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from Text import Text [as 别名]
# 或者: from Text.Text import __init__ [as 别名]
	def __init__(self, model, visitor, obj=None, config=None):
		self.model = model
		Generic.__init__(self, visitor, obj, config)
		GenericSerial.__init__(self, visitor, obj, config)
		Text.__init__(self, rows=model.rows, cols=model.cols, yres=8, xres=6, goto=model.goto, chars=model.chars, char0=model.char0)
		if obj is None:
			self.port = ''
			self.baud = 19200
			self.command_rate = .0165
			self.layout_timeout = 0
		else:
			self.port = obj.port
			self.baud = obj.baud
			self.command_rate = obj.command_rate
			self.layout_timeout = obj.layout_timeout

		self.command_thread = ThreadedTask(self.command_worker, None, 1)
		self.command_queue = Queue.Queue()
		self.command_time = time.time()
开发者ID:Starlon,项目名称:LCD4Py,代码行数:21,代码来源:DrvCrystalfontz.py

示例2: __init__

# 需要导入模块: from Text import Text [as 别名]
# 或者: from Text.Text import __init__ [as 别名]
	def __init__(self, darea, rows=4, cols=20, config=None):
		file = open('cfa635_fonts.dat', 'r')
		self.lcd_fonts = pickle.load(file)
		file.close()
		self.ch_data = []
		self.fontP = None
		self.interface = None
		self.current_state = None
		self.previous_state = None
		self.mode_flag = 0
		self.data_latch = None
		self.data_latch_phase = None
		self.debug = False
		self.cursor = {'row':0, 'col':0}
		self.lcd_gc = None
		self.rows = rows
		self.cols = cols
		self.dots = {'x':6, 'y':8} # Resolution in lcd pixels. e.g. 5x7
		self.pixels = {'x':4, 'y':4} # Resolution in crt pixels - scaled
		self.contrast = None
		self.dot_color = None
		self.title = None
		self.window = None
		self.darea = None
		self.w_width = None
		self.w_height = None
		self.disp_type = 0
		self.border = 5
		self.darea = darea
		self.darea.connect('expose-event', self.lcd_expose_event, self)
		self.darea.connect('button-press-event', self.cursor_event)
		self.bg_color = gtk.gdk.color_parse("#78a878")
		self.fg_color = gtk.gdk.color_parse("#113311")
		self.config = config
		Generic.__init__(self, None, config)
		Text.__init__(self, rows=rows, cols=cols, yres=8, xres=6, goto=0, chars=8, char0=0)
开发者ID:Starlon,项目名称:LCD4Py,代码行数:38,代码来源:CFLCD.py

示例3: __init__

# 需要导入模块: from Text import Text [as 别名]
# 或者: from Text.Text import __init__ [as 别名]
	def __init__ ( self, visitor, obj=None, config=None):
		Generic.__init__(self, visitor, obj, config)
		GenericSerial.__init__(self, visitor, obj, config)
		Text.__init__(self, rows=4, cols=20, yres=8, xres=5, goto=2, chars=8, char0=0)
		if obj == None:
			self.name = 'noname'
			self.port = ''
			self.baud = 19200
			self.layout_timeout = 0 #Default layout timeout. 0 = no transitions. Override at layout level.
			self.layouts = {}
			self.write_rate = .0165
		else:
			self.name = obj.name
			self.port = obj.port
			self.baud = obj.baud
			self.layout_timeout = obj.layout_timeout
			self.layouts = obj.layouts
			self.write_rate = obj.write_rate
		self.app = visitor
		self.debug = visitor.debug
		self.AddFunction("backlight", 0, self.my_backlight)
		self.write_thread = threading.Thread(target=self.write_worker)
		self.write_active = False
		self.write_queue = Queue.Queue()
开发者ID:Starlon,项目名称:LCD4Py,代码行数:26,代码来源:DrvPertelian.py

示例4: __init__

# 需要导入模块: from Text import Text [as 别名]
# 或者: from Text.Text import __init__ [as 别名]
 def __init__(self, ownerDocument, data):
     Text.__init__(self, ownerDocument, data)
     self.__dict__['__nodeName'] = "#cdata-section"
开发者ID:AngusGeek,项目名称:org.aspectj,代码行数:5,代码来源:CDATASection.py


注:本文中的Text.Text.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。