Skip to content

Commit 5503bf2

Browse files
Merge pull request geekcomputers#317 from goswami-rahul/patch-1
fixed input function
2 parents 5bc513f + cbdd2ac commit 5503bf2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fileinfo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@
1616
import stat # index constants for os.stat()
1717
import time
1818

19+
if sys.version_info >= (3, 0):
20+
raw_input = input
21+
1922
try_count = 16
2023

2124
while try_count:
22-
file_name = input("Enter a file name: ") # pick a file you have
25+
file_name = raw_input("Enter a file name: ") # pick a file you have
2326
fhand = open(file_name)
2427
count = 0
2528
for lines in fhand:

0 commit comments

Comments
 (0)