annotate toolfactory/test-data/pyrevpos.python @ 2:9fd3d83e1bac draft

Deleted selected files
author fubar
date Sat, 17 Apr 2021 22:58:13 +0000
parents fc50a3f507ab
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
1 # reverse order of text by row
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
2 import sys
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
3 inp = sys.argv[1]
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
4 outp = sys.argv[2]
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
5 i = open(inp,'r').readlines()
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
6 o = open(outp,'w')
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
7 for row in i:
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
8 rs = row.rstrip()
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
9 rs = list(rs)
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
10 rs.reverse()
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
11 o.write(''.join(rs))
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
12 o.close()
fc50a3f507ab Need a new repo - old tool_factory_2 is broken
fubar
parents:
diff changeset
13