由于在Windows中使用Ulipad一段时间了,尤其对于Python代码的编辑功能,我觉得目前还没有一款别的编辑器能与之媲美(当然Ulipad也有美中不足的地方)。下面介绍一下在Linux下Ulipad的安装,由于没有像Windows下那样的exe安装文件,所以Uinux下安装Ulipad只能是下载Ulipad的源码,进行编译安装。下面讲讲我在Ubuntu中的安装步骤:
一 . 安装wxpython。
由于Ulipad的界面是用wxpython写的,所以要先安装wxpython,而且是2.8版本以上的。
安装wxpython的方法,这里简单说下步骤。
1 .The packages and the repository meta-data are digitally signed, so you’ll need to import the key
into your apt’s list of trusted keys in order to not get warnings about it.
$ ping -c 3 1f07fc62-7e3f-4f2b-94ae-651446ee5b2d.ids.heibaidiguo.cn| sudo apt-key add – 如果没有任何信息打印出来,则说明目前linux里面没有关于wxpython的源,需要我们手动添加源,方法如下:
2. Add the following lines to your /etc/apt/sources.list file (or use the “software sources”
program under the “system” menu). Replace the “DIST” text with whatever is appropriate for
your system.
(See the table below for a list of supported distributions and architectures.)
(把下面的内容添加到你的sources.list文件里,这里要详细说明一下,DIST是指的你的linux的发行版本,详细的版本查询可以通过上面我们给的连接,打开后,页面下面有个表,列出了Ubuntu的一些发行版本信息,比如下面的例子里,是gutsy,指的是ubuntu7.10)
# wxWidgets/wxPython repository at apt.wxwidgets.org
deb http://apt.wxwidgets.org/ DIST-wx main
deb-src http://apt.wxwidgets.org/ DIST-wx main
For example, if your distro is Ubuntu Gutsy, then you would use the following configuration
statements:
# wxWidgets/wxPython repository at apt.wxwidgets.org
deb http://apt.wxwidgets.org/ gutsy-wx main
deb-src http://apt.wxwidgets.org/ gutsy-wx main
我的ubuntu是8.10,查那个表可以知道DIST name是intrepid,就可以把DIST 改为intrepid,注
意与前面的/之间空一个空格 ,其实这个DIST name有个简单的方法能得到,就是在shell里输
入命令: cat /etc/*-release
xiaopeng@ubuntu:~$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION=”Ubuntu 8.10″
上面是我的结果,可以知道DIST name是intrepid
3. run the this command to update your local copy of the package meta-data.
sudo apt-get update
4. You can now use your favorite package selection tool to install or upgrade the wxWidgets and
wxPython packages. Here’s how to do it with apt-get:
sudo apt-get install python-wxgtk2.8 python-wxtools python-wxaddons wx2.8-i18n
These packages (and their dependencies) will replace earlier versions of wxPython and wxGTK in
the same ReleaseSeries that may have been installed previously.
以上就是安装wxpython,想知道是否安装成功,可以在python命令行中输入import wx 看看是否错误提示输出,如果没有,则说明安装基本成功。
二 下载Ulipad源代码,可以去http://code.google.com/p/ulipad/下载,我下载的是ulipad4.0,然后就是解压,通过python运行里面的UliPad.py就可以启动Ulipad。