파이썬의 파일객체

춤추는망고·2020년 5월 17일
0

Python 에서 파일객체를 다루는 메소드로 open 을 사용함
open 메소드의 첫번째 인자로는 대상이 되는 리소스, 두번째 인자로는 리소스에 대한 처리방식이 옴

https://docs.python.org/3.8/tutorial/inputoutput.html#reading-and-writing-files
https://wikidocs.net/26

처리방식에서
r - 읽기
w - 쓰기
a - 추가

https://stackoverflow.com/questions/51163112/which-command-is-better-os-listdir-or-os-systemls-and-why

os.listdir() 으로 호출하면 ls 명령어로 받은 결과값이 배열로 나옴!

os.system() 은 인자로 오는 내용에 대하여 cli 에서 처리하도록 하는 파이썬의 운영체제 컨트롤 객체

os.popen() 은 공부해야됨!

subprocess 도 공부해야됨!
https://docs.python.org/3/library/subprocess.html

profile
지금까지 이런 망고는 없었다. 이것은 개발자인가 춤추는망고인가

0개의 댓글