随笔分类 - python
note about python
摘要:the last answer [WebDriverException: Message: unknown error: Chrome failed to start: crashed ](https://stackoverflow.com/questions/45954537/webdrivere
阅读全文
摘要:"scrapy example" "scrapy with pycharm" "import win32api 出现ImportError: DLL load failed 错误的解决方法" "膜拜大神" "反爬虫"
阅读全文
摘要:#!/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
阅读全文
摘要:vi /urs/bin/yum 将#!/usr/bin/python的python改为python2.x(你系统的python2的版本)
阅读全文
摘要:D:\mypython\path\ C:\Python27\Scripts\pyinstaller.exe -w mypython.py # Python打包成exe D:\mypython\path\python -m compileall mypython.py # Python编译成pyc
阅读全文
摘要:class Base(object): pass class Inject(Base): def __init__(self): super().__init__() # python3 # super(Inject, self).__init__() # python2 pass cla...
阅读全文
摘要:#!/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 ...
阅读全文
摘要:后台运行:nohup python restart_myblog.py &
阅读全文
摘要:效果: (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)
阅读全文
摘要: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...
阅读全文
摘要: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: ...
阅读全文
摘要: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
阅读全文
摘要: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...
阅读全文
摘要:https://www.python.org/dev/peps/pep-0008/
阅读全文
摘要:正则表达式是由普通字符(例如字符 a 到 z)以及特殊字符(称为"元字符")组成的文字模式。 re.match只匹配字符串的开始,如果字符串开始不符合正则表达式(一句话中句首包含的特定字符),则匹配失败,函数返回None;而re.search匹配整个字符串(一句话中包含的特定字符),直到找到一个匹配
阅读全文
摘要:转自:http://blog.csdn.net/u014680513/article/details/51005650
阅读全文
摘要:#!/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
阅读全文
摘要:#!/usr/bin/python# -*- coding: UTF-8 -*-# @date: 2017/7/22 23:41 # @name: Python_learn# @author:vickey-wuimport osimport jsontry: import cPickle as pi
阅读全文
摘要:参考【https://www.cnblogs.com/inva/p/5115794.html】
阅读全文

浙公网安备 33010602011771号