Duplicated code:
if not fname == "":
folderPath.delete(0, END) ## This is to erase anything in the "browse" bar
folderPath.insert(0, fname) ## and use what has been selected from the selection window
else:
folderPath.insert(0, fname)
You have folderPath.insert(0, fname)
in both the if
and the else
, at the end of each. Remove duplicated code like this and place it after the if
/else
:
if not fname == "":
folderPath.delete(0, END) ## This is to erase anything in the "browse" bar
folderPath.insert(0, fname)
PEP8
Your code does not follow PEP8 standards. This is the recommended style guideline for Python, and most Python programmers follow it.
Naming:
d
is not a descriptive variable name (def makedirs(d):
), not is f
(with open(filename,'w') as f:
). You use good names in most other places, so please be consistent.
Comparison to Boolean Literals:
You do not need to compare a value to False
or True
: if said_it == False:
. Just use if not said_if:
. Again, you do this in other places in your code.
Addition:
count = count+1
can be count += 1
.