Python3 os 模块 Read 方法
Python3 os 模块 Read 方法 # !/usr/bin/python3 import os, sys # Open a file fd = os.open("foo.txt",os.O_RDWR) # Reading text ret = os.read(fd,12) print (ret.decode()) # Close opened file os.close(fd) print ("Closed the file successfully!!")
Python3 os 模块 Read 方法
# !/usr/bin/python3 import os, sys # Open a file fd = os.open("foo.txt",os.O_RDWR) # Reading text ret = os.read(fd,12) print (ret.decode()) # Close opened file os.close(fd) print ("Closed the file successfully!!")
交流与评论