PythonÒì³£´¦ÀíÌåϵ¼ò½é
PythonÄÚ½¨Òì³£Ìåϵ½á¹¹
BaseException
+--¡¡SystemExit
+--¡¡KeyboardInterrupt
+--¡¡GeneratorExit
+--¡¡Exception
+--¡¡StopIteration
+--¡¡StandardError
|¡¡¡¡¡¡¡¡+--¡¡BufferError
|¡¡¡¡¡¡¡¡+--¡¡ArithmeticError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡FloatingPointError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡OverflowError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡ZeroDivisionError
|¡¡¡¡¡¡¡¡+--¡¡AssertionError
|¡¡¡¡¡¡¡¡+--¡¡AttributeError
|¡¡¡¡¡¡¡¡+--¡¡EnvironmentError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡IOError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡OSError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡+--¡¡WindowsError¡¡(Windows)
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡+--¡¡VMSError¡¡(VMS)
|¡¡¡¡¡¡¡¡+--¡¡EOFError
|¡¡¡¡¡¡¡¡+--¡¡ImportError
|¡¡¡¡¡¡¡¡+--¡¡LookupError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡IndexError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡KeyError
|¡¡¡¡¡¡¡¡+--¡¡MemoryError
|¡¡¡¡¡¡¡¡+--¡¡NameError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡UnboundLocalError
|¡¡¡¡¡¡¡¡+--¡¡ReferenceError
|¡¡¡¡¡¡¡¡+--¡¡RuntimeError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡NotImplementedError
|¡¡¡¡¡¡¡¡+--¡¡SyntaxError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡IndentationError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡+--¡¡TabError
|¡¡¡¡¡¡¡¡+--¡¡SystemError
|¡¡¡¡¡¡¡¡+--¡¡TypeError
|¡¡¡¡¡¡¡¡+--¡¡ValueError
|¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡+--¡¡UnicodeError
|¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡+--¡¡UnicodeDecodeError
|¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡+--¡¡UnicodeEncodeError
|¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡+--¡¡UnicodeTranslateError
+--¡¡Warning
+--¡¡DeprecationWarning
+--¡¡PendingDeprecationWarning
+--¡¡RuntimeWarning
+--¡¡SyntaxWarning
+--¡¡UserWarning
+--¡¡FutureWarning
+--¡¡ImportWarning
+--¡¡UnicodeWarning
+--¡¡BytesWarning
²¶»ñÒì³£µÄ·½Ê½
·½·¨Ò»£º²¶»ñËùÓеÄÒì³£
¡¡'''¡¡²¶»ñÒì³£µÄµÚÒ»ÖÖ·½Ê½£¬²¶»ñËùÓеÄÒì³£¡¡'''
try:
a¡¡=¡¡b
b¡¡=¡¡c
except¡¡Exception,data:
print¡¡Exception,":",data
'''Êä³ö£º£¼type¡¡'exceptions.Exception'£¾¡¡:¡¡local¡¡variable¡¡'b'¡¡
referenced¡¡before¡¡assignment¡¡''
·½·¨¶þ£º²ÉÓÃtracebackÄ£¿é²é¿´Òì³££¬ÐèÒªµ¼ÈëtracebackÄ£¿é
'''¡¡²¶»ñÒì³£µÄµÚ¶þÖÖ·½Ê½£¬Ê¹ÓÃtraceback²é¿´Òì³£¡¡'''
try:
a¡¡=¡¡b
b¡¡=¡¡c
except:
print¡¡traceback.print_exc()
'''Êä³ö
Ïà¹ØÎĵµ£º
http://cocobear.info/blog/2009/01/16/use-python-deal-with-excel/
ʹÓÃPython´¦ÀíExcel±í¸ñ 2009Äê01ÔÂ16ÈÕ
¸ø°³µÄbossдµÄÒ»¸öС¹¤¾ß£¬Ê¹ÓÃPython¶ÔExcel½øÐÐͳ¼Æ£¬È»ºó°Ñ½áÊøÉú³ÉÒ»¸öеÄExcel±í¸ñ£¬Ê¹Óõ½ÁËxlrdºÍpyExceleratorÁ½¸ö¿â¡£
¼òµ¥µÄ½éÉÜÒ»ÏÂÕâÁ½¸ö¿â£¬ÏÈ˵xlrd£¬Õâ¸ö¿â¶ÁExcel±È½Ï·½±ã£¬¸÷ÖÖ·½·¨Ê¹ÓÃÆ ......
http://www.autohotkey.com/forum/topic53773.html
Q:I am searching for is a way to execute AHK commands from a Python script. Is this possible?
A:Yes. Here is an example.
tested with python2.6, requires AutoHotkey.dll in the working directory or path...
ahkpython.py:
#Persistent
dllc ......
ÀµÓºÆ(http://blog.csdn.net/lanphaday) Òë
ÒëÕß°´£ºPython¡¢luaºÍrubyÔÚC/C++ÊÇÈÕ½¥Ê½Î¢µÄÇé¿öÏ£¬ÔÚjava/.netµÄΧ¼ßÖÐŬÁ¦¿¹ÕùµÄÈý¸öµ±ºìСÉú¡£ÔÚTom GutschmidtµÄÖø×÷¡¶Game Programmng with Python, Lua and Ruby¡·Ò»ÊéÖУ¬½éÉÜÁËÈýÖÖÓïÑÔÔÚÓÎÏ·ÖеÄÓ¦Óã¬ÆäÖÐÓÈΪÁ˲»ÆðµÄÊÇÔÚÊéÖÐ×îºóÒ»ÕÂÖбȽÏÁËÈýÖֽű¾£¬×÷Õßà ......
ÀµÓºƣ¨http://laiyonghao.com£©
¹Ø¼ü×Ö£ºpython, easy_install, setuptools, myentunnel, polipo, windows, linux, socks5, http, proxy
ÒòΪһЩÖÚËùÖÜÖªµÄÔÒò£¬ÎÒÃÇÓÐÐ©ÍøÕ¾ÎÞ·¨·ÃÎÊ£¬Ôì³ÉÉú»îºÍÉú²úµÄ¾Þ´ó²»±ã¡£ÆäÖжÔÎÒÓ°Ïì±È½Ï´óµÄÒ»¸ö¾ÍÊǰ²×°Ä³Ð© Python Ä£¿éµÄʱºò£¬easy_install ÎÞ·¨·ÃÎʵ½ÍøÕ¾¡£ÔÚÕâÀï·ÖÏíÈ ......
RubyºÍPythonµÄÓï·¨±È½Ï
ÆäʵRubyºÍPython·Ç³£½Ó½ü£¬±È´ó¶àÊý±ðµÄÓïÑÔÒª½Ó½üµÄ¶à£¬ËùÒÔϲ»¶ÓÃɶ¾ÍÓÃɶ£¨´óʵ»°£¬ËäȻҲÊÇ·Ï»°£©¡£Óï·¨ÉϵIJî±ðËäÈ»ÓÐÄÇôһµã£¬´ó²¿·ÖÊÇsyntax sugar£¬ÎÒ¶·µ¨ÉÔ΢Áм¸¸ö£¨pythonÎÒÒ²ÍüµÃ²î²»¶àÁË£¬²»¶ÔµÄ´ó¼Ò¾¡¹ÜÀ´±Þʬ°É£©£¬µ«ÊÇÖ÷Òª²îÒ컹ÊÇÉè¼ÆË¼ÏëÉϵģºÁé»î ......