Skip to content

Instantly share code, notes, and snippets.

@optixx
Created August 14, 2011 11:12
Show Gist options
  • Save optixx/1144806 to your computer and use it in GitHub Desktop.
Save optixx/1144806 to your computer and use it in GitHub Desktop.
Concat css files
#!/usr/bin/python
import os
def main():
data = str()
for root, dirs, files in os.walk("."):
for file in files:
path = os.path.join(root,file)
print path
if path.endswith("css"):
data += open(path,"r").read()
open("out.ccs","w").write(data)
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment