일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Tags
- java 상속
- 정렬
- 깃허브
- Javascript
- 파이썬 파일편집
- js
- Spring Boot
- 파이썬 파일생성
- spring
- sort
- github
- nodejs
- HTML
- JAVA ERROR
- git
- SQL
- java
- DML
- Python
- 파이썬 파일 수정
- 자바
- pull
- 파이썬
- python pwd
- 스프링
- commit
- Algorithm
- 깃
- DDL
- Push
Archives
- Today
- Total
목록python touch (1)
춘식이를 좋아하는 개발자

파이썬에는 다양한 모듈이 존재한다! 그 중 자주 사용하는 모듈로 linux 혹은 window cmd창 등의 command를 python에서도 사용하기 위해 os module을 많이 사용한다. os 모듈은 따로 알아보도록 하고, 간단한 디렉토리와 파일 생성에 대해서 작성해보겠다. 다음과 같은 실습을 진행해보자! import os ## basic ## CRUD directory and files ## get current directory path(pwd) a = os.getcwd() print(a) os.chdir('../../') ## create file and write file = open("./test.txt",'w') file.write("Hello world!") file.close() ## ..
Study/Python
2022. 10. 7. 16:31