1 Star 0 Fork 262

张含玉/meeting

forked from 黄煜旸/meeting 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
text.py 1004 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhang-hanyuhanyu 提交于 2023-04-06 10:21 . 张含玉的第五次修改
# Script Name : fileinfo.py
# Author : Not sure where I got this from
# Created : 28th November 2011
# Last Modified :
# Version : 1.0
# Modifications :
# Description : Show file information for a given file
# get file information using os.stat()
# tested with Python24 vegsaeat 25sep2006
from __future__ import print_function
import os
import stat # index constants for os.stat()
import sys
import time
if sys.version_info >= (3, 0):
raw_input = input
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()
file_stats = os.stat(file_name)
# create a dictionary to hold file info
while (True):
a=0
print("hello world everyone")
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/zhang-hanyuhanyu/meeting.git
git@gitee.com:zhang-hanyuhanyu/meeting.git
zhang-hanyuhanyu
meeting
meeting
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385