亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? html_fragment.py

?? Urwid is a Python library for making text console applications. It has many features including fluid
?? PY
字號(hào):
#!/usr/bin/python## Urwid html fragment output wrapper for "screen shots"#    Copyright (C) 2004-2007  Ian Ward##    This library is free software; you can redistribute it and/or#    modify it under the terms of the GNU Lesser General Public#    License as published by the Free Software Foundation; either#    version 2.1 of the License, or (at your option) any later version.##    This library is distributed in the hope that it will be useful,#    but WITHOUT ANY WARRANTY; without even the implied warranty of#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU#    Lesser General Public License for more details.##    You should have received a copy of the GNU Lesser General Public#    License along with this library; if not, write to the Free Software#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA## Urwid web site: http://excess.org/urwid/"""HTML PRE-based UI implementation"""import util_html_colours = {	'black':		"black",	'dark red':		"#c00000",	'dark green':		"green",	'brown':		"#804000",	'dark blue':		"#0000c0",	'dark magenta':		"#c000c0",	'dark cyan':		"teal",	'light gray':		"silver",	'dark gray':		"gray",	'light red':		"#ff6060",	'light green':		"lime",	'yellow':		"yellow",	'light blue':		"#8080ff",	'light magenta':	"#ff40ff",	'light cyan':		"aqua",	'white':		"white",}# replace control characters with ?'s_trans_table = "?" * 32 + "".join([chr(x) for x in range(32, 256)])class HtmlGeneratorSimulationError(Exception):	passclass HtmlGenerator:	# class variables	fragments = []	sizes = []	keys = []	def __init__(self):		self.palette = {}		self.has_color = True		def register_palette( self, l ):		"""Register a list of palette entries.		l -- list of (name, foreground, background) or		     (name, same_as_other_name) palette entries.		calls self.register_palette_entry for each item in l		"""				for item in l:			if len(item) in (3,4):				self.register_palette_entry( *item )				continue			assert len(item) == 2, "Invalid register_palette usage"			name, like_name = item			if not self.palette.has_key(like_name):				raise Exception("palette entry '%s' doesn't exist"%like_name)			self.palette[name] = self.palette[like_name]	def register_palette_entry( self, name, foreground, background, 		mono=None):		"""Register a single palette entry.		name -- new entry/attribute name		foreground -- foreground colour		background -- background colour		mono -- monochrome terminal attribute		See curses_display.register_palette_entry for more info.		"""		if foreground == "default":			foreground = "black"		if background == "default":			background = "light gray"		self.palette[name] = (foreground, background, mono)		def set_mouse_tracking(self):		"""Not yet implemented"""		pass	def start(self):		pass		def stop(self):		pass	def run_wrapper(self,fn):		"""Call fn."""		return fn()	def draw_screen(self, (cols, rows), r ):		"""Create an html fragment from the render object. 		Append it to HtmlGenerator.fragments list.		"""		# collect output in l		l = []				assert r.rows() == rows			if r.cursor is not None:			cx, cy = r.cursor		else:			cx = cy = None				y = -1		for row in r.content():			y += 1			col = 0						for a, cs, run in row:				run = run.translate(_trans_table)				if a is None:					fg,bg,mono = "black", "light gray", None				else:					fg,bg,mono = self.palette[a]				if y == cy and col <= cx:					run_width = util.calc_width(run, 0,						len(run))					if col+run_width > cx:						l.append(html_span(run,							fg, bg, cx-col))					else:						l.append(html_span(run, fg, bg))					col += run_width				else:					l.append(html_span(run, fg, bg))			l.append("\n")								# add the fragment to the list		self.fragments.append( "<pre>%s</pre>" % "".join(l) )				def clear(self):		"""		Force the screen to be completely repainted on the next		call to draw_screen().		(does nothing for html_fragment)		"""		pass				def get_cols_rows(self):		"""Return the next screen size in HtmlGenerator.sizes."""		if not self.sizes:			raise HtmlGeneratorSimulationError, "Ran out of screen sizes to return!"		return self.sizes.pop(0)	def get_input(self):		"""Return the next list of keypresses in HtmlGenerator.keys."""		if not self.keys:			raise HtmlGeneratorSimulationError, "Ran out of key lists to return!"		return self.keys.pop(0)	def html_span( s, fg, bg, cursor = -1):	html_fg = _html_colours[ fg ]	html_bg = _html_colours[ bg ]	def html_span(fg, bg, s):		if not s: return ""		return '<span style="color:%s;background:%s">%s</span>' % \			(fg, bg, html_escape(s))		if cursor >= 0:		c_off, _ign = util.calc_text_pos(s, 0, len(s), cursor)		c2_off = util.move_next_char(s, c_off, len(s))		return (html_span(html_fg, html_bg, s[:c_off]) +			html_span(html_bg, html_fg, s[c_off:c2_off]) +			html_span(html_fg, html_bg, s[c2_off:]))	else:		return html_span(html_fg, html_bg, s)def html_escape(text):	"""Escape text so that it will be displayed safely within HTML"""	text = text.replace('&','&amp;')	text = text.replace('<','&lt;')	text = text.replace('>','&gt;')	return textdef screenshot_init( sizes, keys ):	"""	Replace curses_display.Screen and raw_display.Screen class with 	HtmlGenerator.		Call this function before executing an application that uses 	curses_display.Screen to have that code use HtmlGenerator instead.		sizes -- list of ( columns, rows ) tuples to be returned by each call	         to HtmlGenerator.get_cols_rows()	keys -- list of lists of keys to be returned by each call to	        HtmlGenerator.get_input()		Lists of keys may include "window resize" to force the application to	call get_cols_rows and read a new screen size.	For example, the following call will prepare an application to:	 1. start in 80x25 with its first call to get_cols_rows()	 2. take a screenshot when it calls draw_screen(..)	 3. simulate 5 "down" keys from get_input()	 4. take a screenshot when it calls draw_screen(..)	 5. simulate keys "a", "b", "c" and a "window resize"	 6. resize to 20x10 on its second call to get_cols_rows()	 7. take a screenshot when it calls draw_screen(..)	 8. simulate a "Q" keypress to quit the application	screenshot_init( [ (80,25), (20,10) ],		[ ["down"]*5, ["a","b","c","window resize"], ["Q"] ] )	"""	try:		for (row,col) in sizes:			assert type(row) == type(0)			assert row>0 and col>0	except:		raise Exception, "sizes must be in the form [ (col1,row1), (col2,row2), ...]"		try:		for l in keys:			assert type(l) == type([])			for k in l:				assert type(k) == type("")	except:		raise Exception, "keys must be in the form [ [keyA1, keyA2, ..], [keyB1, ..], ...]"		import curses_display	curses_display.Screen = HtmlGenerator	import raw_display	raw_display.Screen = HtmlGenerator		HtmlGenerator.sizes = sizes	HtmlGenerator.keys = keysdef screenshot_collect():	"""Return screenshots as a list of HTML fragments."""	l = HtmlGenerator.fragments	HtmlGenerator.fragments = []	return l	

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美色综合久久| 粉嫩13p一区二区三区| 欧美丝袜丝交足nylons| 亚洲午夜一区二区三区| 欧美日韩夫妻久久| 日韩黄色免费电影| 精品国产一区a| 国产成人在线视频网站| 国产精品久久久久天堂| 在线观看免费视频综合| 午夜欧美一区二区三区在线播放| 欧美一级欧美一级在线播放| 久久精品国产999大香线蕉| 国产午夜精品一区二区三区嫩草| 成人av在线影院| 亚洲h在线观看| 精品99999| 在线中文字幕不卡| 日本三级韩国三级欧美三级| 久久精品亚洲乱码伦伦中文 | 欧美日本在线看| 麻豆国产一区二区| 中文字幕亚洲视频| 欧美精品tushy高清| 国产一区二区在线观看视频| 亚洲青青青在线视频| 4438x亚洲最大成人网| 国产成人高清视频| 亚洲电影一区二区| 国产亚洲综合av| 欧美日韩性生活| 国产suv精品一区二区883| 亚洲一区二区影院| 中文字幕欧美三区| 欧美精品乱码久久久久久 | 国产欧美一区二区精品性色超碰| 91麻豆精东视频| 精品一区二区三区视频在线观看| 亚洲视频免费观看| 亚洲精品在线电影| 欧美久久高跟鞋激| 99久久精品免费看国产免费软件| 日本亚洲天堂网| 亚洲综合一区二区精品导航| 久久久精品人体av艺术| 欧美中文字幕一区二区三区| 国产成人激情av| 免费在线成人网| 亚洲免费伊人电影| 日本一区二区成人| 精品国产乱子伦一区| 欧美日韩国产欧美日美国产精品| 波多野结衣欧美| 国产一区二区三区av电影| 亚洲成人精品一区| 亚洲色图欧洲色图婷婷| 国产丝袜美腿一区二区三区| 日韩一区二区三区四区五区六区| 在线看日本不卡| 91在线porny国产在线看| 成人精品视频.| 国产老妇另类xxxxx| 蜜桃久久久久久| 日韩电影免费在线看| 亚洲电影视频在线| 亚洲制服丝袜av| 亚洲三级在线观看| 中文字幕制服丝袜成人av| 日本一区二区三区视频视频| 久久影院电视剧免费观看| 日韩美女主播在线视频一区二区三区 | 2020日本不卡一区二区视频| 欧美情侣在线播放| 欧美精品色一区二区三区| 色综合久久天天| 色哟哟国产精品| 欧美综合欧美视频| 欧美视频一区二| 欧美二区在线观看| 91精品国产综合久久久久久漫画| 欧美日韩电影在线播放| 欧美精品一二三四| 日韩欧美中文字幕精品| 日韩精品一区二区三区在线| 精品精品国产高清一毛片一天堂| www国产精品av| 欧美激情资源网| 中文字幕亚洲在| 亚洲自拍偷拍麻豆| 日日夜夜精品视频免费| 免费在线成人网| 国产一区欧美二区| 成人av动漫在线| 欧美亚洲国产一卡| 欧美一区二区精品| 2023国产精品视频| 国产精品国产馆在线真实露脸| 日韩毛片一二三区| 亚洲成年人影院| 久久不见久久见免费视频7| 国产成人一区在线| 色婷婷av一区二区| 91麻豆精品91久久久久同性| 久久综合九色综合97_久久久| 国产精品亲子乱子伦xxxx裸| 亚洲精品videosex极品| 蜜臀av一区二区在线观看 | 粉嫩久久99精品久久久久久夜 | 蜜桃视频第一区免费观看| 国产精品亚洲第一区在线暖暖韩国| 99re这里只有精品视频首页| 欧美日韩不卡一区| 国产丝袜美腿一区二区三区| 亚洲日韩欧美一区二区在线| 日本在线不卡一区| 成人黄色小视频| 91.麻豆视频| 国产精品久久一级| 日韩成人精品在线观看| 成人综合在线视频| 欧美一区二区三区免费在线看| 久久精品人人做| 亚洲自拍偷拍九九九| 国产成人久久精品77777最新版本| 欧美在线观看一二区| 久久久蜜臀国产一区二区| 亚洲一区二区三区在线播放| 国产在线视频一区二区三区| 91国产免费观看| 国产日韩欧美在线一区| 日本网站在线观看一区二区三区 | 亚洲欧美日韩电影| 激情综合色播激情啊| 在线亚洲人成电影网站色www| 2023国产精品视频| 日韩国产欧美在线播放| 97久久精品人人做人人爽| 精品国精品自拍自在线| 亚洲成人在线观看视频| 不卡一区中文字幕| 久久只精品国产| 日本不卡1234视频| 日本韩国欧美一区| 中文字幕第一区综合| 久草精品在线观看| 欧美日韩亚洲另类| 一区二区三区丝袜| 91丨porny丨首页| 国产午夜精品一区二区三区嫩草| 久久精品国产澳门| 欧美一二三四在线| 亚洲成a人片在线不卡一二三区| aaa亚洲精品| 国产精品久久久久久久久果冻传媒 | 自拍偷拍欧美精品| 国产91精品免费| 久久女同性恋中文字幕| 蜜臀91精品一区二区三区| 欧美高清激情brazzers| 亚洲电影激情视频网站| 91福利资源站| 中文字幕字幕中文在线中不卡视频| 成人黄色一级视频| 亚洲国产精品传媒在线观看| 国产成人精品一区二| 国产欧美一区二区三区在线老狼| 国产一区高清在线| 久久综合九色综合欧美98| 国产中文字幕精品| 久久伊人蜜桃av一区二区| 久久aⅴ国产欧美74aaa| 精品国产乱码久久久久久久久| 久久精品99国产国产精| 欧美成人三级电影在线| 极品少妇xxxx偷拍精品少妇| 2020国产精品| 国产盗摄一区二区| 国产精品麻豆99久久久久久| va亚洲va日韩不卡在线观看| 亚洲色图丝袜美腿| 欧美视频一区二区三区在线观看| 午夜伊人狠狠久久| 日韩欧美黄色影院| 国产在线乱码一区二区三区| 亚洲国产激情av| 色诱视频网站一区| 丝袜诱惑制服诱惑色一区在线观看| 欧美一二三区精品| 国产一区二区影院| 国产精品久99| 欧美日韩五月天| 久久se这里有精品| 国产精品伦理在线| 欧美精品亚洲二区| 国产一区999| 亚洲欧美激情在线| 91精品国产综合久久久久| 国产精品香蕉一区二区三区| 亚洲精品国产成人久久av盗摄| 91麻豆精品国产91久久久 |