#document

5 posts

crontab

crontab

5분

Intro Crontab 은 특정 시간에 특정 작업을 해주는 리눅스 스케줄러이다. 주요 명령어 (options) -u crontab -u define user user 사용자에 대해서 크론탭을 수행한다. 생략하면 크론탭 명령을 실행하는 사용자에 대해서 크론탭 수행 -e crontab -e edit user's crontab VIM을 사용하여 크론탭을 편집한다. 수정 후 할일 service crond stop service crond start …

[Document] OS

[Document] OS

8분

OS 모듈은 파이썬을 설치할 때 자동으로 설치되는 파이썬 라이브러리에 포함된다. 그리고 환경 변수나 디렉토리, 파일 등의 OS 자원을 제어할 수 있게 해주는 모듈입니다. 현재 작업 폴더 얻기 os.getcwd()를 사용하여 얻습니다. (get current working directory) print(os.getcwd()) # D:\source\test 디렉토리 변경 os.chdir(path)를 사용합니다. (path는 문자열이어야함.) os.chdir("C:\WINDOWS") print(os.getcwd()) # C:\WINDOWS 시스템 명령어 호출하기 …

[Document] Python Telegram Bot

[Document] Python Telegram Bot

0분

아래 링크들이 다 잘되어 있어서 일단 링크로 대체한다. Telegram Bot API 튜토리얼 API는 Telegram Bot API를 참고하면 된다. https://python-telegram-bot.readthedocs.io/en/stable/ 참고문헌

[Document] Requests

[Document] Requests

35분

간단한 Requests 예시 r=requests.get('https://api.github.com/user', auth=('user', 'pass')) print(r.status_code) print(r.headers['content-type']) print(r.encoding) print(r.text) print(r.json()) # 403 # application/json; charset=utf-8 # utf-8 # {"message":"Maximum number of login attempts exceeded. Please try again later.","documentation_url":"https://developer.github.com/v3"} # {'message': 'Maximum number of login attempts exceeded. Please try again later.', 'documentation_url': 'https://developer.github.com/v3'} r.status_code 는 .get 부분에 auth=에 …

[Document] beautifulsoup4

[Document] beautifulsoup4

115분

소개 Beautiful Soup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree. It commonly saves programmers hours or days of work. These instructions illustrate all major features of …