顯示具有 Pyton 標籤的文章。 顯示所有文章
顯示具有 Pyton 標籤的文章。 顯示所有文章

2015年8月12日 星期三

python 3 source install On Centos

1. Download tar source
 https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz

2.  Untar
tar -xzf   Python-3.4.3.tgz

3. Compiler
./configure --prefix=/home/Andy/IBMS/Software/python/Python-3.4.1/bin
make
make test
make install

2012年7月27日 星期五

Python print exception message

        try:
                mainFUN()
        except :
                print 'Exception occur.. '
                #-- MyDebug
                import sys
                import traceback
                print "Unexpected error:", sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2]

2012年7月26日 星期四

Python Debug


 Execute command:

python -m pdb foo.py


A. next line
n

B. Set the break point
 b 3


C. run to break line
r










Reference:
http://fcamel-life.blogspot.tw/2011/07/python-debug.html

2012年7月25日 星期三

Python uninstall

python setup.py install --record files.txt And when you find out the list is complete: cat files.txt | xargs rm -rf


Reference: http://stackoverflow.com/questions/1550226/python-setup-py-uninstall