摘要:
#/usr/bin/env python#-*- coding:utf-8 -*-import urllibimport httplib2import socksimport osimport os.pathimport reimport tracebackfrom poster.encode import multipart_encodefrom poster.streaminghttp import register_openersimport urllib2class Httpclass(object):method = 'GET'headers = {'User 阅读全文
摘要:
#/usr/bin/env python#-*- coding:utf-8 -*-import sysreload(sys)sys.setdefaultencoding('utf-8')import osimport os.pathdef getpwd():#获取脚本路径path = sys.path[0]#判断为脚本文件还是py2exe编译后的文件,如果是脚本文件,则返回的是脚本的目录,如果是py2exe>编译后的文件,则返回的是编译后的文件路径if os.path.isdir(path):return pathelif os.path.isfile(path):ret 阅读全文