티스토리 뷰

공부

[Python] os.path; flask ap instance_path

승가비 2020. 6. 7. 16:42
728x90
filename = os.path.join(app.instance_path, 'dir', 'data.json')

https://stackoverflow.com/questions/36649703/get-root-path-of-flask-application

 

Get root path of Flask application

I'm working on a Flask extension from which I want to create a directory in the project's root path on the file system. Suppose we have this directory structure /project /app /tests /

stackoverflow.com

BASE_DIR = os.path.dirname(os.path.abspath(__file__))

https://itmining.tistory.com/122

 

[Python] 파이썬 파일과 디렉토리 경로

서론 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) 조만간 포스팅 할 예정인 파이썬을 이용한 웹 크롤링, 스크래핑 주제를 공부하던 중 막히는 부분이 생겼습니다. 바로 위의 구문입니다. 이를 이해��

itmining.tistory.com

 

728x90

'공부' 카테고리의 다른 글

[Python] os.system  (0) 2020.06.07
[Java] Gson json to object & array  (0) 2020.06.07
Marshalling  (0) 2020.06.07
[Java] Gson TypeToken with dynamic ArrayList  (0) 2020.06.07
[Java] Gson string number convert double (fixed string)  (0) 2020.06.07
댓글