Exemple #1
0
Fichier : d.py Projet : 2XL/TestRMQ
def appendParentDir(num, currdir):
    print currdir
    if num is 0:
        print 'return value'
        sys.path.append(currdir)
        return currdir
    else:
        dirname, basename = os.path.split(currdir)
        num-=1
        return appendParentDir(num, dirname)

if __name__ == '__main__':
    print 'hello world'

    print os.getcwd()
    print os.path.realpath(__file__)
    print os.path.dirname(os.path.realpath(__file__))

    print os.pardir
    print os.path.relpath(os.getcwd())
    ast = appendParentDir(1, '/home/x/Code/BenchBox/workload_generator')
    print 'PARENT'
    print ast
    print 'end parent'




    from a import a
    aaaa = a.a()
Exemple #2
0
def d():
    return a()
Exemple #3
0
 def gen(self):
    r=a.a(1)
    return r