![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
lllxy
这个作者很懒,什么都没留下…
展开
-
解决了在Suse 10.1中导入readline提示no module named readline的问题
最近用到了python,我使用的Linux操作系统是Suse 10.1,我从http://www.python.org/ 下载了Python2.5.2源代码,拷贝到Suse服务器上,解压到/usr/local/Python.2.5.2/目录下,在这个目录下,我依次执行安装操作: ./configure ,make,make install后,可以在命令行下启动Python,运行很正常原创 2008-08-22 16:44:00 · 3394 阅读 · 2 评论 -
Suse10.1 中Python访问Mysql的环境设置
1.安装Python,安装的Python的版本是: 2.4.22.安装Mysql在/usr/local/Mysql中3.获取MySQLdb库 1). 从: http://sourceforge.net/projects/mysql-python 下载MySQLdb库: MySQL-python-1.2.2.tar.gz 把这个库放在: /usr/local/MySQL-pytho原创 2008-08-26 16:05:00 · 1970 阅读 · 0 评论 -
演示了Python中的字符串通过split分割后的使用和把分割后的字符串连接起来
shell> vi 2.py#!/usr/bin/env python str = ("i am a worker, and you are a student !")print str #split the str,if not specified the separator ,the whitespace is a separator,items is a s原创 2008-08-27 14:30:00 · 16414 阅读 · 2 评论 -
在Python 中使用模块和类
创建了一个python脚本: a1.py,在这个脚本中有一个类,假设为:class b,现在我要在脚本a2.py中使用类class b,我应该怎么导入?1.py和2.py在同一个路径下在2.py中是这样做的: import a1 #al是模块名称 bb = a1.b() //得到class b的一个对象bb原创 2008-08-28 17:33:00 · 1549 阅读 · 0 评论