随笔分类 -  python

摘要:今天在mac电脑上安装python的mysql时出现如下问题:该安装时是使用sudo pip install MySQL-python来安装mysql模块,安装没有问题,但是在python中导入MySQLdb的时候出现Traceback (most recent call last): File "... 阅读全文

posted @ 2015-09-07 20:17 铁猛 阅读(361) 评论(0) 推荐(0)

摘要:今天mac 10.10.5中安装wxpython,安装完wxpython使用import wx导入模块时出现Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/wxPython-3.0.2.0/... 阅读全文

posted @ 2015-08-23 08:04 铁猛 阅读(363) 评论(0) 推荐(0)

摘要:#!/usr/bin/python# -*- coding:utf-8 -*-#通过有道翻译来进行内容翻译import urllib2import urllibimport json#---------翻译方法定义 start---------#def transfer( transferStr ,... 阅读全文

posted @ 2015-08-19 20:51 铁猛 阅读(421) 评论(0) 推荐(0)

摘要:#返回当前的工作目录os.getcwd#print(os.getcwd())#改变一个目录 chdir(path)#列出所有的文件或者目录 listdir(path)#print(os.listdir('/etc'))#创建目录 mkdir(path)#创建多层目录 makedirs(path)#删... 阅读全文

posted @ 2015-08-18 15:36 铁猛 阅读(178) 评论(0) 推荐(0)

导航