Created
March 15, 2018 21:34
-
-
Save bgamut/3b19d3f45ffec19cae6baff993fbb57e to your computer and use it in GitHub Desktop.
decompile all pic file in midi remote scripts directory.
This file contains 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 os | |
from fnmatch import fnmatch | |
import subprocess | |
root = "/Users/bernardahn/Desktop/MIDI Remote Scripts" | |
pattern="*.pyc" | |
for path, subdirs,files in os.walk(root): | |
for name in files: | |
if fnmatch(name,pattern): | |
index=os.path.splitext(name)[0] | |
newfile=index+".py" | |
newfile=os.path.join(path,newfile) | |
subprocess.call(["touch",newfile]) | |
subprocess.call(["uncompyle6","-o",newfile,os.path.join(path,name)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment