본문 바로가기

전체 글

Window 10 재설치 정품인증 http://it.donga.com/25026/ 참고 더보기
Python File, Directory 파일 목록 얻기 glob.glob(wildcard) - 유닉스 경로명 패턴 스타일로 파일 목록 os.listdir(path) - 지정된 디렉토리의 전체 파일 목록 dircache.listdir(path) - os.listdir(path)와 동일한 파일 목록 디렉토리 다루기 os.chdir(path) - 작업하고 있는 디렉토리 변경 os.getcwd() - 현재 프로세스의 작업 디렉토리 파일 이름 다루기 os.path.abspath(filename) - 파일의 상대 경로를 절대 경로로 바꾸는 함수 os.path.exists(filename) - 주어진 경로의 파일이 있는지 확인 os.curdir() - 현재 디렉토리 os.pardir() - 부모 디렉토리 os.sep() - 디렉토리 분리 문자 경로명 분리.. 더보기
Python print function Python print function 간단 예 “Hello”를 출력하기 위해서는 다음과 같이 print() 함수를 사용한다. >>> print(“Hello”) Hello 빈 라인 출력 다섯 줄의 빈 라인은 다음과 같이 한다. print(5 * “\n”) Formatted strings % 연산자는 형식화된 출력을 할 수 있다. 이것은 formatted string과 값이 필요하다. 값은 단일 값, 튜플 값, 딕셔너리 값일 수 있다. 예를 들어 print("pi=%s” % “3.14159”) formatted string은 special character %s 같은 것으로 형변환을 할 수 있다. %s 는 값을 문자열로 바꾼다. 그래서 위의 문장을 다음과 같이 바꿀 수 있다. print("pi=%s” % .. 더보기
Visual Studio Code 단축키 단축키 파일 > 기본 설정 > 바로 가기 키 에서 현재 단축키를 볼 수 있고, keybindings.json에서 편집할 수 있다. 자주 사용하는 단축키 키 명령 명령ID ctrl+x 행 삭제 (빈 선택) editor.action.clipboardCutAction ctrl+shitf+k 행 삭제 editor.action.deleteLines ctrl+c 행 복사 (빈 선택) editor.action.clipboardCopyActoin ctrl+Enter 아래에 행 삽입 editor.action.insertLineAfter ctrl+shift+Enter 위에 행 삽입 editor.action.insertLineBefore ctrl+u 마지막 커서 작업 취소 cursorUndo ctrl+i 현재 행 선택 ex.. 더보기