发布时间:2013-05-28 10:59:53
#!/usr/bin/python#-*-encoding:UTF-8-*-import sysif len(sys.argv) < 2:print('Usage : python sys.argv[0] FileName')sys.exit(1)else:print ('\nunix2dos.py execution successfully!\n')File=sys.argv[1]fileobj = open(File,'rU')try:allfile = fileobj.read()finally:fileobj.close().........【阅读全文】
发布时间:2013-05-23 11:21:34
from distutils.core import setupimport py2exesetup(console=["birdman.py"])#需要安装py2exe,推荐使用python 2.7.3,py2exe 则使用对应的版本......【阅读全文】
发布时间:2013-05-23 11:17:20
#-*-coding:utf-8-*-import osimport sysimport urllib2import pygameimport reimport socketimport subprocess# 输入要测试的site值print "Hello"print pygame.versite=raw_input("Pls Input Your Site:")req = urllib2.Request('http://192.168.1.88/cc.txt')fd = urllib2.urlopen(req)#http://192.168.........【阅读全文】
发布时间:2013-05-15 19:49:13
#!/usr/bin/env python#coding:utf-8import os,sys,socketif len(sys.argv) != 3 : print './tcpporttest.py IP PORT' sys.exit()HOST = sys.argv[1]PORT = sys.argv[2]s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)ADDR = (str(HOST),int(PORT))f.........【阅读全文】