随笔分类 -  python

note about python
摘要:the last answer [WebDriverException: Message: unknown error: Chrome failed to start: crashed ](https://stackoverflow.com/questions/45954537/webdrivere 阅读全文
posted @ 2018-04-20 17:06 随便了888 阅读(4228) 评论(0) 推荐(0)
摘要:"scrapy example" "scrapy with pycharm" "import win32api 出现ImportError: DLL load failed 错误的解决方法" "膜拜大神" "反爬虫" 阅读全文
posted @ 2018-02-05 22:40 随便了888 阅读(186) 评论(0) 推荐(0)
摘要:#!/usr/bin/python# -*- coding: UTF-8 -*-# @date: 2018/1/6 23:08# @name: tmp2# @author:vickey-wuimport osimport redef print_all_file_path(init_file_pat 阅读全文
posted @ 2018-01-07 10:52 随便了888 阅读(11407) 评论(0) 推荐(0)
摘要:vi /urs/bin/yum 将#!/usr/bin/python的python改为python2.x(你系统的python2的版本) 阅读全文
posted @ 2017-12-20 00:18 随便了888 阅读(340) 评论(0) 推荐(0)
摘要:D:\mypython\path\ C:\Python27\Scripts\pyinstaller.exe -w mypython.py # Python打包成exe D:\mypython\path\python -m compileall mypython.py # Python编译成pyc 阅读全文
posted @ 2017-12-07 15:40 随便了888 阅读(1814) 评论(0) 推荐(0)
摘要:class Base(object): pass class Inject(Base): def __init__(self): super().__init__() # python3 # super(Inject, self).__init__() # python2 pass cla... 阅读全文
posted @ 2017-11-28 11:11 随便了888 阅读(235) 评论(0) 推荐(0)
摘要:#!/bin/bash #@author vickey main() { TMP_PATH="/home/test" echo "are you sure to del all files in test/?" echo "y/n?: " read answer if [ ${answer} == "y" -o ${answer} == "Y" ] then restart ... 阅读全文
posted @ 2017-11-28 10:31 随便了888 阅读(175) 评论(0) 推荐(0)
摘要:后台运行:nohup python restart_myblog.py & 阅读全文
posted @ 2017-11-27 23:20 随便了888 阅读(166) 评论(0) 推荐(0)
摘要:效果: (1, 1)(2, 2)(3, 3)(4, 1)(5, 2)(6, 3)(7, 1)(8, 2)(9, 3)(10, 1)(11, 2)(12, 3)(13, 1) 阅读全文
posted @ 2017-11-16 15:02 随便了888 阅读(219) 评论(0) 推荐(0)
摘要:import time from pymouse import PyMouse from pykeyboard import PyKeyboard import re import win32clipboard as clip import win32con as con m = PyMouse() k = PyKeyboard() def set_clip(msg): if is... 阅读全文
posted @ 2017-11-14 11:39 随便了888 阅读(1833) 评论(0) 推荐(0)
摘要:def read_data(file_name): if not re.findall(".txt", file_name): file_name += ".txt" L = [[] for h in [[] for k in range(5)]] with open(file_name) as r: for d in r: ... 阅读全文
posted @ 2017-11-09 09:34 随便了888 阅读(1718) 评论(0) 推荐(0)
摘要:java http://dirtsimple.org/2004/12/python-is-not-java.htmlhttp://twistedmatrix.com/users/glyph/rant/python-vs-java.htmlhttp://netpub.cstudies.ubc.ca/o 阅读全文
posted @ 2017-10-28 11:38 随便了888 阅读(177) 评论(0) 推荐(0)
摘要:radio = dr.find_element_by_xpath('//*[@id="contentTable"]/tbody/tr[1]/td[1]/input') webdriver.execute_script("arguments[0].click();", radio) dr.find_element_by_tag_name("html").send_keys(Keys.CONTROL... 阅读全文
posted @ 2017-10-26 09:59 随便了888 阅读(343) 评论(0) 推荐(0)
摘要:https://www.python.org/dev/peps/pep-0008/ 阅读全文
posted @ 2017-09-05 18:06 随便了888 阅读(175) 评论(0) 推荐(0)
摘要:正则表达式是由普通字符(例如字符 a 到 z)以及特殊字符(称为"元字符")组成的文字模式。 re.match只匹配字符串的开始,如果字符串开始不符合正则表达式(一句话中句首包含的特定字符),则匹配失败,函数返回None;而re.search匹配整个字符串(一句话中包含的特定字符),直到找到一个匹配 阅读全文
posted @ 2017-08-21 23:16 随便了888 阅读(336) 评论(0) 推荐(0)
摘要:转自:http://blog.csdn.net/u014680513/article/details/51005650 阅读全文
posted @ 2017-07-30 17:26 随便了888 阅读(1379) 评论(0) 推荐(0)
摘要:#!/usr/bin/python #-*- coding:utf-8 -*- import os, subprocess import tkMessageBox import msg_box def get_path_from_disk(process_name): for path in pat 阅读全文
posted @ 2017-07-24 17:43 随便了888 阅读(6591) 评论(0) 推荐(0)
摘要:#!/usr/bin/python# -*- coding: UTF-8 -*-# @date: 2017/7/22 23:41 # @name: Python_learn# @author:vickey-wuimport osimport jsontry: import cPickle as pi 阅读全文
posted @ 2017-07-23 00:30 随便了888 阅读(241) 评论(0) 推荐(0)
摘要:参考【https://www.cnblogs.com/inva/p/5115794.html】 阅读全文
posted @ 2017-07-20 17:21 随便了888 阅读(387) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-06-27 23:11 随便了888 阅读(6) 评论(0) 推荐(0)