# Compute a set of current fullpaths fullpaths = os.listdir( '/home/nikos/public_html/data/apps/' )
# Load'em for fullpath in fullpaths: try: # Check the presence of a file against the database and insert if it doesn't exist cur.execute('''SELECT url FROM files WHERE url = %s''', fullpath.encode('utf-8') ) data = cur.fetchone() #URL is unique, so should only be one print( fullpath.encode('utf-8') ) Now why this does not print out the filenames when iterated in the for loop? One step forward is that when i run it liek this no error is being displyed in the error log. Please help, i ahve tried os.listdir() as Cameron suggested. -- http://mail.python.org/mailman/listinfo/python-list