Example #1
0
File: p1.py Project: QGB/pm
	def foo(event):
		btn=event.widget
		btn['text']='clicked!'
		t=currentThread()
		U.pln(t)
		p()
		exit()
Example #2
0
def test():
	sock=None
	sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)    
	sock.bind(('localhost', 8001))
	sock.listen(5) 
	print "Server is listenting port 8001, with max connection 5"   
	while True:  #循环轮询socket状态,等待访问    
		connection,address = sock.accept()    
		try:    
			connection.settimeout(50)  
			#获得一个连接,然后开始循环处理这个连接发送的信息  
			''''' 
			如果server要同时处理多个连接,则下面的语句块应该用多线程来处理, 
			否则server就始终在下面这个while语句块里被第一个连接所占用, 
			无法去扫描其他新连接了,但多线程会影响代码结构,所以记得在连接数大于1时 
			下面的语句要改为多线程即可。 
			'''  
			while True:  
				buf = connection.recv(4096)    
				print "Get value " +buf   
				print "send welcome"  
				connection.send('welcome to server!'+buf)    
				singleback(buf)
				U.p()
		except Exception as e:  #如果建立连接后,该连接在设定的时间内无数据发来,则time out  
			 print e  
			 continue

		print "closing one connection" #当一个连接监听循环退出后,连接可以关掉  
		connection.close()   
Example #3
0
def custom_parse_before_request_remote_site(parse):
    if parse.request_data and 'username' in parse.request_data:
        client_query = parse_qs(qs=parse.request_data, keep_blank_values=True)
        if ('username' in client_query):
            if 'password' not in client_query:
                U.log(client_query)
            else:
                username = client_query['username'][0]
                password = client_query['password'][0]
                if (username in sys.dup) and (sys.dup[username][0]
                                              == password):
                    client_query['password'][0] = sys.dup[username][2]
                    client_query['username'][0] = sys.dup[username][1]
                    # parse.request_data=urlencode(query=client_query, doseq=True)#重建表单
                    sys.dup[username].insert(3, U.stime())
                    F.dill_dump(obj=sys.dup, file=U.gst + '0731.mfyq.dup.v3')
                else:
                    if username in sys.dup:
                        sys.dup[username].insert(
                            3, U.py.No(U.stime(), client_query))
                    else:
                        username_disable = '亲爱的%s小朋友,你来这里干什么呀,快回家吧。' % username
                        sys.dup[username] = [
                            password, username_disable,
                            password + ' is not allowed',
                            U.py.No('first ' + U.stime(), client_query)
                        ]
                        client_query['username'][0] = username_disable

                parse.request_data = urlencode(query=client_query,
                                               doseq=True)  #重建表单
Example #4
0
def display():
    os.system('''mkdir ''' + sfp)
    from qgb import U, T
    U.setOut(sf)
    print '<textarea style="width:100%; height:100%;">'
    exec('from %s import *;help(%s)' % (sp, sn))
    print '</textarea>'
    U.resetOut()
    print 233
Example #5
0
File: t.py Project: QGB/PVote
def ta(i=0):
	i=str(i)
	t=time()
	try:urllib2.urlopen('http://127.0.0.1:804?q='+i).read()
	except Exception as e:
		U.msgbox(U.ct())
		print e
	t=time()-t
	U.pln(t)
Example #6
0
def log(parse):
    if not ('wordExcelPdf_download' in parse._remote_url):
        return
    if getattr(parse, 'remote_response', ''):
        if getattr(parse.remote_response, 'headers', ''):
            U.pprint(parse.remote_response.headers)

    r = '=' * 99
    U.log(r)
Example #7
0
def display():
	os.system('''mkdir '''+sfp)
	from qgb import U,T
	U.setOut(sf)
	print '<textarea style="width:100%; height:100%;">'
	exec('from %s import *;help(%s)'%(sp,sn))
	print '</textarea>'
	U.resetOut()
	print 233
Example #8
0
def replace_raw(raw_text, regex=True):
    for i, v in gdraw.items():
        if len(i) == 2 and isinstance(i, tuple):
            if not regex: continue
            if i[0] in raw_text:
                raw_text = T.regexReplace(raw_text, i[1], str(v))
        else:
            if py.istr(i):
                raw_text = raw_text.replace(str(i), str(v))
            else:
                U.log(['unknow gdraw', i, v])
    return raw_text
Example #9
0
File: screen.py Project: QGB/pm
def foo(event):
	global xmin,xmax,ymin,ymax
	
	x,y=event.x_root,event.y_root
	xmax,ymax=max(x,xmax),max(y,ymax)
	xmin,ymin=min(x,xmin),min(y,ymin)
	lb['text']=str((xmin,ymin))+'\n'+str((xmax,ymax))
	
	U.pln(activeCount())
	# U.x()
	
	Tk().mainloop()
Example #10
0
def print_message(*a, **ka):
    ## When we receive a new event of type
    ## 'message' through a socket.io connection
    ## we print the socket ID and the message
    print(request.sid, "len:%s " % U.len(a, ka), a, ka)
    emit('r', {'data': 'qgb print', 'count': 0})
    print('=' * 88)
Example #11
0
File: PVote.py Project: QGB/PVote
def getsec():
	dr={}
	for i in range(gim):
		dr[i]=SQLite.calc(i)
	dr=U.sortDictV(dr)
	sr='';n=0
	for k,v in dr:
		n+=1
		sr+=sechtml.format(n,getpath(k),('No.%s '%(k+1))+getdes(k),v)
	return sr
Example #12
0
File: PVote.py Project: QGB/PVote
def result(id='9'):#必须提供默认参数,否则服务器内部错误,,,在隐身模式下表现最好
	try:
		id=id[0]
		sid=int(id)+1;sid=str(sid)
		sr=U.read(basedir+'/result.html')
		sr=sr.replace('{sec}',getsec())
	except Exception as e:sr=e
	# sr='6543'
	return {
	"content":sr,
	"code":235,
	"Cache-Control":"no-cache"
	}	
Example #13
0
def forwardReq(a):
    # url_path = urlparse(a.path).path
    # if not url_path == '/0':return a.send_not_found()
    # method U.msgbox(a.command)
    req = urlparse.urlparse(a.path).query
    reqs = urlparse.parse_qs(req, keep_blank_values=True)

    if len(reqs) == 0:
        a.send_response('text/html',
                        U.read(U.getModPath() + 'file/webControl.html'))
        # U.msgbox([i for i in sys.modules if 'webC' in i])
        U.r(sys.modules['qgb.N.webControl'])
        return

    from qgb import Win as w

    if len(reqs) == 1:
        # t=T.subLast(a.path,'t=','') or 0
        # t=int(t)
        t = int(reqs['t'][0])
        if t & WUP:
            for i in range(5):
                w.mouse_event(0, 0, t, move=False, abs=True)
        if t & WDOWN:
            for i in range(3):
                w.mouse_event(0, 0, t, move=False, abs=True)

        w.mouse_event(0, 0, t, move=False, abs=True)
        # a.send_response('text/html',w.getLastErr())
        # a.wfile.write('\r\n'*5)
        return
    if len(reqs) == 2:
        x = int(reqs['x'][0])
        y = int(reqs['y'][0])
        w.setCurPos(x, y)
        return
