mainImagePath = "../Images/" def getIconSizes(library): path = mainImagePath + library + "/" print "Getting icon sizes from folders in path: " + path return ["medium", "large", "huge"] def getIconColors(library, size): path = mainImagePath + library + "/" + size + "/" print "Getting icon colors from folders in path: " + path return ["black", "white", "shine"] def getIconClassNames(library, size, color): path = mainImagePath + library + "/" + size + "/" + color + "/" print "Getting class names from .png files in path: " + path return ["arrow-up", "arrow-down"] libraries = ["glypghicons", "sweeticons2"] for library in iconLibraries: sizes = getIconSizes(library) for size in sizes: colors = getIconColors(library, size) for size in sizes: sizeClassName = 'icon-' + size print " sizeClassName = " + sizeClassName classNames = getIconClassNames(library, size, color) for className in classNames: iconClassName = 'icon-' + className.replace(".png", "") print " iconClassName = " + iconClassName
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question