Skip to content

Instantly share code, notes, and snippets.

@dapangmao
Last active August 29, 2015 14:04
Show Gist options
  • Save dapangmao/b0ba14b7dcfc83d152e5 to your computer and use it in GitHub Desktop.
Save dapangmao/b0ba14b7dcfc83d152e5 to your computer and use it in GitHub Desktop.
add comment to py
import sys
if len(sys.argv) < 3:
sys.exit("Must have infile and outfile")
with file(sys.argv[1], 'r+') as infile, file(sys.argv[2], 'w+') as outfile:
for x in infile:
outfile.write('* ' + x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment