#!/usr/bin/env python3#file name: threadtest.py# -*- coding:utf8 -*-# -version:1.0-import threading, time, socketclass Server(): '''接收消息的服务器类''' def _...
分类:
编程语言 时间:
2015-05-14 13:54:30
阅读次数:
199
下载安装包 # wget http://www.python.org/ftp/python/3.3.4/Python-3.3.4.tgz解压 # tar -xzvf Python-3.3.4.tgz为新版本的python创建一个路径 # mkdir /usr/local/python3安装 ...
分类:
编程语言 时间:
2015-05-13 19:01:35
阅读次数:
140
hello.py#!/usr/local/bin/python3.4count=0while(count<9): print('the count is:',count) count=count+1;print('good bye!')运行:./hello.py
分类:
编程语言 时间:
2015-05-13 12:20:01
阅读次数:
131
Python通过调用tkinter库来实现图形化。Python中的窗口更加内容大小自动缩放。例1:创建一个简单的窗口:from tkinter import * #引入tkinter库root = Tk() #创建一个主窗口,Tk(className='aaa')定义一下参数值root....
分类:
编程语言 时间:
2015-05-13 00:43:09
阅读次数:
122
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