# -*- coding: utf-8 -*-
# requirements: pip install uncompyle6
from os.path import splitext, isdir
from os import listdir, system, mkdir
if __name__ == '__main__':
if system('uncompyle6 -h > NUL') != 0:
print('No requirements to do: pip install uncompyle6')
raise SystemExit(-1)
if not isdir('convert_py'):
mkdir('convert_py')
for e in listdir('.'):
file = splitext(e)[0]
extesion = splitext(e)[1]
if extesion == '.pyc':
system('uncompyle6 {0} > .\\convert_py\\{1}.py'.format(e, file))