| Revision 2d08f8b,
887 bytes
checked in by Marco Antonio Islas Cruz <markuz@…>, 21 months ago
(diff) |
- Changed the tabs to use space tabs instead tabs.
|
-
Property mode set to
100644
|
| Line | |
|---|
| 1 | #!/usr/bin/env python |
|---|
| 2 | # $Rev: 1201 $ |
|---|
| 3 | # $Author: marco $ |
|---|
| 4 | # $LastChangedDate: 2008-04-30 10:06:13 -0500 (Wed, 30 Apr 2008) $ |
|---|
| 5 | import gc |
|---|
| 6 | |
|---|
| 7 | import sys |
|---|
| 8 | import logging |
|---|
| 9 | |
|---|
| 10 | if len(sys.argv) < 2: |
|---|
| 11 | modulo = raw_input('Prueba a correr: \n') |
|---|
| 12 | sys.argv.append(modulo) |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | level = logging.DEBUG |
|---|
| 16 | |
|---|
| 17 | logging.basicConfig(level=level, |
|---|
| 18 | format='%(asctime)s %(name)-15s %(levelname)s:%(lineno)s %(message)s') |
|---|
| 19 | |
|---|
| 20 | logger = logging.getLogger('guitest') |
|---|
| 21 | |
|---|
| 22 | gc.set_debug(gc.DEBUG_LEAK) |
|---|
| 23 | gc.enable() |
|---|
| 24 | |
|---|
| 25 | def showGarbage(): |
|---|
| 26 | ''' |
|---|
| 27 | Muestra la informacion de basura encontrada por el colector de basura |
|---|
| 28 | ''' |
|---|
| 29 | for x in gc.garbage: |
|---|
| 30 | s = str(x) |
|---|
| 31 | if len(s) > 80: s = s[:80] |
|---|
| 32 | print type(x), "\n ", s |
|---|
| 33 | return True |
|---|
| 34 | |
|---|
| 35 | def importName(modulename, name): |
|---|
| 36 | module = __import__(modulename, globals(), locals(), [name]) |
|---|
| 37 | return vars(module)[name] |
|---|
| 38 | |
|---|
| 39 | importName('christinetests',sys.argv[1]) |
|---|
| 40 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.