view kill-comments @ 106:5b0753c6f34d laserkard tip

updated to newest compojure and a simpler syntax
author Robert McIntyre <rlm@mit.edu>
date Mon, 27 Sep 2010 20:22:58 -0400
parents 52297178e0eb
children
line wrap: on
line source
1 #!/usr/bin/python
3 import subprocess
4 import sys
5 import os
7 target_file = sys.argv[1]
9 command = "emacs -batch -l ~/.emacs-batch " + \
10 target_file + \
11 " --eval '(kill-comment (count-lines (point-min) (point-max)))'" + \
12 " -f save-buffer"
14 #to load a custom .emacs script (for more syntax support),
15 #use -l <file> in the above command
17 #print command
19 fnull = open(os.devnull, 'w')
20 subprocess.call(command, shell = True, stdout = fnull, stderr = fnull)
21 fnull.close()