Mercurial > laserkard
view kill-comments @ 103:52297178e0eb laserkard
implemented automatic text resize
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 28 Jul 2010 06:36:39 -0400 |
parents | 8ed3394e6b73 |
children |
line wrap: on
line source
1 #!/usr/bin/python3 import subprocess4 import sys5 import os7 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 command17 #print command19 fnull = open(os.devnull, 'w')20 subprocess.call(command, shell = True, stdout = fnull, stderr = fnull)21 fnull.close()