Last active
September 28, 2016 01:22
-
-
Save tuxknowledge/4666985 to your computer and use it in GitHub Desktop.
Notepad++ Helferlein
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fnmatch | |
import os | |
src = '<Path>' | |
pattern = '*.py' | |
matches = [] | |
for root, dirnames, filenames in os.walk(src): | |
for filename in fnmatch.filter(filenames, pattern): | |
matches.append(os.path.join(root, filename)) | |
for match in matches: | |
notepad.open(f) | |
#notepad.runMenuCommand("Encoding", "Convert to UTF-8 without BOM") | |
#notepad.runMenuCommand("Edit", "UNIX/OSX Format") | |
notepad.runMenuCommand("Edit", "Trim Trailing Space") | |
notepad.save() | |
notepad.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Als Skript für Notepad++ nutzbar :-)