Pyston 是一个 Dropbox 推出的新的基于 JIT 的 Python 2.7 的实现。Pyston 解析 Python 代码并转换到 LLVM 的 intermediate representation
import os #保存当前有的磁盘 def existdisk(): curdisks = [] allDisks = ['C:', 'D:', 'E:', 'F:', 'G:', 'H:', 'I:', 'J:', 'K:', \ 'L:', 'M:', 'N:', 'O:', 'P:', 'Q:', 'R:', 'S:', 'T:', \ 'U:', 'V:', 'W:', 'X:', '
python实现的telnet客户端程序,python自带一个telnetlib模块,可以通过其Telnet类实现telnet操作 import getpass import sys import telnetlib
入mongodb,引入了pymongo,xlrd包 利用pymongo包进行数据库的连接 使用xlrd包读取excel数据,由于二者数据结构的不同,要将excel格式数据转换为json格式数据
# -*- coding: cp936 -*- #python读取excel import xlrd def main(): xls=xlrd.open_workbook("d:\\11.xls") try:
代码如下 import socket def clean_host(host): """Remove leading http:// and trailing /path_to_somewhere in host name""" host = host.strip() prefixes = ['http://'] for prefix in prefixes:
pysmb 1.1.1 发布,该版本支持 Python 3. pysmb 是一个使用纯 Python 实现的 SMB/CIFS 库,支持 Windows 和 Linux 机器间的文件共享。
dotGNU),还有一些人则更为有趣,他们把现有的语言移植到.NET平台上。IronPython就是Python在.NET平台上的实现。 项目地址 : http://ironpython.codeplex.com/
python3 截图实现代码
我们都知道python的解释器有很多种实现方式,有C的,java的,还有python的等等,对应的也就是Cpython,Jython,一直比较火的PyPy ,今天就来盘点下这些版本(不一定非常全) CPython
CodernityDB是一个开源,纯Python实现 (没有第三方依赖),快速,跨平台的NoSQL数据库。它具有可选的支持 HTTP 服务器版(CodernityDB-HTTP),并且还有Python客户端库(CodernityDB-PyClient)
Lunar是一个玩具式的网络框架,基于PEP333和它的进化版PEP3333
import random #warning: x and y confusing sx = 10 sy = 10 dfs = [[0 for col in range(sx)] for row in range(sy)] maze = [[' ' for col in range(2*sx+1)] for row in range(2*sy+1)] #1:up 2:down 3:left 4:r
pyDES 是一个Python的模块,用来提供 DES、Triple-DES 的加密算法。 使用示例: from pyDes import * # For Python3, you'll need
这段python代码调用windows下的ping命令,通过subprocess在其子进程里面实现,由于windows下的ping和linux下的ping返回的消息不太一样,所以这段python代码要
#_*_encoding:utf-8_*_ #script for python3.2 #-------------------------------------------------------
import string class spam: def __init__(self): self.eggs = 1 def __del__(self): pass def __add__(self,other): rt = spam() rt.eggs = self.eggs + other.eggs return rt def __coerce__(self,other): rt = spa
#!/usr/bin/env python # encoding:utf-8 from socket import * from ctypes import create_string_buffer from
# Text To Speech using SAPI (Windows) and Python module pyTTS by Peter Parente # download installer file
[Python]代码 #!/usr/bin/env python #-*-encoding = utf-8-*- # hasher.py #@By:dengyongkai import sys import