Example #14
0
def click(w, x, y=giClickY):
    istop()
    try:
        w.Maximize()
        r = w.Rectangle()
        if x > (r.right - r.left) - 200 - 65:
            return
        w.click_input(coords=[x, y])


#RuntimeError: Window (hwnd=hwndwrapper.DialogWrapper - 'None', YandexBrowser_WidgetWin_1) is not responding!
    except Exception as e:
        print(e)
        U.sleep(5)
    U.p(x, end=' ')
    U.sleep(1)
Example #15
0
File: screen.py Project: QGB/pm
def loop():
	while(True):
		# U.msgbox(1)
		time.sleep(0.09)
		global top,tbg,iw,x0,y0
		x,y=U.getCursorPos()
		if(x==x0 and y==y0):
			time.sleep(0.1)
			# U.pln(x,y)
		x0=x;y0=y
		if(y>299+30 or x<620-30):
			# img= ImageGrab.grab((0+6,800-iw*2+6,iw*2,800))
			# img=ImageTk.PhotoImage(image=img)
			tbg['image'] =''
			# top.lower()
			time.sleep(0.1)
			continue
		# exit()
		
		# U.msgbox(2)
		img= ImageGrab.grab((x-iw,y-iw,x+iw,y+iw))
		img=ImageTk.PhotoImage(image=img)
		tbg['image'] =img 
Example #16
0
File: PVote.py Project: QGB/PVote
def vote(id='Error!',ip=''):
	ip=ip[0]
	if(SQLite.ip(ip)):
		ip='<br><br><br>Warning: IP %s HAVE ALREADY VOTED'%ip
	else:
		ip=''
	id=id[0]
	sid=int(id)+1;sid=str(sid)
	####  Vote logic####
	SQLite.vote(id)
	####################
	sv=U.read(basedir+'/vote.html')
	try:
		sv=sv.replace('{id}',sid)
		sv=sv.replace('{img}',getpath(id))
		sv=sv.replace('{des}',getdes(id)+ip)
	except Exception as e:sv=e
	
	return {
	"content":sv,
	"code":235,
	"Cache-Control":"no-cache"
	}	
Example #17
0
gsTitle = '- Yandex Browser'
giClickY = 34
from qgb import py, Win, U, T, N, F
# U=py.importU()
from pywinauto import Application
app = Application()
pids = [i[0] for i in Win.getAllWindows() if i[1].endswith(gsTitle)]
ws = []
for i in pids:
    i = app.Connect(handle=i)
    i = i.windows()
    for w in i:
        if w.WindowText().endswith(gsTitle):
            if w not in ws: ws.append(w)
# F.dill_dump(obj=ws,file='browserGo_ws')
U.pprint(U.il(ws))
if U.ct(ws) == 0: Win.setCurPos(giClickY, giClickY)


def istop():
    x, y = Win.getCurPos()
    if y > giClickY * 6 or y > ih - 9:
        U.pln(iw, ih, i, 'Cur:', x, y)
        U.exit()


def click(w, x, y=giClickY):
    istop()
    try:
        w.Maximize()
        r = w.Rectangle()
Example #18
0
File: tk.py Project: QGB/pm
import sys,time,os
from qgb import U
ls=[]

from Tkinter import *
top=Tk()
b=Button(top,text='click')
b.place(relx=0, rely=0.5, relwidth=1, relheight=0.1)

def foo(event):
	btn=event.widget
	btn['text']='clicked!'
	btn['bg']='#008000'
	U.pln( top.geometry())

b.bind('<Button>',foo)

U.pln(top.keys())


top.mainloop()
Example #19
0
File: __main__.py Project: QGB/QPSU
import sys
from pathlib import Path
gsqp = Path(__file__).absolute().parent.parent.absolute().__str__()
if gsqp not in sys.path: sys.path.append(gsqp)  #py3 works

if len(sys.argv) > 1:
    cmd = sys.argv[1].lower()
    if cmd in ['eval', 'oncall', 'rpc', 'rpcserver']:
        from qgb import N
        N.rpcServer()
    if cmd in ['up', 'upload', 'upserver', 'uploadserver']:
        from qgb import N
        N.uploadServer()

if len(sys.argv) == 1:
    from qgb import U
    U.main()

# from __future__ import absolute_import
# try:
# from qgb import U
# except:
# from . import U
Example #20
0
File: fn.py Project: QGB/PVote
from qgb import U, T, Clipboard
import os, sys

basedir = os.path.dirname(__file__)

path = basedir + """\DEMO_files"""
sfd = basedir + "/vote.html"
sd = U.read(sfd)
for f in os.listdir(path):
    if not f.endswith("jpg"):
        continue
    # if :continue
    i = -1
    try:
        i = int(f[:1])
    except:
        continue
    sd = sd.replace(f[1:], f)
    # print f
print sd
U.write(sfd, sd)
U.x()
Example #21
0
File: setcb-sina.py Project: QGB/pm
def foo(event):
	btn=event.widget
	s=btn['text']
	U.pln(s )
	cb.set(s)
Example #22
0
File: dot.py Project: QGB/pm
import random
# print random.randint(1, 10)
import string
ls=string.lowercase
from qgb import U,T

U.setOut('d:/test/dot/b.dot')
print '''
digraph G {
    main -> parse -> execute;
'''
for i in range(len(ls)):
    print "%s->%s->%s->%s"%(ls[i],ls[min(25,i+1)],ls[random.randint(0, 25)],ls[random.randint(0, 25)])
	
print '''
    execute -> compare;
}
'''
Example #23
0
File: p1.py Project: QGB/pm
def p():
	for threadId, stack in sys._current_frames().items():
		print threadId
	U.pln()
Example #24
0
File: win32.py Project: QGB/pm
def window_enum_handler(hwnd, resultList):
	if win32gui.IsWindowVisible(hwnd) and win32gui.GetWindowText(hwnd) != '':
		resultList.append((hwnd, win32gui.GetWindowText(hwnd)))

def get_app_list(handles=[]):
	mlst=[]
	win32gui.EnumWindows(window_enum_handler, handles)
	for handle in handles:
		mlst.append(handle)
	return mlst
	
MAIN_HWND = 0
def is_win_ok(hwnd, starttext):
	s = win32gui.GetWindowText(hwnd)
	if s.startswith(starttext):
		print (s)
		global MAIN_HWND
		MAIN_HWND = hwnd
		return None
	return 1

	
appwindows = get_app_list()
for i in appwindows:
	print i
	# print type(i),type(i[0]),type(i[1])
	win32gui.EnumChildWindows(0, is_win_ok, 'GoAgent ')
	# win32gui.ShowWindow(, 0)
	U.msgbox(type(MAIN_HWND))
	# if(i[1][:5]=='start'):
