Python
Z Varhoo
(Rozdíly mezi verzemi)
(→debug) |
|||
(Není zobrazena 1 mezilehlá verze od 1 uživatele.) | |||
Řádka 17: | Řádka 17: | ||
import sys |
import sys |
||
print sys.version |
print sys.version |
||
+ | |||
+ | |||
+ | ==Debug== |
||
+ | |||
+ | Add folowing line to code |
||
+ | |||
+ | import pdb; pdb.set_trace() |
||
+ | |||
+ | * '''l''' - show code |
||
+ | * '''n''' - step to next line |
||
+ | * '''s''' - drill down fo method |
||
+ | * '''c''' - continue |
Aktuální verze z 23. 10. 2014, 12:12
Návody
- python - lineární filter
- python - half float 16bit
- python - sbírka hezkých konstrukcí
- python - zajímavé projekty
- uwsgi
Vychytávky - Interesting construction -> run this script with python 2.6 and look at result
#!/bin/bash """:" exec python2.7 "$0" "$@" """ import sys print sys.version
[editovat] Debug
Add folowing line to code
import pdb; pdb.set_trace()
- l - show code
- n - step to next line
- s - drill down fo method
- c - continue