Skip to content

Instantly share code, notes, and snippets.

@satoruhiga
Created December 15, 2011 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satoruhiga/1480109 to your computer and use it in GitHub Desktop.
Save satoruhiga/1480109 to your computer and use it in GitHub Desktop.
cstringify.py
#/usr/bin/env python
import sys, os
if len(sys.argv) is not 2:
print 'usage: ./cstringify.py [FILENAME]'
sys.exit(-1)
filename = sys.argv[1]
o = open(filename).read().split('\n')
for i in o:
if i is not "":
print '"%s"' % (i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment