Created
May 18, 2010 07:35
-
-
Save mactanxin/404735 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8-*- | |
from __future__ import with_statement | |
import sys | |
def sortu(filename): | |
with open(filename) as f: | |
x = open(targetfile,"w") | |
for j in list(set([i.strip() for i in f])) : | |
print >> x,j | |
x.close() | |
if __name__ == '__main__': | |
filename = sys.argv[1] | |
targetfile = sys.argv[2] | |
sortu(filename) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment