Обсуждение: Handling images using Python

Поиск
Список
Период
Сортировка

Handling images using Python

От
Andreas Tille
Дата:
Hello,

I tried to store some images in PostgreSQL using Python via
psycopg database adapter.  Unfortunately the examples I found in
the web very not really the best - I just was not able to get one
working.

Is there anybody who could give an example how to store an image
in a usual format (PNG, JPG, ...) into a simple table and get
it back via Python?

Kind regards

        Andreas.


Re: Handling images using Python

От
Yves Bastide
Дата:
Andreas Tille wrote:
> Hello,
>
> I tried to store some images in PostgreSQL using Python via
> psycopg database adapter.  Unfortunately the examples I found in
> the web very not really the best - I just was not able to get one
> working.
>
> Is there anybody who could give an example how to store an image
> in a usual format (PNG, JPG, ...) into a simple table and get
> it back via Python?

Did you check psycopg's examples/binary.py?  It works for me.

>
> Kind regards
>
>         Andreas.

yves