source: christine-module-tester.py @ 2d08f8b

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) $
5import gc
6
7import sys
8import logging
9
10if len(sys.argv) < 2:
11    modulo = raw_input('Prueba a correr: \n')
12    sys.argv.append(modulo)
13
14
15level = logging.DEBUG
16
17logging.basicConfig(level=level,
18          format='%(asctime)s %(name)-15s %(levelname)s:%(lineno)s %(message)s')
19
20logger = logging.getLogger('guitest')
21
22gc.set_debug(gc.DEBUG_LEAK)
23gc.enable()
24
25def 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
35def importName(modulename, name):
36    module = __import__(modulename, globals(), locals(), [name])
37    return vars(module)[name]
38
39importName('christinetests',sys.argv[1])
40
Note: See TracBrowser for help on using the repository browser.