===== Install on Debian Linux ===== # apt-get install python python-dev python-psycopg 우분투에서도 같은 방법으로 설치한다. ===== Web Framework ===== * [[develop:python:webframework:django|Django]] * [[develop:python:webframework:mod_python|mod_python(PSP:Python Server Pages)]] * Turbogears * Install => 우선, Debian stable 에는 없기 때문에 **testing** 이나 unstable 을 소스리스트에 설정을 해야 한다. 혹시나 하고 Ubuntu Linux에는 있을까 해서 찾아보았지만 패키지가 없었다. 나중에 패키지가 포함이 되면 그때 해봐야겠다. ===== Tip ===== ==== 핸드폰으로 문자메시지 보내기 ==== * [[develop:python:tip:sendsms|핸드폰으로 문자메시지 보내기]] ==== 소스파일 인코딩 설정 ==== 파일의 상단에 다음과 같이 소스파일 인코딩을 설정한다. # -*- coding: utf-8 -*- ==== cx_Oracle 설치 ==== * Oracle Client 를 먼저 설치하여 환경변수를 설정한다 * python2.3-dev 를 설치한다. cx_Oracle 을 소스 컴파일하기 위해서 필요하다 # apt-get install python2.3-dev * http://www.cxtools.net 에서 소스를 다운로드 한다. # wget http://prdownloads.sourceforge.net/cx-oracle/cx_Oracle-4.2.tar.gz?use_mirror=jaist * tar 를 풀고 빌드/설치한다. # tar xvfz cx_Oracle-4.2.tar.gz # cd cx_Oracle-4.2 # python setup.py build # python setup.py install * 코드 샘플 import cx_Oracle # connect via SQL*Net string or by each segment in a separate argument #connection = cx_Oracle.connect("user/password@TNS") connection = cx_Oracle.connect("user", "password", "TNS") 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_3""", arg_1 = "VALUE", arg_2 = 5, arg_3 = 15) for column_1, column_2, column_3 in cursor.fetchall(): print "Values:", column_1, column_2, column_3 * 문서 : http://www.python.net/crew/atuining/cx_Oracle/html/index.html