Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102920 > unrolled thread
| Started by | Antoon Pardon <antoon.pardon@rece.vub.ac.be> |
|---|---|
| First post | 2016-02-14 19:23 +0100 |
| Last post | 2016-02-14 19:23 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: ftplib throws: IndexError: tuple index out of range Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2016-02-14 19:23 +0100
| From | Antoon Pardon <antoon.pardon@rece.vub.ac.be> |
|---|---|
| Date | 2016-02-14 19:23 +0100 |
| Subject | Re: ftplib throws: IndexError: tuple index out of range |
| Message-ID | <mailman.115.1455474240.22075.python-list@python.org> |
Op 14-02-16 om 14:40 schreef Peter Otten:
>
> PS: How did you produce the overview over the local variables? That looks
> nice.
>
I started from this recipe: http://code.activestate.com/recipes/52215-get-more-information-from-tracebacks/
made it more to my liking and turned it into a module. So that instead of a program being run like this:
def program(argv):
...
if __name__ == '__main__':
program(sys.argv)
I start it now like this
from pymain import main
def program(argv):
...
if __name__ == '__main__':
main(program)
pymain.main will then trap almost all exceptions and produces the overview over
the local variables.
--
Antoon.
Back to top | Article view | comp.lang.python
csiph-web