鱼C论坛

 找回密码
 立即注册
查看: 2245|回复: 2

如何在macbook上python打开相同文件里面的文档

[复制链接]
发表于 2019-10-10 20:24:44 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
#
Python 3.7.4 (v3.7.4:e09359112e, Jul  8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> f=open('record.txt')
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>

    f=open('record.txt')
FileNotFoundError: [Errno 2] No such file or directory: 'record.txt'
>>> f = open('record.txt')
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
   
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2019-10-10 20:27:49 | 显示全部楼层
你确定 Python 的根目录下有叫 record.txt 的文件?
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-10-10 21:45:17 | 显示全部楼层
没有txt文件
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2026-1-19 23:02

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表