随笔分类 -  Python

摘要:序列操作: 特定类型操作: 模式匹配 阅读全文
posted @ 2019-04-30 08:53 村西崔二 阅读(159) 评论(0) 推荐(0)
摘要:1.打开文件packaging_tool.py: D:\Program files\pycharm\PyCharm 2016.3.2\helpers\packaging_tool.py 2.添加导入: import pip._internal as pip_new 3.修改参数 修改前的代码为: d 阅读全文
posted @ 2018-11-18 06:06 村西崔二 阅读(194) 评论(0) 推荐(0)
摘要:os模块 os.path.dirname() 返回路径中的目录路径 >>> os.path.dirname('C:\Windows\System32\drivers\etc\hosts') 'C:\\Windows\\System32\\drivers\\etc' os.path.abspath() 阅读全文
posted @ 2018-11-17 10:25 村西崔二 阅读(116) 评论(0) 推荐(0)
摘要:import sysIP_input = input("Please input IP:")DNS_input = input("Please input Domain-Name:")if sys.platform == 'win32': with open(r'C:\Windows\System3 阅读全文
posted @ 2018-10-15 22:01 村西崔二 阅读(289) 评论(0) 推荐(0)
摘要:带参数的Python装饰器 阅读全文
posted @ 2018-10-10 16:17 村西崔二 阅读(81) 评论(0) 推荐(0)
摘要:# -*-coding:utf8 -*-import os#print(os.getcwd())users = open('username.txt', 'r')password = open('password.txt', 'r')lock_user = open('lock.txt', 'r') 阅读全文
posted @ 2017-03-22 22:37 村西崔二 阅读(116) 评论(0) 推荐(0)
摘要:"""Modify file name,remove the numbers from file namePython2.X"""# -*- coding: utf8 -*-import osdef rename_files(): # (1) get file names in a folder f 阅读全文
posted @ 2017-03-22 17:43 村西崔二 阅读(465) 评论(0) 推荐(0)
摘要:"""Use python open browser after two hours """#-*- coding:utf8 -*-import timeimport webbrowsertotal_break = 3break_count = 0print("This Program starte 阅读全文
posted @ 2017-03-22 15:07 村西崔二 阅读(146) 评论(0) 推荐(0)