we will include  pg8000 in web2py in the next version

On Jan 11, 12:27 pm, Mariano Reingart <reing...@gmail.com> wrote:
> For python 2.5 you need at least:
>
> bz2.pyd
> library.zip
> MSVCR71.dll
> psycopg2._psycopg.pyd
> python25.dll
> test.exe
> unicodedata.pyd
> w9xpopen.exe
>
> NOTE the psycopg2._psycopg.pyd binary dll
> Also, MSVCR71.dll surely will change for other versions of python, and
> you'll be need manifests and/or other runtime files in order to load
> the Visual C runtime (they should be already provided with the binary
> web2py distribution).
>
> In library.zip, you'll need at least the psycopg2 folder, with a bunch
> of the stdlib
>
> Attached is an example to gather this files, you can download from
>
> http://www.sistemasagiles.com.ar/soft/psycopg2_py25_dist.zip
>
> You can generate it with:
>
> python setup.py py2exe
>
> Then test it with
>
> test.exe "dbname=postgres user=reingart password=secret
> host=localhost" "SELECT generate_series(1,10)"
>
> Best regards,
>
> Mariano Reingarthttp://www.sistemasagiles.com.arhttp://reingart.blogspot.com
>
> On Wed, Jan 11, 2012 at 12:53 PM, Alexandre Andrade
>
>
>
>
>
>
>
> <alexandrema...@gmail.com> wrote:
> > I remember the postgresql driver usually works with the source distribuition
> > of web2py on windows.
>
> > I think a way u get it working is use the source web2py on windows, and use
> > py2exe or similar to create a executable.
>
> > Alexandre Andrade
>
> > 2012/1/10 Álvaro J. Iradier <airad...@gmail.com>
>
> >> Hi,
>
> >> I was trying to distribute an application with web2py binary for
> >> windows, but I required the PostgreSQL driver. So I copied the
> >> psycopg2 files to site-packages in the web2py binary folder.
>
> >> If I start a shell from an application, I can import psycopg2 and
> >> connect to the database. However, it looks like the DAL does not
> >> recognize the psycopg2 driver. I am getting the error:
>
> >> Traceback (most recent call last):
> >>  File "gluon/restricted.py", line 204, in restricted
> >>  File "C:/Users/airadier/Downloads/web2py_win/web2py/applications/
> >> init/models/10_db.py", line 13, in <module>
> >>  File "gluon/dal.py", line 4749, in __init__
> >> RuntimeError: Failure to connect, tried 5 times:
> >> Traceback (most recent call last):
> >>  File "gluon/dal.py", line 4736, in __init__
> >>  File "gluon/dal.py", line 1867, in __init__
> >> RuntimeError: Unable to import driver
>
> >> My guess is when DAL is being initialized, the site-packages folder is
> >> not yet in the sys.path, so the following fails:
>
> >>    try:
> >>        import psycopg2
> >>        from psycopg2.extensions import adapt as psycopg2_adapt
> >>        drivers.append('PostgreSQL')
> >>    except ImportError:
> >>        logger.debug('no psycopg2 driver')
>
> >> Is there a reason for this? Is it a bug or a feature?
>
> >> Is there other way to acomplish these? And is it allowed to distribute
> >> a binary web2py including the PostgreSQL driver?
>
> >> Thanks in advance.
>
> > --
> > Atenciosamente
>
> > Alexandre Andrade
> > Hipercenter.com Classificados Gratuitos
>
>
>
>  test.py
> < 1KViewDownload
>
>  setup.py
> < 1KViewDownload

Reply via email to