Changeset 278 for CMTpy


Ignore:
Timestamp:
Oct 12, 2006, 4:01:03 PM (18 years ago)
Author:
garonne
Message:

HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMTpy/HEAD/python/cmt.py

    r276 r278  
    44
    55Simple usage:
    6 
    76    import CMT
    87
    9     if __name__ == '__main__':
    10         unittest.main()
     8    if __name__ == "__main__":
     9
     10        cmt = CMT()
     11   
     12        package = 'CMTpy'
     13   
     14        package_root = cmt.macro_value (package + '_root')   
     15        print  package_root
     16   
     17        if cmt.tag (package + '_with_installarea'):
     18            print package + ' strategy is with installarea'
     19   
     20        print "Macros: ", cmt.macros  , '\n'       
     21        print "Tags: ",   cmt.tags    , '\n'
     22        print "Sets: ",   cmt.sets    , '\n'     
     23   
    1124'''
    1225__author__ = "Vincent Garonne"
    1326__email__ = "garonne at lal dot in2p3 dot fr"
    14 __version__ = "1"
     27__version__ = "HEAD"
    1528__all__     = ["CMT"]
    1629
     
    2740#----------------------------------------------------
    2841def execute (cmd):
    29      """Executing a shell command     
    30      """
     42    """Executing a shell command     
     43    """
    3144    #print '> ' + cmd
    3245    r, w, e = popen2.popen3(cmd)
     
    165178
    166179if __name__ == "__main__":
    167     main(module=None)
     180
     181    cmt = CMT()
     182   
     183    package = 'CMTpy'
     184   
     185    package_root = cmt.macro_value (package + '_root')   
     186    print  package_root
     187   
     188    if cmt.tag (package + '_with_installarea'):
     189        print package + ' strategy is with installarea'
     190   
     191    print "Macros: ", cmt.macros  , '\n'       
     192    print "Tags: ",   cmt.tags    , '\n'
     193    print "Sets: ",   cmt.sets    , '\n'     
     194
     195#--------------------------------- EoF --------------------------------------#
    168196   
    169197   
Note: See TracChangeset for help on using the changeset viewer.