<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I can answer my question. Here's what I did:<br>
<br>
1) renamed C:\Program Files\Scribus 1.5.0\python to C:\Program
Files\Scribus 1.5.0\pythonHOLD<br>
2) renamed C:\Program Files\Scribus 1.5.0\python27.dll to C:\Program
Files\Scribus 1.5.0\HOLDpython27.dll<br>
<br>
3) Downloaded from
<a class="moz-txt-link-freetext" href="http://www.stickpeople.com/projects/python/win-psycopg/">http://www.stickpeople.com/projects/python/win-psycopg/</a><br>
and ran (installed)
psycopg2-2.6.0.win-amd64-py2.7-pg9.4.1-release.exe selecting my 2.7
environment.<br>
<br>
I'm able to get past the error of " ImportError: No module named
psycopg2". <br>
I seem to be having problems authenticating to PostgreSQL failing
the<br>
password authentication, but I'm assuming I'll overcome that. <br>
<br>
I wanted to post the above HowTO asap so nobody spends time
answering it.<br>
<br>
<div class="moz-cite-prefix">On 5/30/2015 1:15 AM, John L. Poole
wrote:<br>
</div>
<blockquote cite="mid:556971A5.10000@gmail.com" type="cite">I have
Scribus 1.5 built 19 May 2015, Build ID:
C-*-T-*-C1.12.18-Windows-64bit
<br>
<br>
I want to be able to call a Python script which connects to a
PostgreSQL database.
<br>
<br>
I tried this simple test script:
<br>
<br>
#
<br>
# tests ability to connect to postgresql from within Scribus
Python
<br>
#
<br>
#
<br>
import sys
<br>
<br>
# environment checking
<br>
try:
<br>
import scribus
<br>
except ImportError:
<br>
print "This script only runs from within Scribus."
<br>
sys.exit(1)
<br>
<br>
import psycopg2 as dbapi2
<br>
db = dbapi2.connect (database="scribudb", user="xxx",
password="xxx")
<br>
cur = db.cursor()
<br>
<br>
and, of course, got the error message:
<br>
<br>
ImportError: No module named psycopg2
<br>
<br>
I finding on the Scribus wiki at
<a class="moz-txt-link-freetext" href="http://wiki.scribus.net/canvas/Scripter/Databases">http://wiki.scribus.net/canvas/Scripter/Databases</a>
<br>
<br>
<br>
Python Database Module
<br>
<br>
There are various modules
<a class="moz-txt-link-rfc2396E" href="http://www.python.org/topics/database/modules.html"><http://www.python.org/topics/database/modules.html></a> for
database access. Remember that the module
<br>
*must be [emphasis]* installed in/with the Python version which is
used/compiled in Scribus!
<br>
<br>
Is there a way to patch a module into the Python tree for
Scribus? Alternatively,
<br>
can I direct Scribus to use my Python 2.7 installed on my Windows
box wherein
<br>
I can install whatever modules?
<br>
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<title>Email Rider</title>
<p><font face="Verdana" size="2">John Laurence Poole<br>
P.O. Box 6566<br>
Napa CA 94581-6566<br>
707-812-1323 office<br>
<br>
</font></p>
</div>
</body>
</html>