我用python写了个发送邮件的功能 # emailTask ={"from":"zp@163.com", # "to":"zp@163.com", # "cc":"zp@163.com", # "smtpServer":"smtp.163.com", # "subject":"无标题", # "content":"", # "contentType":"plain"} def main(): Email.sendEmail(emailTask) 我想是想的效果是把这个功能生成为sendEmail.exe 使用方法send...
by zp307300084 - Python - 2012-03-06 12:45:53 阅读(2458) 回复(2)
刚才配置了一个apache+python32环境(windowsxp),写了一个例子:[code]#!C:/python32/python.exe print ("Content-type: text/html")print print ("
转:garfieldtom python32使用cxFreeze打包 python下打包工具很多,使用比较多的是py2exe,我使用python32,好像py2exe并不支持。看了看cxfreeze,可以支持python32. 首先编写一个setup.py:[code] import sys from cx_Freeze import setup, executable base = None if sys.platform == "win32": base = "Win32GUI" setup( name = "PyMailServer", version = "0.1", description = "PyMailServ...
我编译了一个FTP下载的exe文件, 在编译成exe前,用.py格式执行完全没问题,
编译之后就出现了:
[code]
E:\dist>ftp.exe
03月09日
"****connected to host "192.168.1.128"
220 Welcome
Traceback (most recent call last):
File "ftp.py", line 69, in
本帖最后由 yakczh_cu 于 2013-05-16 12:56 编辑 SimpleHTTPServer 这个测试页面很好用,省去了配置域名,docuemnt_root之类的操作 python -m SimpleHTTPServer这样会启动 python26的SimpleHTTPServer 但是python26的 SimpleHTTPServer在有些请求下报一大堆错,如果用python32指定路径 g:\python32\python.exe -m SimpleHTTPServer 提示 g:\python32\python.exe: No module named SimpleHTTPServer 如果才能启动python32...
easy_install utils Searching for utils Reading https://pypi.python.org/simple/utils/ Best match: utils 0.4 Downloading https://pypi.python.org/packages/source/u/utils/utils-0.4.tar.gz Processing utils-0.4.tar.gz Writing d:\temp\easy_install-0a340a\utils-0.4\setup.cfg Running utils-0.4\setup.py -q bdist_egg --dist-dir d:\temp\easy_install-0a34 error: Setup script exited with error: SandboxViola...
[code] # -*- coding=utf8 -*- import urllib.request url="http://www.oschina.net" req_header = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11', } req = urllib.request.Request(url,None,req_header) resp = urllib.request.urlopen(req) html = resp.read().decode("utf8") print(html)[/code]在命令行下运行显示IOError: [Errno ...
cx_freeze 打包 python32 和tkinter模块 出现错误 报错如下 网上有人说,经调试发现程序运行后一闪而过是因为缺少支持库出错而自动关闭了,要把Tcl8.5和tk8.5两个目录全复制到目标程序的目录中才能正常运行。 可是我拷过去后发现也不能够运行。
我在用python32 tkinter做一个简单的button 目的是退出界面 from tkinter import * root = Tk() Button(root, text='Quit', command=root.quit).pack() root.mainloop() 大概就这样简单的代码 可是在dos或者在idel下运行都会报错或者不能正常运行 dos下的报错是下图 在idel下点击的话就卡死住了 大家知道这是什么原因嘛?请各位大侠指教!