#!/usr/bin/env python #...for the path. import os #...for getting the files in the current directory. import glob # Get the current working directory. currdir = os.getcwd() if __name__ == "__main__": print("*===========*") print("* test03.py *") print("*===========*") 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("")