본문 바로가기 메뉴 바로가기

Hello, Python

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Hello, Python

검색하기 폼
  • 분류 전체보기 (146)
    • Python (87)
      • tkinter (12)
    • Java (6)
      • Spring (1)
      • JPA (3)
    • MySQL (2)
    • Linux (19)
    • Virtualization (1)
    • Infra (1)
    • Network (1)
    • VBA(Excel) (19)
    • Apache (3)
    • html (1)
    • Windows (2)
    • 일상다반사 (2)
  • 방명록

웹서버 (1)
Python, 웹 서버 만들기

HTTPServer서버 객체를 생성시 핸들을 지정해준다핸들은 BaseHTTPRequestHandler로 http의 기본적인 응답을 할수 있는 기능들이 들어있다.class http.server.HTTPServer((server_address,port),RequestHandlerClass)serve_forever()메서드를 실행하면 서버는 요청을 기다리게 된다.그리고 요청이 들어오면 등록된 핸들러에 요청정보를 전달해준다.아래예제는 http서버가 클라이언트에 어떻게 응답을 반환하는지, 어떻게 응답을 만드는데 유용한 지역요소를 포함하는지 보여준다.import http.serverfrom urllib.parse import urlparse class MyHandler(http.server.BaseHTTPReque..

Python 2016. 5. 25. 18:41
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • ManyToOne
  • command
  • activebackground
  • indicatoron
  • Composite Key
  • FetchType
  • onetomany
  • 폼
  • apache
  • disabledforeground
  • highlightthickness
  • Linux
  • IdClass
  • tkinter command & bind [명령어묶기와 사건묶기] Python
  • tkinter
  • checkbutton
  • vba
  • borderwidth
  • 리눅스
  • Java
  • 상수
  • JPA
  • Excel
  • Module
  • highlightbackground
  • Python
  • fetch join
  • 파이썬
  • activeforeground
  • Private
more
«   2025/05   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바