python 简单脚本练习1

#fa file split name

```

#!/usr/bin/evn python2

# -*- coding: utf-8 -*-

__author__='xxx'

import sys, os

def rename_forzwp3(infile, outfile):

        ini = open(infile, 'r')

        out = open(outfile, 'w')

        for i in ini:

                i = i.strip()

                if i.startswith('>'):

                        print >>out, ">"+i.split('::')[1]

                else:

                        print >>out, i

if __name__=='__main__':

        infile=sys.argv[1]

        outfile=sys.argv[2]

        rename_forzwp3(infile,outfile)

```

你可能感兴趣的:(python 简单脚本练习1)