문서의 선택한 두 판 사이의 차이를 보여줍니다.
다음 판 | 이전 판 마지막 판 양쪽 다음 판 | ||
develop:python [2007/01/23 00:15] mattabu 새로 만듬 |
develop:python [2012/03/19 10:36] starlits [Install] |
||
---|---|---|---|
줄 1: | 줄 1: | ||
====== Python ====== | ====== Python ====== | ||
+ | |||
+ | ===== Install on Debian Linux ===== | ||
+ | < | ||
+ | # apt-get install python python-dev python-psycopg | ||
+ | </ | ||
+ | 우분투에서도 같은 방법으로 설치한다. | ||
+ | |||
+ | ===== Web Framework ===== | ||
+ | * [[develop: | ||
+ | * [[develop: | ||
+ | * Turbogears | ||
+ | * Install => 우선, Debian stable 에는 없기 때문에 **testing** 이나 unstable 을 소스리스트에 설정을 해야 한다. 혹시나 하고 Ubuntu Linux에는 있을까 해서 찾아보았지만 패키지가 없었다. | ||
+ | 나중에 패키지가 포함이 되면 그때 해봐야겠다. | ||
===== Tip ===== | ===== Tip ===== | ||
- | * [[develop: | ||
+ | ==== 핸드폰으로 문자메시지 보내기 ==== | ||
+ | * [[develop: | ||
+ | |||
+ | ==== 소스파일 인코딩 설정 ==== | ||
+ | 파일의 상단에 다음과 같이 소스파일 인코딩을 설정한다. | ||
+ | <code python> | ||
+ | # -*- coding: utf-8 -*- | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== cx_Oracle 설치 ==== | ||
+ | * Oracle Client 를 먼저 설치하여 환경변수를 설정한다 | ||
+ | * python2.3-dev 를 설치한다. cx_Oracle 을 소스 컴파일하기 위해서 필요하다 | ||
+ | < | ||
+ | # apt-get install python2.3-dev | ||
+ | </ | ||
+ | * http:// | ||
+ | < | ||
+ | # wget http:// | ||
+ | </ | ||
+ | * tar 를 풀고 빌드/ | ||
+ | < | ||
+ | # tar xvfz cx_Oracle-4.2.tar.gz | ||
+ | # cd cx_Oracle-4.2 | ||
+ | # python setup.py build | ||
+ | # python setup.py install | ||
+ | </ | ||
+ | * 코드 샘플 | ||
+ | <code python> | ||
+ | import cx_Oracle | ||
+ | |||
+ | # connect via SQL*Net string or by each segment in a separate argument | ||
+ | #connection = cx_Oracle.connect(" | ||
+ | connection = cx_Oracle.connect(" | ||
+ | |||
+ | cursor = connection.cursor() | ||
+ | cursor.arraysize = 50 | ||
+ | cursor.execute(""" | ||
+ | select Col1, Col2, Col3 | ||
+ | from SomeTable | ||
+ | where Col4 = :arg_1 | ||
+ | and Col5 between :arg_2 and : | ||
+ | arg_1 = " | ||
+ | arg_2 = 5, | ||
+ | arg_3 = 15) | ||
+ | for column_1, column_2, column_3 in cursor.fetchall(): | ||
+ | print " | ||
+ | </ | ||
+ | * 문서 : http:// | ||
+ | |||
+ | ===== Link ===== | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||