vim hello.py#!/usr/local/bin/python3.4str=input('pls intput same message:');print('you had enterd the string:'+str);运行:完。
分类:
编程语言 时间:
2015-05-12 15:06:19
阅读次数:
130
1 #encoding:utf-8 2 import struct 3 4 myfile = open("D:\\Backup\\我的文档\\spider.sav","rb+") 5 6 myfile.seek(368,0) 7 myfile.write(struct.pack('I',100...
分类:
编程语言 时间:
2015-05-12 13:20:08
阅读次数:
215
mkdir -p /workcd /workgwet https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xztar -axf Python-3.4.3.tar.xzcd Python-3.4.3./configuremakemake i...
分类:
编程语言 时间:
2015-05-12 10:47:55
阅读次数:
121
1.下载python的windows版本地址:下载python的windows版本(http://dlsw.baidu.com/sw-search-sp/soft/6e/17016/python-3.3.5.1418106245.msi)并把python的目录加到系统的path变量中去2.下载python的IDE工具,我个人选择AptanaStudio3地址:32位AptanaStudio3下载(https://s3..
分类:
编程语言 时间:
2015-05-11 06:37:29
阅读次数:
353
这是一个用python3 和mutagen库编写用来管理自己音乐文件夹的脚本。学习python挺久了,终于能写个有点用的东西了。源代码入下:不过感觉写得太长了,像这样一个脚本好像几十行就能解决,求各路大神指点!!! 1 import os 2 from mutagen.mp3 import MP.....
分类:
编程语言 时间:
2015-05-09 18:57:11
阅读次数:
146
1:文件形式的邮件01.#!/usr/bin/env python3 02.#coding: utf-8 03.import smtplib 04.from email.mime.text import MIMEText 05.from email.header import Hea...
分类:
编程语言 时间:
2015-05-07 10:06:56
阅读次数:
153
1.搭建Python Django开发环境1.1.Python运行环境安装Python官网:http://www.python.org/Python最新源码,二进制文档,新闻资讯等可以在Python的官网查看到。Python3.0已经发布,本文我们使用Django作为对象映射层,Django暂时还不...
分类:
编程语言 时间:
2015-05-07 00:49:49
阅读次数:
173
1.性能Py3.0运行 pystone benchmark的速度比Py2.5慢30%。Guido认为Py3.0有极大的优化空间,在字符串和整形操作上可以取得很好的优化结果。Py3.1性能比Py2.5慢15%,还有很大的提升空间。2.编码Py3.X源码文件默认使用utf-8编码,这就使得以下代码是合法...
分类:
编程语言 时间:
2015-05-06 12:47:47
阅读次数:
129
OS:Windows 7关键字:Python3.4,XML,ElementTree,minidom本文介绍用Python解析生成以下XML: LDL China 1.创建一个xml文件名为src.xml,内容如...
分类:
编程语言 时间:
2015-05-05 21:40:02
阅读次数:
261
Urllib.request用法简单介绍(Python3.3),有需要的朋友可以参考下。urllib是Python标准库的一部分,包含urllib.request,urllib.error,urllib.parse,urlli.robotparser四个子模块,这里主要介绍urllib.reques...
分类:
编程语言 时间:
2015-05-04 21:39:52
阅读次数:
216