how can I print out a message if the action was successful?
For example: I want to write a string to a file, and if everything was ok, it should print out an "ok" message. It is possible with an easy way?
Edit:
for root, dirs, files in os.walk('/Users'):
for f in files:
fullpath = os.path.join(root, f)
if os.path.splitext(fullpath)[1] == '.'+ext:
outfile = open('log.txt', 'w')
outfile.write(fullpath)
outfile.close()