791e09b24641b6d372ba08c59b6b801440c767b2,fileinfo.py,,,#,19
Before Change
if sys.version_info >= (3, 0):
raw_input = input
try_count = 16
while try_count:
file_name = raw_input("Enter a file name: ") // pick a file you have
fhand = open(file_name)
count = 0
for lines in fhand:
count = count + 1
fhand = open(file_name)
inp = fhand.read()
t_char = len(inp)
try_count >>= 1
try:
file_stats = os.stat(file_name)
print ("This is os.stat",file_stats)
break
except OSError:
print ("\nNameError : [%s] No such file or directory\n", file_name)
if try_count == 0:
After Change
file_name = raw_input("Enter a file name: ") // pick a file you have
count = 0
t_char = 0
try:
with open(file_name) as f:
line = f.readline()
t_char += len(line)
while line:
count += 1
line = f.readline()
t_char += len(line)
except FileNotFoundError as e:
print(e)
sys.exit()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: geekcomputers/Python
Commit Name: 791e09b24641b6d372ba08c59b6b801440c767b2
Time: 2019-08-14
Author: 35282147+Hong199@users.noreply.github.com
File Name: fileinfo.py
Class Name:
Method Name:
Project Name: geekcomputers/Python
Commit Name: 791e09b24641b6d372ba08c59b6b801440c767b2
Time: 2019-08-14
Author: 35282147+Hong199@users.noreply.github.com
File Name: fileinfo.py
Class Name:
Method Name:
Project Name: DexterInd/GoPiGo3
Commit Name: f8d97b8a228504adc12a2286c62f0fd7827a3a3c
Time: 2017-07-20
Author: robert.lucian.chiriac@gmail.com
File Name: Projects/BasicRobotControl/runnable.py
Class Name:
Method Name: Main
Project Name: DexterInd/GoPiGo3
Commit Name: 1fb289b0de21ec00d28046eff88d6da8f4c15319
Time: 2017-07-21
Author: robert.lucian.chiriac@gmail.com
File Name: Projects/BasicRobotControl/runnable.py
Class Name:
Method Name: Main