#!/usr/bin/env python #...for the path. import os #...for getting the files in the current directory. import glob #...for the MATH! import numpy as np # Get the current working directory. currdir = os.getcwd() if __name__ == "__main__": print("*===========*") print("* test04.py *") print("*===========*") print("") print("* Testing importing non-standard Python modules.") print("*") print("* Current working directory is '%s'" % (currdir)) print("") print("* Found files:") # Loop over the files in the current directory. for fn in glob.glob(currdir + "/*"): print("*--> '%s'" % (fn)) print("") myarray = np.array([1, 2, 3]) print "Array:", myarray print("") print("Array[0]: %d" % (myarray[0])) print("")