随笔分类 - Python
摘要: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
阅读全文
摘要:os模块 os.path.dirname() 返回路径中的目录路径 >>> os.path.dirname('C:\Windows\System32\drivers\etc\hosts') 'C:\\Windows\\System32\\drivers\\etc' os.path.abspath()
阅读全文
摘要:import sysIP_input = input("Please input IP:")DNS_input = input("Please input Domain-Name:")if sys.platform == 'win32': with open(r'C:\Windows\System3
阅读全文
摘要:# -*-coding:utf8 -*-import os#print(os.getcwd())users = open('username.txt', 'r')password = open('password.txt', 'r')lock_user = open('lock.txt', 'r')
阅读全文
摘要:"""Modify file name,remove the numbers from file namePython2.X"""# -*- coding: utf8 -*-import osdef rename_files(): # (1) get file names in a folder f
阅读全文
摘要:"""Use python open browser after two hours """#-*- coding:utf8 -*-import timeimport webbrowsertotal_break = 3break_count = 0print("This Program starte
阅读全文

浙公网安备 33010602011771号