annotate toolfactory/test-data/pyrevpos.python @ 1:2fc9b11bbdba draft

Uploaded
author fubar
date Sun, 18 Apr 2021 02:01:06 +0000
parents 43edf22e8cbc
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