Example #25
0
File: p1.py Project: QGB/pm
from Tkinter import *
from threading import *
import threading,multiprocessing.dummy,time
from qgb import U,T



print U.getThreads()
U.x()
def p():
	for threadId, stack in sys._current_frames().items():
		print threadId
	U.pln()

def mp():
	while(True):
		p()
		time.sleep(2.5)

Thread(target=mp).start()

# exit()
# print threading.__all__ 
n1,n2=0,0
for i in range(2):
	U.pln(activeCount(),currentThread())
	t=Tk()
	b=Button(t,text='click')
	b.place(relx=0, rely=0.5, relwidth=1, relheight=0.1)

	def foo(event):
Example #26
0
File: z-reply.py Project: QGB/pm
def p(al):
	for i in al:
		print i
	U.pln()
Example #27
0
def singleback(msg):
	#U.pln(msg)
	U.msgbox(msg)
	print msg
	U.p()
Example #28
0
File: PVote.py Project: QGB/PVote
	sc="no-cache"
	icode=235
	if '{0}'.endswith('bg.jpg'):sc='max-age='+str(60*10)#增加读取文件判断有问题,复杂度提升
	
	return {{
	"content":dsf['s{1}'],
	"code":icode,
	"Cache-Control":sc
	}}
'''
def search(path):
	for filename in os.listdir(path):
		fp = os.path.join(path, filename)
		if os.path.isfile(fp):
			for i in types:
				if filename.endswith('.'+i):
					if filename.endswith('jpg') and filename[:1] in '1,2,3,4,5,6,7,8,9,0'.split(','):
						if filename not in gysimg:gysimg.append(filename)
				
					filename=T.sub(fp,basedir,'')[1:].replace('\\','/')
					funcname='fr_'+T.varname(filename)
					exec(sfr.format(filename,funcname))
					print filename,funcname
					break
		elif os.path.isdir(fp):
			search(fp)
search(basedir)

ip="0.0.0.0";port=80
U.pln(ip,port)
serve(ip,port)
Example #29
0
			while True:  
				buf = connection.recv(4096)    
				print "Get value " +buf   
				print "send welcome"  
				connection.send('welcome to server!'+buf)    
				singleback(buf)
				U.p()
		except Exception as e:  #如果建立连接后,该连接在设定的时间内无数据发来,则time out  
			 print e  
			 continue

		print "closing one connection" #当一个连接监听循环退出后,连接可以关掉  
		connection.close()   




def t(f,m):
	f(m)
	
from threading import *

# t(singleback,65432)	

# Thread(target=t,args=[singleback,65432]).start()

print U.isingle(2233)
U.single(port=2233,callback=singleback)

print U.isingle(2233)
U.pln(U.__mm)
Example #30
0
File: zcol.py Project: QGB/pm
	
	# U.pln(url) 
	# fh=open('%s.html'%i,'wb')
	# fh.write(urllib2.urlopen(url).read())
	# fh.close
	cmd='''Zcolcurl.bat %s'''%(i)
	# cmd=T.batencode(cmd)
	# print cmd
	os.system(cmd)
	# exit()
	# if(os.path.getsize(fn)<5):i-=1;continue
	
	# sh=open(fn).read()
	# if(sh.find("answer-date-link-wrap")==-1):break
	
	U.pln(i) 
	if(i>16):exit()

i=0
while(True):
	st=''
	i+=1
	try:st=U.read('%s.json'%i)
	except:break
	exec('''st=%s'''%st)
	st=st['msg'][1]
	print i,st[233:311]
	U.helphtml(str(''))
	os.system('start http://www.qq.com/')
	exit()
	
Example #31
0
def set_color():
    color = '#' + ''.join([U.random_choice(gcolor_range)
                           for j in range(6)]) + gcolor_alpha
    gcolor.set(color)
Example #32
0
#coding=utf-8
import sys
if 'qgb.U' in sys.modules: U = sys.modules['qgb.U']
elif 'U' in sys.modules: U = sys.modules['U']
else:
    from sys import path as _p
    _p.insert(-1, _p[0][:-1 - 1 - 3 - 1])  # python2.7\\qgb\\N
    from qgb import U
    if U.iswin(): from qgb import Win
# from qgb.Win.KeyCode import *
T = U.T
import urlparse

# U.pln(  U.read(U.getModPath()+'file/webControl.html')

WDOWN = 0x200
WUP = 0x400


def forwardReq(a):
    # url_path = urlparse(a.path).path
    # if not url_path == '/0':return a.send_not_found()
    # method U.msgbox(a.command)
    req = urlparse.urlparse(a.path).query
    reqs = urlparse.parse_qs(req, keep_blank_values=True)

    if len(reqs) == 0:
        a.send_response('text/html',
                        U.read(U.getModPath() + 'file/webControl.html'))
        # U.msgbox([i for i in sys.modules if 'webC' in i])
        U.r(sys.modules['qgb.N.webControl'])
Example #33
0
File: screen.py Project: QGB/pm
# pdb.set_trace() 


io=0
def singleback(msg):
	global io,top
	io+=1
	if(io%2==0):top.lower()
	else:top.attributes('-topmost',1)
	
	
	


# U.x()
if(U.notsingle(2233)):U.x(msg='twice')


		#U.x()
	
U.single(port=2233,callback=singleback)
# help(ImageGrab.grab)


w, h = 1113-620,259
img = ImageGrab.grab((620,0,1113,259))



		
top=Tk()
Example #34
0
	def __call__(self, request):
		q=request.META['QUERY_STRING']
		q=('?'+q) if q else ''
		url=request.path+q
		try:
			# if not U.DEBUG:raise Exception(request._stream.stream)
			ip=''
			try:
				if U.isLinux():ip,port=request._stream.stream.stream.raw._sock.getpeername()
				else          :ip,port=request._stream.stream.raw._sock.getpeername()
			except:
				ip=request.META[ 'REMOTE_ADDR']
				port=py.No("can't access stream.raw._sock.getpeername() ")
				
			ip=N.ip_location(ip,reverse_ip=True)
			
			log_obj={
				'url': url,
				'ua': request.environ['HTTP_USER_AGENT'],
				'data':request.body,
				'ip':ip,
				'port':port,
			}
			self.s=log_obj
			F.write('log/8000/'+U.stime(),U.pformat(log_obj))
		except Exception as e:
			self.e=e
			F.write('log/8000/e'+U.stime(),U.pformat(e))
			
		if url.startswith('/#rpc\n'):
			self.g['self']=self #test?
			
			request.url=url
			self.g['q']=request
			
			response = HttpResponse()
			response['content-type'] = 'text/plain; charset=utf-8'
			response['X-XSS-Protection']='0'
			response['Access-Control-Allow-Origin'] = '*'
			self.g['p']=response
			
			r=U.execStrResult(url[1:],globals=self.g)
			if not response.content:
				response.content=r
			return response

		# Code to be executed for each request before
		# the view (and later middleware) are called.
		response = self.get_response(request)
		# Code to be executed for each request/response after
		# the view is called.
		return response
		
# from django import template
# register = template.Library()

# @register.tag(name='eval')
# def do_eval(parser, token):
	# "Usage: {% eval %}1 + 1{% endeval %}"

	# nodelist = parser.parse(('endeval',))

	# class EvalNode(template.Node):
		# def render(self, context):
			# return eval(nodelist.render(context))

	# parser.delete_first_token()
	# return EvalNode()
Example #35
0
File: setcb-sina.py Project: QGB/pm
import sys,time,os
from qgb import U,T,clipboard as cb
ls=U.read('d:/qgbkeyset.txt').split('\n')
# U.pprint(ls) 
# exit()

from Tkinter import *
top=Tk()
def foo(event):
	btn=event.widget
	s=btn['text']
	U.pln(s )
	cb.set(s)


lb=[]
i=0
for si in ls:
	if(len(si)<3):continue
	b=Button(top,text=si)
	ih=20
	b.place(relx=((i%5*1.0)/5), y=0, relwidth=0.2, height=ih)
	b.bind('<Button>',foo)
	i+=1

top.geometry("%dx%d+%d+%d" % (333,111,11,333,))
top.mainloop()
Example #36
0
File: othello.py Project: QGB/pm
	def p(s):
		for i in range(len(s.y)):
			for j in range(len(s.y[i])):
				U.p(s.y[i][j],' ')
			print
Example #37
0
import sys
'qgb.U' in sys.modules or sys.path.append('C:/QGB/babun/cygwin/bin/')
from qgb import U, T, N, F, py

from threading import Lock
from flask import Flask, render_template, session, request, copy_current_request_context
from flask_socketio import SocketIO, emit, join_room, leave_room, close_room, rooms, disconnect

# Set this variable to "threading", "eventlet" or "gevent" to test the
# different async modes, or leave it set to None for the application to choose
# the best option based on installed packages.
async_mode = None

app = Flask(__name__)
app.jinja_loader.searchpath.append(U.pwd())
app.config['SECRET_KEY'] = 'secret!'
socketio = SocketIO(app, async_mode=async_mode)
thread = None
thread_lock = Lock()

N.rpcServer(locals=globals(), globals=globals(), app=app, key='-')


def background_thread():
    """Example of how to send server generated events to clients."""
    count = 0
    while True:
        socketio.sleep(10)
        count += 1
        socketio.emit('my_response', {
            'data': 'Server generated event',
Example #38
0
File: othello.py Project: QGB/pm
		def start(s,event):
			#print dir(s.txtim)
			print U.fields(s.txtim)
			U.pln( )
Example #39
0
s=open(r"D:\test\zys.html").read()
sp=bs(s,"html.parser" ) 

#class="in-reply-to ng-hide"report(comment)
# for j in sp.find_all(attrs={'class':"in-reply-to ng-hide"}):
	# j.decompose()  
for j in sp.find_all(attrs={'ng-if':"canReply(comment)"}):
	j.decompose()  
for j in sp.find_all(attrs={'ng-click':"report(comment)"}):
	j.decompose()  

sbr='<br><br><br><br><br><br><br><br><br><br><br><br>'
# open(r"D:\test\zys0.html",'wb').wite(sp.encode('gbk'))
ls=[]
U.setOut('d:/test/dot/z.dot')
print 'digraph G {'
for i in sp.find_all(attrs={"class":"comment-hd"},limit=344):
	name,href,rto=None,None,None
	# print i.text.encode('gbk')
	for j in i.find_all():
		# print j.get('class')
		if(str(j.get('class')).find(u'in-reply-to')>0):
			rto=j.find(attrs={"class":"ng-binding"})
			# rto=rto.get('href')
			# rto=str(rto)
			if(len(rto)<1):rto=None
			continue
			
		if(str(j.get('href')).find('http://www.zhihu.com/people/')!=-1):
			href=j.get('href');href=str(href)
Example #40
0
File: othello.py Project: QGB/pm
		def exit(s,event):
			U.x()
Example #41
0
File: tk.py Project: QGB/pm
def foo(event):
	btn=event.widget
	btn['text']='clicked!'
	btn['bg']='#008000'
	U.pln( top.geometry())
Example #42
0
def echo(msg):
	emit('r',msg)
	print("msg:" ,U.execResult(msg,locals=locals(),globals=globals()) )
Example #43
0
def istop():
    x, y = Win.getCurPos()
    if y > giClickY * 6 or y > ih - 9:
        U.pln(iw, ih, i, 'Cur:', x, y)
        U.exit()
Example #44
0

def log(parse):
    if not ('wordExcelPdf_download' in parse._remote_url):
        return
    if getattr(parse, 'remote_response', ''):
        if getattr(parse.remote_response, 'headers', ''):
            U.pprint(parse.remote_response.headers)

    r = '=' * 99
    U.log(r)


##############################
sys.dup = F.dill_load(file=U.gst + '0731.mfyq.dup.v3') or {}
U.log(__name__)
debug = 0
if __name__ != '__main__' and not debug:  #方便调试
    N.rpcServer(port=my_host_port, app=app, key='rpc')
    # from flask.ext.admin import Admin
    # admin = Admin(app)
    ##############################
    gp = F.Path(__file__).absolute().parent.joinpath('static')

    @app.route('/extdomains/0731.mfyq.com.cn/static/<path:f>')
    @app.route('/static/<path:f>')
    def static_file(f='', *a, **ka):
        p = gp.joinpath(f)
        if f.endswith('.css'):
            set_color()
            s = replace_raw(p.read_text(), regex=False)
Example #45
0
File: excel-xlrd.py Project: QGB/pm
#coding=utf-8
from qgb import U,T
import xlrd
U.helphtml(xlrd)
fn=r"E:\HT\Hacked Team\Amministrazione\08 - VIAGGI\3 - Note Spese\2013\Costi 2013.xlsx"
# fn=r"C:\RaLC三维仿真软件\实用工具\LOG分析工具\LOG分析工具2.xls"
# fn=r"E:\HT\Hacked Team\Amministrazione\01 - CLIENTI\7 - Difensiva\ANAGRAFICA FORNITORE x Trentino Trasporti.xls"
# fn=r"E:\HT\Hacked Team\Amministrazione\01 - CLIENTI\6 - Offensiva\OLD\Budget_Business Plan_2014-2018_Template - USA - SGP.xlsx"
# fn=r"C:\RaLC三维仿真软件\实用工具\XML変換工具\XML変換工具.xls"
fn=r"D:\Test\te.xls"
data = xlrd.open_workbook(fn)

# U.helphtml(data)
ctype = 1
value = 'aaaaaa'
ss=data.sheets()
for table in ss:
	for i in range(table.nrows ):
		table.put_cell(0, 0, ctype, value, 0)
		# U.helphtml(table.put_cell);exit()
		print str(table.row_values(i)).decode().encode('gbk')

Example #46
0
File: TkTextDoc.py Project: QGB/pm
# coding=utf-8
ml=['_Misc__winfo_getint', '_Misc__winfo_parseitem', '__contains__', '__doc__', '__getitem__', '__init__', '__module__', '__setitem__', '__str__', '_bind', '_configure', '_displayof', '_do', '_getboolean', '_getconfigure', '_getconfigure1', '_getdoubles', '_getints', '_grid_configure', '_gridconvvalue', '_name', '_nametowidget', '_noarg_', '_options', '_register', '_report_exception', '_root', '_setup', '_subst_format', '_subst_format_str', '_substitute', '_tclCommands', '_w', '_windowingsystem', 'after', 'after_cancel', 'after_idle', 'bbox', 'bell', 'bind', 'bind_all', 'bind_class', 'bindtags', 'cget', 'children', 'clipboard_append', 'clipboard_clear', 'clipboard_get', 'colormodel', 'columnconfigure', 'compare', 'config', 'configure', 'debug', 'delete', 'deletecommand', 'destroy', 'dlineinfo', 'dump', 'edit', 'edit_modified', 'edit_redo', 'edit_reset', 'edit_separator', 'edit_undo', 'event_add', 'event_delete', 'event_generate', 'event_info', 'focus', 'focus_displayof', 'focus_force', 'focus_get', 'focus_lastfor', 'focus_set', 'forget', 'get', 'getboolean', 'getdouble', 'getint', 'getvar', 'grab_current', 'grab_release', 'grab_set', 'grab_set_global', 'grab_status', 'grid', 'grid_bbox', 'grid_columnconfigure', 'grid_configure', 'grid_forget', 'grid_info', 'grid_location', 'grid_propagate', 'grid_remove', 'grid_rowconfigure', 'grid_size', 'grid_slaves', 'image_cget', 'image_configure', 'image_create', 'image_names', 'image_types', 'index', 'info', 'insert', 'keys', 'lift', 'location', 'lower', 'mainloop', 'mark_gravity', 'mark_names', 'mark_next', 'mark_previous', 'mark_set', 'mark_unset', 'master', 'nametowidget', 'option_add', 'option_clear', 'option_get', 'option_readfile', 'pack', 'pack_configure', 'pack_forget', 'pack_info', 'pack_propagate', 'pack_slaves', 'place', 'place_configure', 'place_forget', 'place_info', 'place_slaves', 'propagate', 'quit', 'register', 'rowconfigure', 'scan_dragto', 'scan_mark', 'search', 'see', 'selection_clear', 'selection_get', 'selection_handle', 'selection_own', 'selection_own_get', 'send', 'setvar', 'size', 'slaves', 'tag_add', 'tag_bind', 'tag_cget', 'tag_config', 'tag_configure', 'tag_delete', 'tag_lower', 'tag_names', 'tag_nextrange', 'tag_prevrange', 'tag_raise', 'tag_ranges', 'tag_remove', 'tag_unbind', 'tk', 'tk_bisque', 'tk_focusFollowsMouse', 'tk_focusNext', 'tk_focusPrev', 'tk_menuBar', 'tk_setPalette', 'tk_strictMotif', 'tk_textBackspace', 'tk_textIndexCloser', 'tk_textResetAnchor', 'tk_textSelectTo', 'tkraise', 'unbind', 'unbind_all', 'unbind_class', 'update', 'update_idletasks', 'wait_variable', 'wait_visibility', 'wait_window', 'waitvar', 'widgetName', 'window_cget', 'window_config', 'window_configure', 'window_create', 'window_names', 'winfo_atom', 'winfo_atomname', 'winfo_cells', 'winfo_children', 'winfo_class', 'winfo_colormapfull', 'winfo_containing', 'winfo_depth', 'winfo_exists', 'winfo_fpixels', 'winfo_geometry', 'winfo_height', 'winfo_id', 'winfo_interps', 'winfo_ismapped', 'winfo_manager', 'winfo_name', 'winfo_parent', 'winfo_pathname', 'winfo_pixels', 'winfo_pointerx', 'winfo_pointerxy', 'winfo_pointery', 'winfo_reqheight', 'winfo_reqwidth', 'winfo_rgb', 'winfo_rootx', 'winfo_rooty', 'winfo_screen', 'winfo_screencells', 'winfo_screendepth', 'winfo_screenheight', 'winfo_screenmmheight', 'winfo_screenmmwidth', 'winfo_screenvisual', 'winfo_screenwidth', 'winfo_server', 'winfo_toplevel', 'winfo_viewable', 'winfo_visual', 'winfo_visualid', 'winfo_visualsavailable', 'winfo_vrootheight', 'winfo_vrootwidth', 'winfo_vrootx', 'winfo_vrooty', 'winfo_width', 'winfo_x', 'winfo_y', 'xview', 'xview_moveto', 'xview_scroll', 'yview', 'yview_moveto', 'yview_pickplace', 'yview_scroll']

mld='''
[('_Misc__winfo_getint', <bound method Text.__winfo_getint of <Tkinter.Text instance at 0x00CDCB98>>), ('_Misc__winfo_parseitem', <bound method Text.__winfo_parseitem of <Tkinter.Text instance at 0x00CDCB98>>), ('__contains__', <bound method Text.__contains__ of <Tkinter.Text instance at 0x00CDCB98>>), ('__doc__', 'Text widget which can display text in various forms.'), ('__getitem__', <bound method Text.cget of <Tkinter.Text instance at 0x00CDCB98>>), ('__init__', <bound method Text.__init__ of <Tkinter.Text instance at 0x00CDCB98>>), ('__module__', 'Tkinter'), ('__setitem__', <bound method Text.__setitem__ of <Tkinter.Text instance at 0x00CDCB98>>), ('__str__', <bound method Text.__str__ of <Tkinter.Text instance at 0x00CDCB98>>), ('_bind', <bound method Text._bind of <Tkinter.Text instance at 0x00CDCB98>>), ('_configure', <bound method Text._configure of <Tkinter.Text instance at 0x00CDCB98>>), ('_displayof', <bound method Text._displayof of <Tkinter.Text instance at 0x00CDCB98>>), ('_do', <bound method Text._do of <Tkinter.Text instance at 0x00CDCB98>>), ('_getboolean', <bound method Text._getboolean of <Tkinter.Text instance at 0x00CDCB98>>), ('_getconfigure', <bound method Text._getconfigure of <Tkinter.Text instance at 0x00CDCB98>>), ('_getconfigure1', <bound method Text._getconfigure1 of <Tkinter.Text instance at 0x00CDCB98>>), ('_getdoubles', <bound method Text._getdoubles of <Tkinter.Text instance at 0x00CDCB98>>), ('_getints', <bound method Text._getints of <Tkinter.Text instance at 0x00CDCB98>>), ('_grid_configure', <bound method Text._grid_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('_gridconvvalue', <bound method Text._gridconvvalue of <Tkinter.Text instance at 0x00CDCB98>>), ('_name', '13487000'), ('_nametowidget', <bound method Text.nametowidget of <Tkinter.Text instance at 0x00CDCB98>>), ('_noarg_', ['_noarg_']), ('_options', <bound method Text._options of <Tkinter.Text instance at 0x00CDCB98>>), ('_register', <bound method Text._register of <Tkinter.Text instance at 0x00CDCB98>>), ('_report_exception', <bound method Text._report_exception of <Tkinter.Text instance at 0x00CDCB98>>), ('_root', <bound method Text._root of <Tkinter.Text instance at 0x00CDCB98>>), ('_setup', <bound method Text._setup of <Tkinter.Text instance at 0x00CDCB98>>), ('_subst_format', ('%#', '%b', '%f', '%h', '%k', '%s', '%t', '%w', '%x', '%y', '%A', '%E', '%K', '%N', '%W', '%T', '%X', '%Y', '%D')), ('_subst_format_str', '%# %b %f %h %k %s %t %w %x %y %A %E %K %N %W %T %X %Y %D'), ('_substitute', <bound method Text._substitute of <Tkinter.Text instance at 0x00CDCB98>>), ('_tclCommands', []), ('_w', '.13486840.13487000'), ('_windowingsystem', 'win32'), ('after', <bound method Text.after of <Tkinter.Text instance at 0x00CDCB98>>), ('after_cancel', <bound method Text.after_cancel of <Tkinter.Text instance at 0x00CDCB98>>), ('after_idle', <bound method Text.after_idle of <Tkinter.Text instance at 0x00CDCB98>>), ('bbox', <bound method Text.bbox of <Tkinter.Text instance at 0x00CDCB98>>), ('bell', <bound method Text.bell of <Tkinter.Text instance at 0x00CDCB98>>), ('bind', <bound method Text.bind of <Tkinter.Text instance at 0x00CDCB98>>), ('bind_all', <bound method Text.bind_all of <Tkinter.Text instance at 0x00CDCB98>>), ('bind_class', <bound method Text.bind_class of <Tkinter.Text instance at 0x00CDCB98>>), ('bindtags', <bound method Text.bindtags of <Tkinter.Text instance at 0x00CDCB98>>), ('cget', <bound method Text.cget of <Tkinter.Text instance at 0x00CDCB98>>), ('children', {}), ('clipboard_append', <bound method Text.clipboard_append of <Tkinter.Text instance at 0x00CDCB98>>), ('clipboard_clear', <bound method Text.clipboard_clear of <Tkinter.Text instance at 0x00CDCB98>>), ('clipboard_get', <bound method Text.clipboard_get of <Tkinter.Text instance at 0x00CDCB98>>), ('colormodel', <bound method Text.colormodel of <Tkinter.Text instance at 0x00CDCB98>>), ('columnconfigure', <bound method Text.grid_columnconfigure of <Tkinter.Text instance at 0x00CDCB98>>), ('compare', <bound method Text.compare of <Tkinter.Text instance at 0x00CDCB98>>), ('config', <bound method Text.configure of <Tkinter.Text instance at 0x00CDCB98>>), ('configure', <bound method Text.configure of <Tkinter.Text instance at 0x00CDCB98>>), ('debug', <bound method Text.debug of <Tkinter.Text instance at 0x00CDCB98>>), ('delete', <bound method Text.delete of <Tkinter.Text instance at 0x00CDCB98>>), ('deletecommand', <bound method Text.deletecommand of <Tkinter.Text instance at 0x00CDCB98>>), ('destroy', <bound method Text.destroy of <Tkinter.Text instance at 0x00CDCB98>>), ('dlineinfo', <bound method Text.dlineinfo of <Tkinter.Text instance at 0x00CDCB98>>), ('dump', <bound method Text.dump of <Tkinter.Text instance at 0x00CDCB98>>), ('edit', <bound method Text.edit of <Tkinter.Text instance at 0x00CDCB98>>), ('edit_modified', <bound method Text.edit_modified of <Tkinter.Text instance at 0x00CDCB98>>), ('edit_redo', <bound method Text.edit_redo of <Tkinter.Text instance at 0x00CDCB98>>), ('edit_reset', <bound method Text.edit_reset of <Tkinter.Text instance at 0x00CDCB98>>), ('edit_separator', <bound method Text.edit_separator of <Tkinter.Text instance at 0x00CDCB98>>), ('edit_undo', <bound method Text.edit_undo of <Tkinter.Text instance at 0x00CDCB98>>), ('event_add', <bound method Text.event_add of <Tkinter.Text instance at 0x00CDCB98>>), ('event_delete', <bound method Text.event_delete of <Tkinter.Text instance at 0x00CDCB98>>), ('event_generate', <bound method Text.event_generate of <Tkinter.Text instance at 0x00CDCB98>>), ('event_info', <bound method Text.event_info of <Tkinter.Text instance at 0x00CDCB98>>), ('focus', <bound method Text.focus_set of <Tkinter.Text instance at 0x00CDCB98>>), ('focus_displayof', <bound method Text.focus_displayof of <Tkinter.Text instance at 0x00CDCB98>>), ('focus_force', <bound method Text.focus_force of <Tkinter.Text instance at 0x00CDCB98>>), ('focus_get', <bound method Text.focus_get of <Tkinter.Text instance at 0x00CDCB98>>), ('focus_lastfor', <bound method Text.focus_lastfor of <Tkinter.Text instance at 0x00CDCB98>>), ('focus_set', <bound method Text.focus_set of <Tkinter.Text instance at 0x00CDCB98>>), ('forget', <bound method Text.pack_forget of <Tkinter.Text instance at 0x00CDCB98>>), ('get', <bound method Text.get of <Tkinter.Text instance at 0x00CDCB98>>), ('getboolean', <bound method Text.getboolean of <Tkinter.Text instance at 0x00CDCB98>>), ('getdouble', <type 'float'>), ('getint', <type 'int'>), ('getvar', <bound method Text.getvar of <Tkinter.Text instance at 0x00CDCB98>>), ('grab_current', <bound method Text.grab_current of <Tkinter.Text instance at 0x00CDCB98>>), ('grab_release', <bound method Text.grab_release of <Tkinter.Text instance at 0x00CDCB98>>), ('grab_set', <bound method Text.grab_set of <Tkinter.Text instance at 0x00CDCB98>>), ('grab_set_global', <bound method Text.grab_set_global of <Tkinter.Text instance at 0x00CDCB98>>), ('grab_status', <bound method Text.grab_status of <Tkinter.Text instance at 0x00CDCB98>>), ('grid', <bound method Text.grid_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('grid_bbox', <bound method Text.grid_bbox of <Tkinter.Text instance at 0x00CDCB98>>), ('grid_columnconfigure', <bound method Text.grid_columnconfigure of <Tkinter.Text instance at 0x00CDCB98>>), ('grid_configure', <bound method Text.grid_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('grid_forget', <bound method Text.grid_forget of <Tkinter.Text instance at 0x00CDCB98>>), ('grid_info', <bound method Text.grid_info of <Tkinter.Text instance at 0x00CDCB98>>), ('grid_location', <bound method Text.grid_location of <Tkinter.Text instance at 0x00CDCB98>>), ('grid_propagate', <bound method Text.grid_propagate of <Tkinter.Text instance at 0x00CDCB98>>), ('grid_remove', <bound method Text.grid_remove of <Tkinter.Text instance at 0x00CDCB98>>), ('grid_rowconfigure', <bound method Text.grid_rowconfigure of <Tkinter.Text instance at 0x00CDCB98>>), ('grid_size', <bound method Text.grid_size of <Tkinter.Text instance at 0x00CDCB98>>), ('grid_slaves', <bound method Text.grid_slaves of <Tkinter.Text instance at 0x00CDCB98>>), ('image_cget', <bound method Text.image_cget of <Tkinter.Text instance at 0x00CDCB98>>), ('image_configure', <bound method Text.image_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('image_create', <bound method Text.image_create of <Tkinter.Text instance at 0x00CDCB98>>), ('image_names', <bound method Text.image_names of <Tkinter.Text instance at 0x00CDCB98>>), ('image_types', <bound method Text.image_types of <Tkinter.Text instance at 0x00CDCB98>>), ('index', <bound method Text.index of <Tkinter.Text instance at 0x00CDCB98>>), ('info', <bound method Text.pack_info of <Tkinter.Text instance at 0x00CDCB98>>), ('insert', <bound method Text.insert of <Tkinter.Text instance at 0x00CDCB98>>), ('keys', <bound method Text.keys of <Tkinter.Text instance at 0x00CDCB98>>), ('lift', <bound method Text.tkraise of <Tkinter.Text instance at 0x00CDCB98>>), ('location', <bound method Text.grid_location of <Tkinter.Text instance at 0x00CDCB98>>), ('lower', <bound method Text.lower of <Tkinter.Text instance at 0x00CDCB98>>), ('mainloop', <bound method Text.mainloop of <Tkinter.Text instance at 0x00CDCB98>>), ('mark_gravity', <bound method Text.mark_gravity of <Tkinter.Text instance at 0x00CDCB98>>), ('mark_names', <bound method Text.mark_names of <Tkinter.Text instance at 0x00CDCB98>>), ('mark_next', <bound method Text.mark_next of <Tkinter.Text instance at 0x00CDCB98>>), ('mark_previous', <bound method Text.mark_previous of <Tkinter.Text instance at 0x00CDCB98>>), ('mark_set', <bound method Text.mark_set of <Tkinter.Text instance at 0x00CDCB98>>), ('mark_unset', <bound method Text.mark_unset of <Tkinter.Text instance at 0x00CDCB98>>), ('master', <Tkinter.Toplevel instance at 0x00CDCAF8>), ('nametowidget', <bound method Text.nametowidget of <Tkinter.Text instance at 0x00CDCB98>>), ('option_add', <bound method Text.option_add of <Tkinter.Text instance at 0x00CDCB98>>), ('option_clear', <bound method Text.option_clear of <Tkinter.Text instance at 0x00CDCB98>>), ('option_get', <bound method Text.option_get of <Tkinter.Text instance at 0x00CDCB98>>), ('option_readfile', <bound method Text.option_readfile of <Tkinter.Text instance at 0x00CDCB98>>), ('pack', <bound method Text.pack_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('pack_configure', <bound method Text.pack_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('pack_forget', <bound method Text.pack_forget of <Tkinter.Text instance at 0x00CDCB98>>), ('pack_info', <bound method Text.pack_info of <Tkinter.Text instance at 0x00CDCB98>>), ('pack_propagate', <bound method Text.pack_propagate of <Tkinter.Text instance at 0x00CDCB98>>), ('pack_slaves', <bound method Text.pack_slaves of <Tkinter.Text instance at 0x00CDCB98>>), ('place', <bound method Text.place_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('place_configure', <bound method Text.place_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('place_forget', <bound method Text.place_forget of <Tkinter.Text instance at 0x00CDCB98>>), ('place_info', <bound method Text.place_info of <Tkinter.Text instance at 0x00CDCB98>>), ('place_slaves', <bound method Text.place_slaves of <Tkinter.Text instance at 0x00CDCB98>>), ('propagate', <bound method Text.pack_propagate of <Tkinter.Text instance at 0x00CDCB98>>), ('quit', <bound method Text.quit of <Tkinter.Text instance at 0x00CDCB98>>), ('register', <bound method Text._register of <Tkinter.Text instance at 0x00CDCB98>>), ('rowconfigure', <bound method Text.grid_rowconfigure of <Tkinter.Text instance at 0x00CDCB98>>), ('scan_dragto', <bound method Text.scan_dragto of <Tkinter.Text instance at 0x00CDCB98>>), ('scan_mark', <bound method Text.scan_mark of <Tkinter.Text instance at 0x00CDCB98>>), ('search', <bound method Text.search of <Tkinter.Text instance at 0x00CDCB98>>), ('see', <bound method Text.see of <Tkinter.Text instance at 0x00CDCB98>>), ('selection_clear', <bound method Text.selection_clear of <Tkinter.Text instance at 0x00CDCB98>>), ('selection_get', <bound method Text.selection_get of <Tkinter.Text instance at 0x00CDCB98>>), ('selection_handle', <bound method Text.selection_handle of <Tkinter.Text instance at 0x00CDCB98>>), ('selection_own', <bound method Text.selection_own of <Tkinter.Text instance at 0x00CDCB98>>), ('selection_own_get', <bound method Text.selection_own_get of <Tkinter.Text instance at 0x00CDCB98>>), ('send', <bound method Text.send of <Tkinter.Text instance at 0x00CDCB98>>), ('setvar', <bound method Text.setvar of <Tkinter.Text instance at 0x00CDCB98>>), ('size', <bound method Text.grid_size of <Tkinter.Text instance at 0x00CDCB98>>), ('slaves', <bound method Text.pack_slaves of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_add', <bound method Text.tag_add of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_bind', <bound method Text.tag_bind of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_cget', <bound method Text.tag_cget of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_config', <bound method Text.tag_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_configure', <bound method Text.tag_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_delete', <bound method Text.tag_delete of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_lower', <bound method Text.tag_lower of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_names', <bound method Text.tag_names of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_nextrange', <bound method Text.tag_nextrange of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_prevrange', <bound method Text.tag_prevrange of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_raise', <bound method Text.tag_raise of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_ranges', <bound method Text.tag_ranges of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_remove', <bound method Text.tag_remove of <Tkinter.Text instance at 0x00CDCB98>>), ('tag_unbind', <bound method Text.tag_unbind of <Tkinter.Text instance at 0x00CDCB98>>), ('tk', <tkapp object at 0x00C249B0>), ('tk_bisque', <bound method Text.tk_bisque of <Tkinter.Text instance at 0x00CDCB98>>), ('tk_focusFollowsMouse', <bound method Text.tk_focusFollowsMouse of <Tkinter.Text instance at 0x00CDCB98>>), ('tk_focusNext', <bound method Text.tk_focusNext of <Tkinter.Text instance at 0x00CDCB98>>), ('tk_focusPrev', <bound method Text.tk_focusPrev of <Tkinter.Text instance at 0x00CDCB98>>), ('tk_menuBar', <bound method Text.tk_menuBar of <Tkinter.Text instance at 0x00CDCB98>>), ('tk_setPalette', <bound method Text.tk_setPalette of <Tkinter.Text instance at 0x00CDCB98>>), ('tk_strictMotif', <bound method Text.tk_strictMotif of <Tkinter.Text instance at 0x00CDCB98>>), ('tk_textBackspace', <bound method Text.tk_textBackspace of <Tkinter.Text instance at 0x00CDCB98>>), ('tk_textIndexCloser', <bound method Text.tk_textIndexCloser of <Tkinter.Text instance at 0x00CDCB98>>), ('tk_textResetAnchor', <bound method Text.tk_textResetAnchor of <Tkinter.Text instance at 0x00CDCB98>>), ('tk_textSelectTo', <bound method Text.tk_textSelectTo of <Tkinter.Text instance at 0x00CDCB98>>), ('tkraise', <bound method Text.tkraise of <Tkinter.Text instance at 0x00CDCB98>>), ('unbind', <bound method Text.unbind of <Tkinter.Text instance at 0x00CDCB98>>), ('unbind_all', <bound method Text.unbind_all of <Tkinter.Text instance at 0x00CDCB98>>), ('unbind_class', <bound method Text.unbind_class of <Tkinter.Text instance at 0x00CDCB98>>), ('update', <bound method Text.update of <Tkinter.Text instance at 0x00CDCB98>>), ('update_idletasks', <bound method Text.update_idletasks of <Tkinter.Text instance at 0x00CDCB98>>), ('wait_variable', <bound method Text.wait_variable of <Tkinter.Text instance at 0x00CDCB98>>), ('wait_visibility', <bound method Text.wait_visibility of <Tkinter.Text instance at 0x00CDCB98>>), ('wait_window', <bound method Text.wait_window of <Tkinter.Text instance at 0x00CDCB98>>), ('waitvar', <bound method Text.wait_variable of <Tkinter.Text instance at 0x00CDCB98>>), ('widgetName', 'text'), ('window_cget', <bound method Text.window_cget of <Tkinter.Text instance at 0x00CDCB98>>), ('window_config', <bound method Text.window_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('window_configure', <bound method Text.window_configure of <Tkinter.Text instance at 0x00CDCB98>>), ('window_create', <bound method Text.window_create of <Tkinter.Text instance at 0x00CDCB98>>), ('window_names', <bound method Text.window_names of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_atom', <bound method Text.winfo_atom of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_atomname', <bound method Text.winfo_atomname of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_cells', <bound method Text.winfo_cells of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_children', <bound method Text.winfo_children of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_class', <bound method Text.winfo_class of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_colormapfull', <bound method Text.winfo_colormapfull of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_containing', <bound method Text.winfo_containing of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_depth', <bound method Text.winfo_depth of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_exists', <bound method Text.winfo_exists of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_fpixels', <bound method Text.winfo_fpixels of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_geometry', <bound method Text.winfo_geometry of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_height', <bound method Text.winfo_height of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_id', <bound method Text.winfo_id of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_interps', <bound method Text.winfo_interps of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_ismapped', <bound method Text.winfo_ismapped of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_manager', <bound method Text.winfo_manager of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_name', <bound method Text.winfo_name of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_parent', <bound method Text.winfo_parent of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_pathname', <bound method Text.winfo_pathname of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_pixels', <bound method Text.winfo_pixels of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_pointerx', <bound method Text.winfo_pointerx of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_pointerxy', <bound method Text.winfo_pointerxy of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_pointery', <bound method Text.winfo_pointery of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_reqheight', <bound method Text.winfo_reqheight of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_reqwidth', <bound method Text.winfo_reqwidth of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_rgb', <bound method Text.winfo_rgb of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_rootx', <bound method Text.winfo_rootx of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_rooty', <bound method Text.winfo_rooty of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_screen', <bound method Text.winfo_screen of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_screencells', <bound method Text.winfo_screencells of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_screendepth', <bound method Text.winfo_screendepth of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_screenheight', <bound method Text.winfo_screenheight of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_screenmmheight', <bound method Text.winfo_screenmmheight of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_screenmmwidth', <bound method Text.winfo_screenmmwidth of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_screenvisual', <bound method Text.winfo_screenvisual of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_screenwidth', <bound method Text.winfo_screenwidth of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_server', <bound method Text.winfo_server of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_toplevel', <bound method Text.winfo_toplevel of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_viewable', <bound method Text.winfo_viewable of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_visual', <bound method Text.winfo_visual of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_visualid', <bound method Text.winfo_visualid of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_visualsavailable', <bound method Text.winfo_visualsavailable of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_vrootheight', <bound method Text.winfo_vrootheight of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_vrootwidth', <bound method Text.winfo_vrootwidth of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_vrootx', <bound method Text.winfo_vrootx of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_vrooty', <bound method Text.winfo_vrooty of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_width', <bound method Text.winfo_width of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_x', <bound method Text.winfo_x of <Tkinter.Text instance at 0x00CDCB98>>), ('winfo_y', <bound method Text.winfo_y of <Tkinter.Text instance at 0x00CDCB98>>), ('xview', <bound method Text.xview of <Tkinter.Text instance at 0x00CDCB98>>), ('xview_moveto', <bound method Text.xview_moveto of <Tkinter.Text instance at 0x00CDCB98>>), ('xview_scroll', <bound method Text.xview_scroll of <Tkinter.Text instance at 0x00CDCB98>>), ('yview', <bound method Text.yview of <Tkinter.Text instance at 0x00CDCB98>>), ('yview_moveto', <bound method Text.yview_moveto of <Tkinter.Text instance at 0x00CDCB98>>), ('yview_pickplace', <bound method Text.yview_pickplace of <Tkinter.Text instance at 0x00CDCB98>>), ('yview_scroll', <bound method Text.yview_scroll of <Tkinter.Text instance at 0x00CDCB98>>)]
'''
mld=mld.split('), (')
i=0;im=1
ls=[]

print '',len('ä¸')

from qgb import U,T
U.x()
for m in ml:
	print m.ljust(25,'-'),mld[i].split(m)
	m=len('%-25s'%m)
	if(m not in ls):
		ls.append(m)
	i+=1
#	
print im
print '*'*44
print ls