Last active
May 18, 2022 18:17
-
-
Save spoterianski/9b30bee2b9e709324f70 to your computer and use it in GitHub Desktop.
python fish
This file contains 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
#!/usr/bin/env python | |
# coding=utf-8 | |
import sys | |
def go(filename): | |
f = open(filename) | |
while 1: | |
lines = f.readlines(100000) | |
if not lines: | |
break | |
for line in lines: | |
print(line) | |
file.close() | |
def main(): | |
if len(sys.argv) < 2: | |
print('usage: ' + sys.argv[0] + ' [filename]') | |
return | |
go(sys.argv[1]) | |
if __name__ == '__main__': | |
main() | |
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment