
pyhton基础
文章平均质量分 71
hellodrawing
这个作者很懒,什么都没留下…
展开
-
python 基础教程 24章 虚拟茶话会 async4
#/usr/bin/python # *-*coding:utf-8 *-* """ python 基础教程24章 24-6 稍复杂些的聊天服务器 """ from asyncore import dispatcher from asynchat import async_chat import socket, asyncore PORT = 5005 N转载 2017-04-24 00:18:53 · 470 阅读 · 0 评论 -
python 基础教程 24章 虚拟茶话会 async5
#/usr/bin/python # *-* coding:utf-8 *-* """ 多个聊天室的版本 转载自 https://bblove.me/2015/03/26/python-im/ """ from asyncore import dispatcher from asynchat import async_chat import socket, asyn转载 2017-04-26 16:54:38 · 396 阅读 · 0 评论 -
python 使用CGI进行远程编辑1
CGI (Common Gateway Interface)通用网关接口 CGI是网络服务器可以将查询(一般来说是通过Web表单), 传递到专门的程序(比如python程序)并且在网页上显示结果的标准机制。 它是创建web应用的程序的一种简便方法,无需编写特殊用途的应用服务器。 CGI是如何工作的 1浏览器通过url连接到HHTP web服务器 2web服务器接收到请求信息后转载 2017-05-10 16:07:00 · 749 阅读 · 0 评论 -
python 使用CGI进行远程编辑2
#把index.html放在apache2/htdocs文件夹中,或者修改原来存在的It's works的 index.html文件 然后浏览器 localhost 或者自己的localhost/index1.html index.html----------------- 一个带有能输入文件名的表单网页,包括一个触发edit.cgi的Open按钮 index.html中文本框被命转载 2017-05-10 16:18:29 · 437 阅读 · 0 评论 -
python 12GUI
#!/usr/bin/python # *-*coding:utf-8 *-* #python12章 GUI图形用户界面, wxpython import wx ##每个wxpython程序都是wx.App的一个实例。False参数表示不要将stdout和stderr重定向到窗口 #创建应用程序对象,负责幕后的所有初始化,如果无法工作可能需要将它替换为wx.Pysimpl转载 2017-06-16 11:03:03 · 608 阅读 · 0 评论 -
The Tetris game wxPython
#!/usr/bin/python # *-*coding:utf-8 *-* """ 俄罗斯方块 wxPython tutorial :http://zetcode.com/wxpython/ The Tetris game in wxPython :http://zetcode.com/wxpython/thetetrisgame/ """ #tetris转载 2017-06-16 11:04:58 · 410 阅读 · 0 评论 -
python基础 27章 使用XML_RPC进行文件共享
# *-*coding:utf-8 *-* #python 3简单的Node实现 (simple_node.py) from xmlrpc.client import ServerProxy from os.path import join, isfile from xmlrpc.server import SimpleXMLRPCServer from urllib.parse翻译 2017-06-02 00:55:23 · 483 阅读 · 0 评论 -
python28章 项目9文件共享GUI版本
#!/usr/bin/python # *-*coding:utf-8 *-* """ 28章项目9 python2 对27章项目扩展增添一个GUI功能。 简单的GUI客户端(simple_guiclient.py) 部件的文档链接:http://xoomer.virgilio.it/infinity77/wxPython/widgets.html 入门介绍https://w转载 2017-06-16 11:01:56 · 932 阅读 · 0 评论 -
python 基础教程 24章 虚拟茶话会 async3
#/usr/bin/python # *-*coding:utf-8 *-* """ #python 基础教程 24章 24-5 简单的聊天的服务器 #telnet 127.0.0.1 5005连接, 设置退出符号 telnet -e '=' 输入quit退出 #python3连接后报错 error: uncaptured python exception, c转载 2017-04-24 00:18:02 · 1656 阅读 · 0 评论 -
python 基础教程 24章 虚拟茶话会 async1
#/usr/bin/python # *-*coding:utf-8 *-* """ #python 基础教程 24章 24-3具有一些清理功能的基本服务器 asyncore模块链接:https://docs.python.org/3/library/asyncore.html asynchat模块链接 https://docs.python.org/3/libr转载 2017-04-24 00:14:31 · 714 阅读 · 0 评论 -
python 基础教程 xml
#/usr/bin/env python # *-*coding:utf-8 *-* #pyhton 基础教程22 简单的页面创建程序脚本 from xml.sax.handler import ContentHandler from xml.sax import parse """ xml.sax文档 #https://docs.python.org/3/转载 2017-03-21 23:00:10 · 288 阅读 · 0 评论 -
python 基础教程 xml
#/usr/bin/env python #*-*coding:utf-8 *-* #python 基础教程 22 使用 xml from xml.sax.handler import ContentHandler from xml.sax import parse import os class Dispatcher(): """ capitalize() 返回一转载 2017-03-21 23:01:08 · 221 阅读 · 0 评论 -
python 基础教程 xml
#/usr/bin/env python #*-*coding:utf-8 *-* #python 基础教程 22 使用 xml from xml.sax.handler import ContentHandler from xml.sax import parse import os class Dispatcher(): """ capitalize() 返回一转载 2017-03-21 22:59:35 · 278 阅读 · 0 评论 -
python 基础教程 23章NNTP 2
#/usr/bin/env python #*-*coding:utf-8 *-* #python 基础 23章NNTP 23-1 简单的新闻收集道理程序 #python2.7 运行 from nntplib import NNTP from time import strftime, time, localtime day = 24 * 60 * 60 # 一转载 2017-04-10 00:03:14 · 907 阅读 · 0 评论 -
python 基础教程 23章NNTP 1
#/usr/bin/python # *-*coding:utf-8 *-* #python NNTP # group组返回响应信息 from nntplib import NNTP with NNTP('news.gmane.org') as n: print(n.group('gmane.comp.python.committers')) serv转载 2017-04-10 00:01:17 · 1649 阅读 · 1 评论 -
python 基础教程 23章NNTP 3
#/usr/bin/env python #*-*coding:utf-8 *-* # python 基础教程23章NNTP 23-2 更灵活的新闻收集代理程序 #python2.7 运行 from nntplib import NNTP from time import strftime, time, localtime from email import messa转载 2017-04-10 00:04:41 · 1278 阅读 · 0 评论 -
python基础 26章 项目7 自定义电子公告板
python 教程 26章 项目7自定义电子公告板 , cgi, postgres,mysql数据库转载 2017-05-22 16:47:50 · 969 阅读 · 0 评论 -
python 基础教程 24章 虚拟茶话会 async2
#/usr/bin/python # *-*coding:utf-8 *-* """ #python 基础教程24章 24-4 带有ChatSession类的服务器程序 在python2中运行,python3需要用 encode('utf-8')转码 set.terminator(term)设置要在信道上识别的终止对象 collect_incoming_data转载 2017-04-24 00:16:16 · 369 阅读 · 1 评论 -
python基础教程 29章 DIY街机游戏
#!/usr/bin/python # *-*coding:utf-8 *-* """ ubuntu 16.10 python3 sudo pip install pygame 安装 pygame-1.9.3 文档 http://www.pygame.org/docs/ 方法索引 pygame v1.9.2 documentation https://转载 2017-06-26 23:40:56 · 1449 阅读 · 0 评论