PASTE-IT!

Holding 569M in 38484 pastes. Meet us at #paste-it.net, OFTC!
Try our Mozilla Jetpack clipboard paster and our Chrome extension!
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
[manuel] [~]$ python hello.py
> /home/manuel/hello.py(26)<module>()
-> for palabra in texto:
(Pdb) list
 21         print "Funcion: world end"
 22
 23     if __name__ == "__main__":
 24         texto = "mi primer variable que se crea"
 25         texto = texto.split()
 26  ->     for palabra in texto:
 27             capitalize = palabra.capitalize()
 28             pdb.set_trace()
 29         pdb.set_trace()     # hago que el programa frene en esta línea
 30         hello()
 31         pdb.set_trace()     # y en esta
(Pdb) !print texto
['mi', 'primer', 'variable', 'que', 'se', 'crea']
(Pdb) continue
> /home/manuel/hello.py(26)<module>()
-> for palabra in texto:
(Pdb) !print capitalize
Primer
(Pdb) continue
> /home/manuel/hello.py(26)<module>()
-> for palabra in texto:
(Pdb) !print capitalize
Variable
(Pdb) next
> /home/manuel/hello.py(27)<module>()
-> capitalize = palabra.capitalize()
(Pdb) !print capitalize
Variable
(Pdb) next
> /home/manuel/hello.py(28)<module>()
-> pdb.set_trace()
(Pdb) !print capitalize
Que
(Pdb) continue
> /home/manuel/hello.py(26)<module>()
-> for palabra in texto:
(Pdb) help

Documented commands (type help <topic>):
========================================
EOF    break  commands   debug    h       l     pp      s        up
a      bt     condition  disable  help    list  q       step     w
alias  c      cont       down     ignore  n     quit    tbreak   whatis
args   cl     continue   enable   j       next  r       u        where
b      clear  d          exit     jump    p     return  unalias

Miscellaneous help topics:
==========================
exec  pdb

Undocumented commands:
======================
retval  rv

(Pdb) where
> /home/manuel/hello.py(26)<module>()
-> for palabra in texto:
(Pdb) whatis texto
<type 'list'>
(Pdb) continue
> /home/manuel/hello.py(26)<module>()
-> for palabra in texto:
(Pdb) continue
> /home/manuel/hello.py(26)<module>()
-> for palabra in texto:
(Pdb) !print capitalize
Crea
(Pdb) continue
> /home/manuel/hello.py(30)<module>()
-> hello()
(Pdb) list
 25         texto = texto.split()
 26         for palabra in texto:
 27             capitalize = palabra.capitalize()
 28             pdb.set_trace()
 29         pdb.set_trace()     # hago que el programa frene en esta línea
 30  ->     hello()
 31         pdb.set_trace()     # y en esta
 32         world()
 33         print "Final del programa de prueba" [EOF]
(Pdb) continue
Funcion: hello start
numero es la variable con el contenido 98
> /home/manuel/hello.py(12)hello()
-> print "Funcion: hello end"
(Pdb) args
(Pdb) cont
Funcion: hello end
> /home/manuel/hello.py(32)<module>()
-> world()
(Pdb) continue
Funcion: world start
> /home/manuel/hello.py(19)world()
-> if hello():
(Pdb) !print otro_numero
32.5
(Pdb) return
Funcion: hello start
numero es la variable con el contenido 98
> /home/manuel/hello.py(12)hello()
-> print "Funcion: hello end"
(Pdb) continue
Funcion: hello end
la funcion hello() devolvió True
Funcion: world end
Final del programa de prueba
[manuel] [~]$
Python Debug
by
humitos
pasted
880 day(s) ago
03:57 16-10-2007
in syntax