유용한 파이썬 라이브러리 모듈

아래내용은 좋은 글이 있어서 퍼온글입니다.   http://agfree.cafe24.com/?p=862

##########################

파이썬의 내장 라이브러리 모듈은 다양한 분야에 걸쳐서 충분한 테스트를 거친 좋은 코드임에도 불구하고 많은 프로그래머가 이를 모르거나 무시하면서 똑같은 또는 유사한 기능을 다시 코딩하는 우를 범하는 경우가 많다. 본격적인 프로그래밍에 앞서 구현하려는 기능이 파이썬 라이브러리 모듈에 있는지 꼭 확인해 볼 필요가 있다. 이미 안정적으로 만들어 놓은 기능을 또다시 개발하지 말고 라이브러리를 최대한 활용해 보자.
모듈 단위의 문서화 자료를 참조해도 되고 import 모듈명 이후에 help(모듈명)하면 자세한 설명을 확인할 수 있다. 아래는 re 모듈에 대한 help중 일부이다.

>>> import re
>>> help (re)
Help on module re:

NAME
re – Support for regular expressions (RE).

FILE
d:\python27\lib\re.py

DESCRIPTION
This module provides regular expression matching operations similar to
those found in Perl.  It supports both 8-bit and Unicode strings; both
the pattern and the strings being processed can contain null bytes and
characters outside the US ASCII range.

Regular expressions can contain both special and ordinary characters.
Most ordinary characters, like “A”, “a”, or “0”, are the simplest
regular expressions; they simply match themselves.  You can
concatenate ordinary characters, so last matches the string ‘last’.

The special characters are:
“.”      Matches any character except a newline.
“^”      Matches the start of the string.
“$”      Matches the end of the string or just before the newline at
the end of the string.
“*”      Matches 0 or more (greedy) repetitions of the preceding RE.
Greedy means that it will match as many repetitions as possible.
“+”      Matches 1 or more (greedy) repetitions of the preceding RE.
“?”      Matches 0 or 1 (greedy) of the preceding RE.

– 스트링 관련 모듈

– 데이터 타입 관련 모듈

– 수학 함수 및 기타 숫자 모듈

– 인터넷 데이터 처리 모듈

– 마크업 처리 모듈

– 파일 형식 관련 모듈

– 암호 처리 모듈

– 파일 및 디렉토리 처리 모듈

– 압축 및 보관 처리 모듈

– 자료 보존 처리 모듈

– 운영체제 및 런타임 관련 모듈

– 인터넷 프로토콜 처리 모듈

  출처 : http://agfree.cafe24.com/?p=862

내가 사형되면 국민 감정이 돌아서 민주화 운동이 일어나고 내 죽음이 결정적 모멘트가 될 것이다.