python:pymssql: from Debian to hosting Vista

deb1:~/mssql# wget http://downloads.sourceforge.net/pymssql/pymssql-0.8.0.tar.gz?modtime=1159101143&big_mirror=0
[1] 11588
deb1:~/mssql# --11:20:42--  http://downloads.sourceforge.net/pymssql/pymssql-0.8.0.tar.gz?modtime=1159101143
           => `pymssql-0.8.0.tar.gz?modtime=1159101143'
Resolving downloads.sourceforge.net... 66.35.250.203
Connecting to downloads.sourceforge.net|66.35.250.203|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://jaist.dl.sourceforge.net/sourceforge/pymssql/pymssql-0.8.0.tar.gz [following]
--11:20:47--  http://jaist.dl.sourceforge.net/sourceforge/pymssql/pymssql-0.8.0.tar.gz
           => `pymssql-0.8.0.tar.gz'
Resolving jaist.dl.sourceforge.net... 150.65.7.130
Connecting to jaist.dl.sourceforge.net|150.65.7.130|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 158,030 (154K) [application/x-gzip]

100%[====================================>] 158,030       30.77K/s    ETA 00:00

11:20:43 (30.76 KB/s) - `pymssql-0.8.0.tar.gz' saved [158030/158030]

deb1:~/mssql# tar xvfz pymssql-0.8.0.tar.gz
pymssql-0.8.0/
pymssql-0.8.0/apitest_mssql.py
pymssql-0.8.0/ChangeLog
pymssql-0.8.0/mssqldbmodule.c
pymssql-0.8.0/ntwdblib.dll
pymssql-0.8.0/PKG-INFO
pymssql-0.8.0/pymssql.py
pymssql-0.8.0/README
pymssql-0.8.0/README.freetds
pymssql-0.8.0/setup.py
pymssql-0.8.0/test.py
pymssql-0.8.0/TODO

deb1:~/mssql/pymssql-0.8.0# apt-get install freetds-dev
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  libct3 libsybdb5
The following NEW packages will be installed:
  freetds-dev libct3 libsybdb5
0 upgraded, 3 newly installed, 0 to remove and 2 not upgraded.
Need to get 1163kB of archives.
After unpacking 3101kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://cdn.debian.or.jp etch/main libct3 0.63-3.2 [318kB]
Get:2 http://cdn.debian.or.jp etch/main libsybdb5 0.63-3.2 [118kB]
Get:3 http://cdn.debian.or.jp etch/main freetds-dev 0.63-3.2 [727kB]
Fetched 1163kB in 15s (73.5kB/s)
Selecting previously deselected package libct3.
(Reading database ... 55297 files and directories currently installed.)
Unpacking libct3 (from .../libct3_0.63-3.2_i386.deb) ...
Selecting previously deselected package libsybdb5.
Unpacking libsybdb5 (from .../libsybdb5_0.63-3.2_i386.deb) ...
Selecting previously deselected package freetds-dev.
Unpacking freetds-dev (from .../freetds-dev_0.63-3.2_i386.deb) ...
Setting up libct3 (0.63-3.2) ...

Setting up libsybdb5 (0.63-3.2) ...

Setting up freetds-dev (0.63-3.2) ...

deb1:~/mssql/pymssql-0.8.0# python setup.py  build
running build
running build_py
running build_ext
building '_mssql' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include -I/usr/local/include -I/usr/include/freetds -I/usr/local/include/freetds -I/usr/pkg/freetds/include -I/usr/include/python2.4 -c mssqldbmodule.c -o build/temp.linux-i686-2.4/mssqldbmodule.o
gcc -pthread -shared build/temp.linux-i686-2.4/mssqldbmodule.o -L/usr/local/lib -L/usr/lib/freetds -L/usr/local/lib/freetds/usr/pkg/freetds/lib -lsybdb -o build/lib.linux-i686-2.4/_mssql.so

deb1:~/mssql/pymssql-0.8.0# python setup.py install
running install
running build
running build_py
running build_ext
running install_lib
copying build/lib.linux-i686-2.4/_mssql.so -> /usr/lib/python2.4/site-packages
copying build/lib.linux-i686-2.4/pymssql.py -> /usr/lib/python2.4/site-packages
byte-compiling /usr/lib/python2.4/site-packages/pymssql.py to pymssql.pyc


deb1:~/mssql/pymssql-0.8.0# python
Python 2.4.4 (#2, Apr 15 2008, 23:43:20)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymssql
>>> dir(pymssql)
['BINARY', 'DATETIME', 'DBAPITypeObject', 'DECIMAL', 'DataError', 'DatabaseError', 'Error', 'IntegrityError', 'InterfaceError', 'InternalError', 'NUMBER', 'NotSupportedError', 'OperationalError', 'ProgrammingError', 'STRING', 'Warning', '__author__', '__builtins__', '__doc__', '__file__', '__name__', '__version__', '_mssql', '_quote', '_quoteparams', 'apilevel', 'connect', 'datetime', 'paramstyle', 'pymssqlCnx', 'pymssqlCursor', 'string', 'threadsafety', 'time', 'types']


deb1:~/mssql/pymssql-0.8.0# python
Python 2.4.4 (#2, Apr 15 2008, 23:43:20)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from sqlalchemy import *
>>> constr="mssql://debianuser:debianuser@vista:1433/Auth"
>>> db=create_engine(constr)
>>> db.execute("select * from aspnet_Users").fetchall()
[('0\xa87\xf9\x0e7rO\xa0\xa9&\xff\x05a\xdbn', '\x13[sQx\xe1\x92D\xbf\x98\x9ee\xfe\xb5H\x0c', 'hide', 'hide', None, False, datetime.datetime(2008, 6, 3, 20, 9, 24, 147000))]
カテゴリー: 未分類 パーマリンク

python:pymssql: from Debian to hosting Vista への3件のフィードバック

  1. Unknown より:

    Hi,Do you need advertising displays, digital signages, advertising player and LCD displays? Please go Here:www.amberdigital.com.hk(Amberdigital).we have explored and developed the international market with professionalism. We have built a widespread marketing network, and set up a capable management team dedicated to provide beyond-expectation services to our customers.
    amberdigital Contact Us
    website:www.amberdigital.com.hk
    alibaba:amberdigital.en.alibaba.com[dgffjiaghhdhhji]

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中