首页 软件开发 代码片段 python ( Page 37 )

python 1073

#Python
查看端口状态的python代码

#coding:utf-8 import socket import threading import time class SkPort(threading.Thread): d…

2015-06-28 653

#Python
帮同事写的一个切换数据库启动的小工具

#!/usr/bin/env python #coding=utf-8 import os dir = '.' dirApp = "%s\Data" % dir file_type…

2015-06-27 909

#Python
python实现发送邮件

#_*_encoding:utf-8_*_ #script for python3.2 #---------------------------------------------…

2015-06-27 252

#Python
python 学习

#!/usr/bin/env python while True: year=raw_input('please input a year: ') a= int(year) if …

2015-06-26 694

#Python
爬取豆瓣的各分类书单以及近期热门电影和top250的电影

# -*- coding: utf-8 -*- import urllib import urllib2 import re import sys # reload(sys) # …

2015-06-26 258

#Python
python生成128条形码(code128)

#-*- encoding: utf-8 -*- import logging import sys import os import pygame from pygame.loc…

2015-06-25 136

#Python
用Python 实现的目录拷贝程序

用python写的小程序,可以用这个程序在固定的目录之间来回的拷贝. copy one directory to another directory @author: ''' im…

2015-06-25 216

#Python
Python 实现的"冒泡排序"

''''' Bubble Sort @author: aihua.sun ''' import string import random number = []; count = …

2015-06-25 839

#Python
python模拟Get请求保存网易歌曲的url

python模拟Get请求保存网易歌曲的url 作者:vpoet 日期:大约在夏季 #coding:utf-8 import requests import json url = …

2015-06-25 232

#Python
python-pcap模块解析mac地址

import pcap import binascii a = pcap.pcap() a.setfilter('arp') for i,j in a: if binascii.h…

2015-06-25 693

#Python
列表的顺序访问与随机访问

class Tobj(object): def __init__(self, serial, val=0): self.serial = serial self.val = val…

2015-06-25 250

#Python
python随机生成手机号码

random.choice(['139','188','185','136','158','151'])+"".join(random.choice("0123456789") f…

2015-06-25 154
1 35 36 37 38 39 90