![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python 异常处理
StudyQuant
项目制的量化投资学院
展开
-
IOError: [Errno 22] invalid mode ('r') or filename -- Python IO 异常处理系列
IOError: [Errno 22] invalid mode (‘r’) or filename: 这种错误的出现是在使用built-in函数file()或者open()的时候。或者是因为文件的打开模式不对,或者是文件名有问题。前者的话只需要注意文件是否可读或者可写就可以了。后者则是与文件路径相关的问题,需要在文件名前加r或者R转义,如:file(r”e:\Test.txt”,’r’).或者...转载 2018-07-31 21:14:26 · 884 阅读 · 0 评论 -
Python from . import 模块 是什么意思?
python import 讲解一. 官方文档sound/ Top-level packageinit.py Initialize the sound packageformats/ Subpackage for file format conversionsinit.pyw...原创 2018-11-01 13:35:50 · 24077 阅读 · 0 评论