edenzhan 发表于 2021-1-16 16:54:09

IDLE 里怎么查寻文件的所有操作方法

IDLE 里怎么查寻文件的所有操作方法

wp231957 发表于 2021-1-16 17:02:04

怎么可能

jackz007 发表于 2021-1-16 17:21:29

本帖最后由 jackz007 于 2021-1-16 17:22 编辑

      为什么非要在 IDLE 中查询?
      Python File(文件) 方法

qiuyouzhi 发表于 2021-1-16 17:33:01

>>> f = open("tmp.txt", "w")
>>> dir(f)
['_CHUNK_SIZE', '__class__', '__del__', '__delattr__', '__dict__', '__dir__', '__doc__', '__enter__', '__eq__', '__exit__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__ne__', '__new__', '__next__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '_checkClosed', '_checkReadable', '_checkSeekable', '_checkWritable', '_finalizing', 'buffer', 'close', 'closed', 'detach', 'encoding', 'errors', 'fileno', 'flush', 'isatty', 'line_buffering', 'mode', 'name', 'newlines', 'read', 'readable', 'readline', 'readlines', 'reconfigure', 'seek', 'seekable', 'tell', 'truncate', 'writable', 'write', 'write_through', 'writelines']

edenzhan 发表于 2021-1-16 18:32:22

qiuyouzhi 发表于 2021-1-16 17:33


多谢

qiuyouzhi 发表于 2021-1-16 19:34:22

edenzhan 发表于 2021-1-16 18:32
多谢

如果问题已解决,请设置最佳答案
页: [1]
查看完整版本: IDLE 里怎么查寻文件的所有操作方法