main.py 753 Bytes
Newer Older
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 29 30 31
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def usage( prog_name ):
    print "  Usage:", prog_name
    print "    Example:", prog_name

if __name__ == "__main__":
    import sys

    # Add the local installation directory of the demonstration spam module
    lib_dir  = sys.path[0] + '/../src_2'
    sys.path = [lib_dir] + sys.path

    try:
        import add
    except ImportError:
        print "  FAIL: Cannot load the demonstration module spam."
        print "    hint: cd ../src_2 ; make ; cd -"
        exit( -1 )

    print add.zadd.__doc__

    print add.zadd( [1,2], [1,2] )

    # spam.system('echo "  SUCCESS: Loading spam module done."')

    # if ( len( sys.argv[ 1: ] ) != 2 ):
    #     usage( sys.argv[ 0 ] )
    #     exit( 0 )