annotate home/ross/galaxy/tools/tool_makers/toolfactory/test-data/pyrevpos.python @ 47:e95d9fe5ab50 draft

adding tests and local installation
author fubar
date Sun, 23 Aug 2020 21:02:03 -0400
parents
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