Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_create_qss():
# Should not raise a CompileError
create_qss()
generate_qrc_file()
print('Converting .qrc to _rc.py and/or .rcc ...')
os.chdir(args.qrc_dir)
for qrc_file in glob.glob('*.qrc'):
# get name without extension
filename = os.path.splitext(qrc_file)[0]
print(filename, '...')
ext = '_rc.py'
ext_c = '.rcc'
# Create variables SCSS files and compile SCSS files to QSS
print('Compiling SCSS/SASS files to QSS ...')
create_qss()
# creating names
py_file_pyqt5 = 'pyqt5_' + filename + ext
py_file_pyqt = 'pyqt_' + filename + ext
py_file_pyside = 'pyside_' + filename + ext
py_file_pyside2 = 'pyside2_' + filename + ext
py_file_qtpy = '' + filename + ext
py_file_pyqtgraph = 'pyqtgraph_' + filename + ext
# calling external commands
if args.create in ['pyqt', 'pyqtgraph', 'all']:
print("Compiling for PyQt4 ...")
try:
call(['pyrcc4', '-py3', qrc_file, '-o', py_file_pyqt])
except FileNotFoundError:
print("You must install pyrcc4")