• Python 发出警报声音 简单播放声音

    auto 2019-09-22 07:59:02 python

    4464°

    20

    #!/usr/bin/python # -*- coding: UTF-8 -*- import os os.system("paplay BEEP1.WAV") BEEP1.WAV 为你的声音文件
  • python 提取网页 charset

    auto 2019-09-22 07:59:02 python

    2248°

    20

    经过十几万网页采集测试,有效率99%def pick_charset(html): """ 从文本中提取 meta charset :param html: :return: """ charset
  • Python “编辑距离”(Levens

    auto 2019-09-22 07:59:02 python

    2027°

    20

    本文搜集了网上比较常用的几种计算Levenshtein distance的函数, 其中函数(1)为调用数学工具包Numpy, 函数(2)和(1)算法类似,都是采用DP, (3)来自wiki(4)是直接
  • python提示框

    auto 2019-09-22 07:59:02 python

    2154°

    20

    import tkinter import tkinter.messagebox def showMsg(): #提示框 tkinter.messagebox.showinfo('提
  • Python练手经典100例

    auto 2019-09-22 07:59:02 python

    1856°

    20

    本博文转载自:http://blog.csdn.net/dajiangtai007/article/details/65632987 100个Python练手小程序,学习python的很好的资料,覆盖
  • python程序界面

    auto 2019-09-22 07:59:02 python

    1684°

    20

    # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Main.ui' # # Created:
  • Python实现Linux环境下的ls命

    auto 2019-09-22 07:59:02 python

    2079°

    20

    在Linux下使用ls命令结合正则表达式,能够高效地进行文件搜索,于是就想用Python实现这个功能以便在Windows上使用 import os import re import sys path
  • python 计算耗时

    auto 2019-09-22 07:59:02 python

    2001°

    20

    print (datetime.datetime.now()) import time as tm t1 = tm.time() .......................t2 = tm.time
  • GNS3使用详解(gns3如何模拟ids

    auto 2019-09-22 07:54:50 python

    2169°

    20

    第一gns3如何模拟juniper,第二gns3如何模拟ids。 juniper 学网络的人应该都知道这个,但是接触这个的人却不多,本人也是菜鸟也没有接触过,惭愧。今天我们来说说gns如何模拟ju
  • Python从菜鸟到高手(3):声明变量

    auto 2019-09-22 07:54:50 python

    1889°

    20

    变量(variable)是Python语言中一个非常重要的概念。变量的主要作用就是为Python程序中的某个值起一个名字。类似于“张三”、“李四”、“王二麻子”一样的人名,便于记忆。
  • python3-列表的深浅复制

    auto 2019-09-22 07:54:50 python

    1937°

    20

    # Auther: Aaron Fannames = ["aaron", "alex", "james", "meihengfan"]#复制一份列表#浅复制 (注意,这只是一个浅复制,只能复制第一层列
  • python内置函数3-compile(

    auto 2019-09-22 07:54:50 python

    2059°

    20

    Help on built-in function compile in module __builtin__:compile(...) compile(source, filename, mode
  • assign之python文本处理

    auto 2019-09-22 07:53:49 python

    1551°

    20

    需求: code: import os import time import numpy as np def to_log_txt(filename): if not os.path.exists('
  • python3_装饰器_异常处理

    auto 2019-09-22 07:54:50 python

    2082°

    20

    装饰器: defauth(func): defwrapper(name): 
  • python3.4 之sqlite3,

    auto 2019-09-22 07:54:50 python

    2105°

    20

    python3.4导入sqlite3是报错,如下:>>> import sqlite3Traceback (most recent call last): File "", line 1
  • Python -- 操作字符串[2/3]

    auto 2019-09-22 07:54:50 python

    1930°

    20

    split(),upper(),lower()
  • python3-打印一个进度条

    auto 2019-09-22 07:54:50 python

    2137°

    20

    # Auther: Aaron Fanimport sys,timefor i in range(30): #打印一个#号,这种方法打印不会自动换行 sys.stdout.write('#')
  • python内置函数3-complex(

    auto 2019-09-22 07:54:50 python

    1937°

    20

    Help on class complex in module __builtin__:class complex(object)| complex(real[, imag]) -> complex
  • python3_05.文件操作那些事

    auto 2019-09-22 07:54:50 python

    1953°

    20

    文件操作的学习笔记。>>> file = open('/tmp/test.txt','r')>>> file.read()'root:x:0:0:root:/root:/bin/bash\nbin:x
  • python避免if-else过多的办法

    auto 2019-09-22 07:53:49 python

    2869°

    20

    方法一:来自http://biancheng.dnbcw.net/python/417264.htmlwhile True: n = raw_input() i = int(n) % 10 if i