import os

# fileType = 'png'

with open('{}Qrc.qrc'.format('static'), 'w') as f:
	f.write(
		'''<RCC>
    <qresource prefix="/static">

    ''')

	for root, dirs, files in os.walk('..\\Static'):
		for file in files:
			if file.split('.')[-1] in ['qss']:
				print(file)
				f.write('		<file alias="{}">{}</file>\r\n'.format(file, os.path.join(root,file)))

	f.write('''
	</qresource>
</RCC>
		''')


cmd = 'pyrcc5 -o {}.py {}Qrc.qrc'.format('static', 'static')
os.system(cmd)