File: __init__.py

package info (click to toggle)
mobyle 1.5.5%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,288 kB
  • sloc: python: 22,709; makefile: 35; sh: 33; ansic: 10; xml: 6
file content (28 lines) | stat: -rw-r--r-- 1,277 bytes parent folder | download | duplicates (4)
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
########################################################################################
#                                                                                      #
#   Author: Bertrand Neron,                                                            #
#   Organization:'Biological Software and Databases' Group, Institut Pasteur, Paris.   #  
#   Distributed under GPLv2 Licence. Please refer to the COPYING.LIB document.        #
#                                                                                      #
########################################################################################

import glob 
import os 


MOBYLEHOME = None
if os.environ.has_key('MOBYLEHOME'):
    MOBYLEHOME = os.environ['MOBYLEHOME']
if not MOBYLEHOME:
    import sys
    sys.exit('MOBYLEHOME must be defined in your environment')

for f in glob.glob( os.path.join( MOBYLEHOME , 'Src' , 'Mobyle' , 'Converter' , '*.py' ) ):
    module_name = os.path.splitext( os.path.basename(f) )[0]
    if module_name != '__init__':
        try: 
            module = __import__( module_name , globals(), locals(), [ module_name ])
            klass = getattr( module , module_name)
            locals()[ module_name ] = klass
        except Exception , e:
            continue