• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python stdwin.fleep函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中stdwin.fleep函数的典型用法代码示例。如果您正苦于以下问题:Python fleep函数的具体用法?Python fleep怎么用?Python fleep使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: do_cut

def do_cut(win):
	text = win.editor.getfocustext()
	if not text:
		stdwin.fleep()
		return
	stdwin.setcutbuffer(0, text)
	replace(win, '')
开发者ID:asottile,项目名称:ancient-pythons,代码行数:7,代码来源:python.py


示例2: char

	def char(self, detail):
		try:
			func = eval('self.do_' + detail)
		except (AttributeError, SyntaxError):
			stdwin.fleep()
			return
		func()
开发者ID:asottile,项目名称:ancient-pythons,代码行数:7,代码来源:wdb.py


示例3: do_down

	def do_down(self):
		if self.curindex + 1 == len(self.stack):
			stdwin.fleep()
		else:
			self.curindex = self.curindex + 1
			self.curframe = self.stack[self.curindex][0]
			self.refreshstack()
开发者ID:asottile,项目名称:ancient-pythons,代码行数:7,代码来源:wdb.py


示例4: icopy

def icopy(win):
	focustext = win.textobj.getfocustext()
	if not focustext:
		stdwin.fleep()
	else:
		stdwin.rotatecutbuffers(1)
		stdwin.setcutbuffer(0, focustext)
开发者ID:asottile,项目名称:ancient-pythons,代码行数:7,代码来源:ibrowse.py


示例5: do_up

	def do_up(self):
		if self.curindex == 0:
			stdwin.fleep()
		else:
			self.curindex = self.curindex - 1
			self.curframe = self.stack[self.curindex][0]
			self.refreshstack()
开发者ID:asottile,项目名称:ancient-pythons,代码行数:7,代码来源:wdb.py


示例6: make_selection

	def make_selection(self):
		s = self.tefocus.getfocustext()
		if not s:
			return
		stdwin.rotatecutbuffers(1)
		stdwin.setcutbuffer(0, s)
		if not self.window.setselection(WS_PRIMARY, s):
			stdwin.fleep()
开发者ID:asottile,项目名称:ancient-pythons,代码行数:8,代码来源:form.py


示例7: playfile

def playfile(filename):
	killchild()
	try:
		tuple = sndhdr.what(filename)
	except IOError, msg:
		print 'Can\'t open', filename, msg
		stdwin.fleep()
		return
开发者ID:asottile,项目名称:ancient-pythons,代码行数:8,代码来源:jukebox.py


示例8: do_clear

def do_clear(window):
	first, last = window.textobject.getfocus()
	if first == last:
		stdwin.fleep()		# Nothing to clear
	else:
		window.textobject.replace('')
		window.changed = 1
		fix_docsize(window)
开发者ID:asottile,项目名称:ancient-pythons,代码行数:8,代码来源:miniedit.py


示例9: mouse_up

	def mouse_up(self, detail):
		if self.last_mouse_down:
			h1, v1 = self.last_mouse_down[0]
			h2, v2 = detail[0]
			long1 = self.cur_backend.whereis(stdwin, h1, v1)
			long2 = self.cur_backend.whereis(stdwin, h2, v2)
			if not long1 or not long2:
				return
			long1, long2 = self.roundpositions(long1, long2)
			self.cur_backend.setselection((long1, long2))
			#
			selection = self.cur_backend.extractpart(long1, long2)
			if not selection:
				return
			if not self.window.setselection(WS_PRIMARY, selection):
				# Meaning some other application got it now
				stdwin.fleep()
				return
			stdwin.rotatecutbuffers(1)
			stdwin.setcutbuffer(0, selection)
			return
		h, v = detail[0]
		hits = self.cur_backend.hitcheck(h, v)
		if not hits:
			return
		if len(hits) > 1:
			stdwin.message('Please click in exactly one anchor')
			return
		id = hits[0]
		if 1 <= id <= len(self.cur_anchors):
			addr = self.cur_anchors[id-1]
			name = self.cur_anchornames[id-1]
			type = self.cur_anchortypes[id-1]
			button = detail[2]
			if button == 2:
				if name:
					msg = 'NAME="' + name + '" '
				else:
					msg = ''
				if addr:
					msg = msg + 'HREF="' + addr + '"'
				stdwin.message(msg)
			elif addr[:7] == 'telnet:':
				self.telnet(addr)
			elif button == 3 and addr and addr[0] <> '#':
				addr = self.full_addr(addr)
				w = self.new()
				history = self.history + [self.cur_addr]
				if not w.setaddr(addr):
					w.close()
					stdwin.message(addr + ': ' + \
						self.last_msg)
				else:
					w.set_history(history)
			else:
				self.follow(addr)
		else:
			stdwin.message('Strange - bad anchor id???')
开发者ID:asottile,项目名称:ancient-pythons,代码行数:58,代码来源:wwww.py


示例10: but2

def but2(win):
	state = win.player.getstatus()[0]
	if state == cd.ready:
		win.player.play(1, 1)
	elif state in (cd.playing, cd.paused):
		win.player.togglepause()
	else:
		stdwin.fleep()
	update(win)
开发者ID:asottile,项目名称:ancient-pythons,代码行数:9,代码来源:cdwin.py


示例11: do_copy

def do_copy(window):
	selection = window.textobject.getfocustext()
	if not selection:
		stdwin.fleep()		# Nothing to cut
	elif not window.setselection(WS_PRIMARY, selection):
		stdwin.fleep()		# Window manager glitch...
	else:
		stdwin.rotatecutbuffers(1)
		stdwin.setcutbuffer(0, selection)
