icons/reflectivity_plugin/exportimages.py
raw| 1 | ''' |
| 2 | A utillity that exports all png files in the scripts directory |
| 3 | to a python file using img2py |
| 4 | ''' |
| 5 | |
| 6 | import wx.tools.img2py as impy |
| 7 | import os |
| 8 | |
| 9 | files = [file for file in os.listdir('.') if file[-4:] == '.png'] |
| 10 | |
| 11 | appending = False |
| 12 | |
| 13 | for file in files: |
| 14 | impy.img2py(file, 'images.py', append = appending, imgName = file[:-4], |
| 15 | functionCompatibile=True, functionCompatible=True) |
| 16 | appending = True |