03 2017 档案

摘要:under set the code: 阅读全文
posted @ 2017-03-31 17:45 idlewith 阅读(121) 评论(0) 推荐(0)
摘要:``` exit = QtGui.QAction(QtGui.QIcon(':/log.ico'), 'Exit', self) exit.setShortcut('Ctrl+Q') exit.setStatusTip('Exit Application') self.connect(exit, QtCore.SIGNAL('trig... 阅读全文
posted @ 2017-03-30 15:51 idlewith 阅读(137) 评论(0) 推荐(0)
摘要:``` def center(self): screen = QtGui.QDesktopWidget().screenGeometry() size = self.geometry() self.move((screen.width()-size.width())/2, (screen.height()-size.height())/2) `... 阅读全文
posted @ 2017-03-30 14:38 idlewith 阅读(252) 评论(0) 推荐(0)
摘要:``` def closeEvent(self, QCloseEvent): reply = QtGui.QMessageBox.question(self, 'Message', 'Are you sure to quit?', ... 阅读全文
posted @ 2017-03-30 14:35 idlewith 阅读(581) 评论(0) 推荐(0)
摘要:``` $("input[name='txNotion']").val('ok') ``` 阅读全文
posted @ 2017-03-29 13:42 idlewith 阅读(125) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-03-28 15:34 idlewith 阅读(1) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-03-28 15:33 idlewith 阅读(2) 评论(0) 推荐(0)
摘要:``` def get_pid(pname): process = psutil.process_iter() for pro in process: str_pro = str(pro) pat = re.compile(pname) if pat.search(str_pro): pid = str_pro... 阅读全文
posted @ 2017-03-28 15:30 idlewith 阅读(162) 评论(0) 推荐(0)
摘要:``` def send_to_clipboard(clip_type, data): win32clipboard.OpenClipboard() win32clipboard.EmptyClipboard() win32clipboard.SetClipboardData(clip_type, data) win32clipboard.CloseClipboar... 阅读全文
posted @ 2017-03-28 09:50 idlewith 阅读(285) 评论(0) 推荐(0)
摘要:``` coding:utf 8 PyMsgBox A simple, cross platform, pure Python module for JavaScript like message boxes. Al Sweigart al@inventwithpython.com Modified 阅读全文
posted @ 2017-03-27 14:53 idlewith 阅读(602) 评论(0) 推荐(0)
摘要:``` import os import fnmatch def get_c_path(): for drive in ('C:\\', 'D:\\'): for dirpath, dirnames, filenames in os.walk(drive): for name in filenames: if fnm... 阅读全文
posted @ 2017-03-27 13:28 idlewith 阅读(106) 评论(0) 推荐(0)
摘要:``` On Unix: Access with On Window: Access with from gevent.server import StreamServer def handle(socket, address): socket.send("Hello from a telnet!\ 阅读全文
posted @ 2017-03-26 15:08 idlewith 阅读(157) 评论(0) 推荐(0)
摘要:netstat ano |findstr 9000 taskkill /pid 2296 f(让我们果断杀掉它吧!!!) 成功: 已终止 PID 为 2296 的进程 阅读全文
posted @ 2017-03-26 15:01 idlewith 阅读(229) 评论(0) 推荐(0)
摘要:``` import gevent from gevent import monkey monkey.patch_all() import requests import time import os import pprint urls = ['http://www.baidu.com', 'http://www.cnblogs.cn', 'http://ww... 阅读全文
posted @ 2017-03-26 14:27 idlewith 阅读(189) 评论(0) 推荐(0)
摘要:``` from pywinauto import application import psutil import re def getPid(pName): process = psutil.process_iter() for pro in process : str_pro = str(pro) pat = re.compile(pNam... 阅读全文
posted @ 2017-03-25 18:28 idlewith 阅读(136) 评论(0) 推荐(0)
摘要:``` def setText(aString): clip.OpenClipboard() clip.EmptyClipboard() clip.SetClipboardData(con.CF_UNICODETEXT, aString) clip.CloseClipboard() ``` 阅读全文
posted @ 2017-03-22 10:07 idlewith 阅读(199) 评论(0) 推荐(0)
摘要:``` self.text.bind("", self.selectText) self.text.bind("", self.selectText) ``` ``` def selectText(self, event): self.text.tag_add('sel', '1.0', 'end') return 'break' ``` 阅读全文
posted @ 2017-03-22 10:06 idlewith 阅读(424) 评论(0) 推荐(1)
摘要:``` def to_short_with(long_name): head = long_name.split(' ')[0] tail = long_name.split(' ')[-1] return head[0].lower() + tail.lower() ``` 阅读全文
posted @ 2017-03-22 10:06 idlewith 阅读(125) 评论(0) 推荐(0)
摘要:``` def center_window(self, cont, width, height): screenwidth = cont.winfo_screenwidth() screenheight = cont.winfo_screenheight() size = "%sx%s+%s+%s" % ( width... 阅读全文
posted @ 2017-03-22 10:01 idlewith 阅读(273) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-03-19 17:45 idlewith 阅读(3) 评论(0) 推荐(0)
摘要:``` def parse_from(html): tree = lxml.html.fromstring(html) data = {} for e in tree.cssselect('form input'): if e.get('name'): data[e.get('name')] = e.get('value') ... 阅读全文
posted @ 2017-03-17 16:02 idlewith 阅读(136) 评论(0) 推荐(0)
摘要:``` coding: utf 8 import re import csv import time try: from PySide.QtGui import QApplication from PySide.QtCore import QUrl, QEventLoop, QTimer from 阅读全文
posted @ 2017-03-17 15:41 idlewith 阅读(429) 评论(0) 推荐(0)
摘要:``` def get_child_windows(parent): if not parent: return hwndChildList = [] gui.EnumChildWindows(parent, lambda hwnd, param: param.append(hwnd), hwndChildList) return hwndChil... 阅读全文
posted @ 2017-03-17 09:24 idlewith 阅读(360) 评论(0) 推荐(0)
摘要:``` from tkinter import * from tkinter.ttk import * import time import threading import requests from bs4 import BeautifulSoup url3 = 'http://stackoverflow.com/questions/31241112/blocking-tkinter-int... 阅读全文
posted @ 2017-03-16 23:28 idlewith 阅读(456) 评论(0) 推荐(0)
摘要:``` from tkinter import * from tkinter.ttk import * import time import threading class Interface: def __init__(self, master): self.master = master self.browse_button= Button (mast... 阅读全文
posted @ 2017-03-16 22:37 idlewith 阅读(372) 评论(0) 推荐(0)
摘要:``` # 8 organize your code import matplotlib matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg from matplotlib.figure import Figure impor... 阅读全文
posted @ 2017-03-15 01:49 idlewith 阅读(517) 评论(0) 推荐(0)
摘要:coding:utf 8 print each window import win32gui import ctypes EnumWindows = ctypes.windll.user32.EnumWindows EnumWindowsProc = ctypes.WINFUNCTYPE( ctyp 阅读全文
posted @ 2017-03-14 13:31 idlewith 阅读(574) 评论(0) 推荐(0)
摘要:``` r.withdraw() ``` ``` r.deiconify() ``` 阅读全文
posted @ 2017-03-13 23:31 idlewith 阅读(140) 评论(0) 推荐(0)
摘要:re module version my version Python 3 version Python 2 version 阅读全文
posted @ 2017-03-13 18:42 idlewith 阅读(218) 评论(0) 推荐(0)
摘要:1 usually 2 specially(modify reg) add.reg remove.reg 阅读全文
posted @ 2017-03-13 09:27 idlewith 阅读(220) 评论(0) 推荐(0)
摘要:``` python -m timeit -s "li = range(100)" "li.sort(reverse=True)" ``` 阅读全文
posted @ 2017-03-12 23:40 idlewith 阅读(147) 评论(0) 推荐(0)
摘要:body: font family: sans serif div.sphinxsidebar h3 font family: 'Trebuchet MS', sans serif div.sphinxsidebar h4 font family: 'Trebuchet MS', sans seri 阅读全文
posted @ 2017-03-12 23:08 idlewith 阅读(101) 评论(0) 推荐(0)
摘要:``` # server.py # Fib microservice from socket import * from fib import fib from threading import Thread #from concurrent.futures import ProcessPoolExecutor as Pool ##pool = Pool(4) def fib_server(... 阅读全文
posted @ 2017-03-12 16:26 idlewith 阅读(122) 评论(0) 推荐(0)
摘要:代码如下 阅读全文
posted @ 2017-03-09 23:27 idlewith 阅读(102) 评论(0) 推荐(0)
摘要:添加以下代码 阅读全文
posted @ 2017-03-09 19:15 idlewith 阅读(1011) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-03-08 20:42 idlewith 阅读(2) 评论(0) 推荐(0)
摘要:``` from gevent import monkey; monkey.patch_all() import gevent from information_from_espace import Espace_info def get_email(jobNumber): t = Espace_info(jobNumber) print t.get_espace_info(... 阅读全文
posted @ 2017-03-07 13:23 idlewith 阅读(115) 评论(0) 推荐(0)
摘要:# ```analyze``` ``` result_sid = xml.dom.minidom.parseString(res).getElementsByTagName('email')[0].childNodes[0].nodeValue ``` 阅读全文
posted @ 2017-03-07 09:58 idlewith 阅读(95) 评论(0) 推荐(0)