开发者ID:asottile,项目名称:ancient-pythons,代码行数:9,代码来源:miniedit.py


示例12: character

	def character(self, c):
		if charnames.has_key(c):
			c = charnames[c]
		try:
			method = getattr(self, 'key_' + c)
		except AttributeError:
			stdwin.fleep()
			return
		method()
开发者ID:asottile,项目名称:ancient-pythons,代码行数:9,代码来源:wwww.py


示例13: but2

def but2(win):
	state = win.player.getstatus()[0]
	if state == CD.READY:
		win.player.play(1, 1)
	elif state in (CD.PLAYING, CD.PAUSED):
		win.player.togglepause()
	else:
		stdwin.fleep()
	update(win)
开发者ID:asottile,项目名称:ancient-pythons,代码行数:9,代码来源:cdwin.py


示例14: key_space

	def key_space(self): # traverse
		if self.gotype('menu', H_PUSH) or self.gotype('next', H_NOP):
			return
		while 1:
			if not self.gotype('up', H_POP):
				stdwin.fleep()
				return
			if self.gotype('next', H_NOP):
				return
开发者ID:asottile,项目名称:ancient-pythons,代码行数:9,代码来源:wwww.py


示例15: idispatch

def idispatch(event):
	type, win, detail = event
	if type == WE_CHAR:
		if not keybindings.has_key(detail):
			detail = string.lower(detail)
		if keybindings.has_key(detail):
			keybindings[detail](win)
			return
		if detail in '0123456789':
			i = eval(detail) - 1
			if i < 0: i = len(win.menu) + i
			if 0 <= i < len(win.menu):
				topic, ref = win.menu[i]
				imove(win, ref)
				return
		stdwin.fleep()
		return
	if type == WE_COMMAND:
		if detail == WC_LEFT:
			iprev(win)
		elif detail == WC_RIGHT:
			inext(win)
		elif detail == WC_UP:
			iup(win)
		elif detail == WC_DOWN:
			idown(win)
		elif detail == WC_BACKSPACE:
			ibackward(win)
		elif detail == WC_RETURN:
			idown(win)
		else:
			stdwin.fleep()
		return
	if type == WE_MENU:
		mp, item = detail
		if mp == None:
			pass # A THINK C console menu was selected
		elif mp in (win.mainmenu, win.navimenu):
			mp.callback[item](win)
		elif mp == win.nodemenu:
			topic, ref = win.menu[item]
			imove(win, ref)
		elif mp == win.footmenu:
			topic, ref = win.footnotes[item]
			imove(win, ref)
		return
	if type == WE_SIZE:
		win.textobj.move((0, 0), win.getwinsize())
		(left, top), (right, bottom) = win.textobj.getrect()
		win.setdocsize(0, bottom)
		return
	if type == WE_CLOSE:
		iclose(win)
		return
	if not win.textobj.event(event):
		pass
开发者ID:asottile,项目名称:ancient-pythons,代码行数:56,代码来源:ibrowse.py


示例16: do_paste

def do_paste(window):
	selection = stdwin.getselection(WS_PRIMARY)
	if not selection:
		selection = stdwin.getcutbuffer(0)
	if not selection:
		stdwin.fleep()		# Nothing to paste
	else:
		window.textobject.replace(selection)
		window.changed = 1
		fix_docsize(window)
开发者ID:asottile,项目名称:ancient-pythons,代码行数:10,代码来源:miniedit.py


示例17: ibackward

def ibackward(win):
	lh = stdwin.lineheight() # XXX Should really use the window's...
	h, v = win.getorigin()
	if v <= 0:
		stdwin.fleep()
		return
	width, height = win.getwinsize()
	increment = max(lh, ((height - 2*lh) / lh) * lh)
	v = max(0, v - increment)
	win.setorigin(h, v)
开发者ID:asottile,项目名称:ancient-pythons,代码行数:10,代码来源:ibrowse.py


示例18: iforward

def iforward(win):
	lh = stdwin.lineheight() # XXX Should really use the window's...
	h, v = win.getorigin()
	docwidth, docheight = win.getdocsize()
	width, height = win.getwinsize()
	if v + height >= docheight:
		stdwin.fleep()
		return
	increment = max(lh, ((height - 2*lh) / lh) * lh)
	v = v + increment
	win.setorigin(h, v)
开发者ID:asottile,项目名称:ancient-pythons,代码行数:11,代码来源:ibrowse.py


示例19: paste_selection

	def paste_selection(self):
		if not self.tefocus:
			stdwin.fleep()
			return
		s = stdwin.getselection(WS_PRIMARY)
		if not s:
			s = stdwin.getcutbuffer(0)
			if not s:
				stdwin.fleep()
				return
		self.tefocus.replace(s)
开发者ID:asottile,项目名称:ancient-pythons,代码行数:11,代码来源:form.py


示例20: mouse_down

	def mouse_down(self, detail):
		(h, v), clicks, button, mask = detail
		i = v / stdwin.lineheight()
		if 0 <= i < len(self.stack):
			if i != self.curindex:
				self.curindex = i
				self.curframe = self.stack[self.curindex][0]
				self.refreshstack()
			elif clicks == 2:
				self.do_frame()
		else:
			stdwin.fleep()
开发者ID:asottile,项目名称:ancient-pythons,代码行数:12,代码来源:wdb.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python models.TableField类代码示例发布时间:2022-05-27
下一篇:
Python stdout.red函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap