[scribus-dev] Scribus 1.5 Windows Python PostgreSQL
John L. Poole
jlpoole56 at gmail.com
Sat May 30 08:44:36 UTC 2015
I can answer my question. Here's what I did:
1) renamed C:\Program Files\Scribus 1.5.0\python to C:\Program
2) renamed C:\Program Files\Scribus 1.5.0\python27.dll to C:\Program
3) Downloaded from http://www.stickpeople.com/projects/python/win-psycopg/
and ran (installed) psycopg2-2.6.0.win-amd64-py2.7-pg9.4.1-release.exe
selecting my 2.7 environment.
I'm able to get past the error of " ImportError: No module named psycopg2".
I seem to be having problems authenticating to PostgreSQL failing the
password authentication, but I'm assuming I'll overcome that.
I wanted to post the above HowTO asap so nobody spends time answering it.
On 5/30/2015 1:15 AM, John L. Poole wrote:
> I have Scribus 1.5 built 19 May 2015, Build ID:
> I want to be able to call a Python script which connects to a
> PostgreSQL database.
> I tried this simple test script:
> # tests ability to connect to postgresql from within Scribus Python
> import sys
> # environment checking
> import scribus
> except ImportError:
> print "This script only runs from within Scribus."
> import psycopg2 as dbapi2
> db = dbapi2.connect (database="scribudb", user="xxx",
> cur = db.cursor()
> and, of course, got the error message:
> ImportError: No module named psycopg2
> I finding on the Scribus wiki at
> Python Database Module
> There are various modules
> <http://www.python.org/topics/database/modules.html> for database
> access. Remember that the module
> *must be [emphasis]* installed in/with the Python version which is
> used/compiled in Scribus!
> Is there a way to patch a module into the Python tree for Scribus?
> can I direct Scribus to use my Python 2.7 installed on my Windows box
> I can install whatever modules?
John Laurence Poole
P.O. Box 6566
Napa CA 94581-6566
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the scribus-dev