Created
July 4, 2015 21:18
-
-
Save K-atc/4ef035b7c1f51f9d342d to your computer and use it in GitHub Desktop.
縦読み
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: UTF-8 | |
| import sys | |
| if not(len(sys.argv) >= 2): | |
| print "tateyomi: 縦読みしてくれるプログラム" | |
| print "usage: python tateyomi.py <file> [<offset>]" | |
| exit() | |
| offset = 0 | |
| if len(sys.argv) > 2: | |
| offset = int(sys.argv[2]) | |
| f = open(sys.argv[1], 'r') | |
| output = '' | |
| for line in f.readlines(): | |
| output += line[offset:offset+1] | |
| print output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment