You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
690 B
22 lines
690 B
import os
|
|
|
|
# 测试基本文件操作
|
|
input_file = r'D:\计量经济学\计量实验资料及作业要求\计量实验资料及作业要求\图文帖子原始信息计量实验使用.xlsx'
|
|
|
|
print("========================================")
|
|
print(" 简单测试")
|
|
print("========================================")
|
|
print(f"输入文件: {input_file}")
|
|
print()
|
|
|
|
# 检查文件是否存在
|
|
if os.path.exists(input_file):
|
|
print("文件存在!")
|
|
print(f"文件大小: {os.path.getsize(input_file) / 1024:.2f} KB")
|
|
else:
|
|
print("文件不存在!")
|
|
|
|
print()
|
|
print("========================================")
|
|
print(" 测试完成")
|
|
print("========================================")
|
|
|