annotate toolfactory/test-data/pyrevpos.python @ 0:43edf22e8cbc draft

Toolshed seems cranky on very old metadata. Trying a new repo. Again
author fubar
date Sat, 17 Apr 2021 23:43:33 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
1 # reverse order of text by row
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
2 import sys
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
3 inp = sys.argv[1]
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
4 outp = sys.argv[2]
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
5 i = open(inp,'r').readlines()
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
6 o = open(outp,'w')
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
7 for row in i:
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
8 rs = row.rstrip()
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
9 rs = list(rs)
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
10 rs.reverse()
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
11 o.write(''.join(rs))
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
12 o.close()
43edf22e8cbc Toolshed seems cranky on very old metadata. Trying a new repo. Again
fubar
parents:
diff changeset
13