Notice
Recent Posts
Recent Comments
Ansee
git clone warning: templates not found
아래 명령어를 터미널에서 작성하면 해결됨 git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree submodule update --init --recursive
Git
2016. 6. 26. 12:04
파일 관련 명령어
import os os.getcwd() : 현재 경로를 가져옵니다. os.chdir('./example') : 현재 경로에 존재하고 있는 폴더 안으로 들어갑니다. data = open('example.txt') 파일을 열고 그 파일을 파일 객체에 대입 print(data.readline(), end='') 파일에서 한 라인씩 읽고 출력합니다. data.seek(0) 파일의 제일 앞으로 돌아갑니다. data.close() 파일을 다 사용했으니 닫아줍니다.
Python 3
2016. 6. 26. 11:39