Mercurial > repos > fubar > mashmap
annotate pyrev_pos_test/pyrev_pos_test.python.txt @ 1:0183cad9d13b draft
planemo upload
author | fubar |
---|---|
date | Thu, 22 Feb 2024 10:48:01 +0000 |
parents | |
children |
rev | line source |
---|---|
1 | 1 #raw |
2 ## reverse order of text by row | |
3 ## ToolFactory demonstration | |
4 ## positional parameters | |
5 import sys | |
6 inp = sys.argv[1] | |
7 outp = sys.argv[2] | |
8 i = open(inp,'r').readlines() | |
9 o = open(outp,'w') | |
10 for row in i: | |
11 rs = row.rstrip() | |
12 rs = list(rs) | |
13 rs.reverse() | |
14 o.write(''.join(rs)) | |
15 o.write('\n') | |
16 o.close() | |
17 #end raw |