annotate home/ross/galaxy/tools/tool_makers/toolfactory/test-data/pyrevpos.python @ 120:0c6c3e10a8f4 draft

Uploaded
author fubar
date Thu, 07 Jan 2021 09:22:51 +0000
parents e95d9fe5ab50
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
47
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
1 # reverse order of text by row
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
2 import sys
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
3 inp = sys.argv[1]
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
4 outp = sys.argv[2]
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
5 i = open(inp,'r').readlines()
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
6 o = open(outp,'w')
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
7 for row in i:
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
8 rs = row.rstrip()
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
9 rs = list(rs)
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
10 rs.reverse()
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
11 o.write(''.join(rs))
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
12 o.close()
e95d9fe5ab50 adding tests and local installation
fubar
parents:
diff changeset
13