astuces_python
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | astuces_python [2010/07/21 11:05] (current) – created ginko | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Astuces Python ====== | ||
+ | ===== Gestion des exceptions ===== | ||
+ | |||
+ | * Tuto officiel sur la gestion des exceptions [[http:// | ||
+ | * La bibliothèque '' | ||
+ | except: | ||
+ | errMsg = sys.exc_info[1] | ||
+ | # soit on remonte le message vers l' | ||
+ | print errMsg | ||
+ | # soit on re-lève l' | ||
+ | raise MyError(errMsg)</ | ||
+ | * Les built-in exceptions [[http:// | ||
astuces_python.txt · Last modified: 2010/07/21 11:05 by ginko