http://www.python.org/ftp/python/2.5.5/Python-2.5.5.tar.bz2
tar jxf Python-2.5.5.tar.bz2
cd Python-2.5.5
./configure
make
make test
make install
2011年4月28日 星期四
2011年4月22日 星期五
"SyntaxError: invalid syntax" with python 2.4
在python 2.4 使用try-except-finally 時出現(如下), 是因為要到python 2.5 時才完全支援try-except-finally
File "try-except.py", line 13
finally:
^
SyntaxError: invalid syntax
in python 2.4 可以改用
try:
try:
except:
finally:
try:
except:
finally:
2011年4月21日 星期四
Upgrade CentOS 5.5 to 5.6
yum clean all yum update glibc\* yum update yum\* rpm\* pyth\* yum clean all yum update mkinitrd nash yum update selinux\* yum update shutdown -r now
Reference:
[] http://wiki.centos.org/zh-tw/Manuals/ReleaseNotes/CentOS5.6
2011年1月31日 星期一
Upgrade CentOS 5.4 to 5.5
方法一:
yum clean all
yum update glibc\*
yum update yum\* rpm\* python\*
yum clean all
yum update
reboot
方法二:
Clean All Packages
# yum clean all
The following command will get a list of packages that are going to be updated.
# yum list updates
Lets begin upgrading CentOS 5.4 to 5.5
# yum update
Finally reboot the server for Kernel changes to take effect
# reboot
檢查版本
lsb_release -a
[references]
http://www.how2centos.com/upgrading-centos-5-4-to-5-5/
http://www.unixmen.com/news-today/999-centos-55-is-out-upgrade-now-from-centos-54-to-55
yum clean all
yum update glibc\*
yum update yum\* rpm\* python\*
yum clean all
yum update
reboot
方法二:
Clean All Packages
# yum clean all
The following command will get a list of packages that are going to be updated.
# yum list updates
Lets begin upgrading CentOS 5.4 to 5.5
# yum update
Finally reboot the server for Kernel changes to take effect
# reboot
檢查版本
lsb_release -a
[references]
http://www.how2centos.com/upgrading-centos-5-4-to-5-5/
http://www.unixmen.com/news-today/999-centos-55-is-out-upgrade-now-from-centos-54-to-55
2011年1月25日 星期二
常用的 Python指令及其說明
常用的 Python指令及其說明 [轉載: 我是孩子王
sys模組:
argv: 命令列參數。
exit([arg]): 結束程式。
exitfunc: 若有指定此函式,程式結束前會先呼叫此函式。
getopt模組:
getopt(args, options[, long_options]): 解譯命令列參數選項的工具。
sys模組:
argv: 命令列參數。
exit([arg]): 結束程式。
exitfunc: 若有指定此函式,程式結束前會先呼叫此函式。
getopt模組:
getopt(args, options[, long_options]): 解譯命令列參數選項的工具。
訂閱:
文章 (Atom)