Gregory,<div><br></div><div>Thanks for taking a look at this. Here's what I put into the console (straight out of the Google api sample file.) This works if I run it from the Python command line interpreter.</div><div>
<br></div><div><code></div><div><br></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #c22a9f">try<span style="color: #000000">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"> <span style="color: #c22a9f">from</span> xml.etree <span style="color: #c22a9f">import</span> ElementTree</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"><span style="color: #c22a9f">except</span> ImportError:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"> <span style="color: #c22a9f">from</span> elementtree <span style="color: #c22a9f">import</span> ElementTree</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"><span style="color: #c22a9f">import</span> gdata.calendar.data</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"><span style="color: #c22a9f">import</span> gdata.calendar.client</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"><span style="color: #c22a9f">import</span> gdata.acl.data</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #c22a9f">import<span style="color: #000000"> atom</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"><span style="color: #c22a9f">import</span> getopt</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #c22a9f">import<span style="color: #000000"> sys</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo"><span style="color: #c22a9f">import</span> string</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #c22a9f">import<span style="color: #000000"> time</span></p></div><div><span style="color: #000000"><br></span></div><div></code></div><div><br>
</div><div>And the Scribus console returns this:</div><div><br></div><div>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">'Scribus Python Console\n\nThis is a standard Python console with some \nknown limitations. Please consult the Scribus \nScripter documentation for futher information. '</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> File "<console>", line 5</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> import gdata.calendar.data</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> ^</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">SyntaxError: invalid syntax</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Traceback (most recent call last):</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> File "<console>", line 1, in ?</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">ImportError: No module named gdata.calendar.client</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Traceback (most recent call last):</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> File "<console>", line 1, in ?</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">ImportError: No module named gdata.acl.data</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Traceback (most recent call last):</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> File "<console>", line 1, in ?</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">ImportError: No module named atom</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></div><div>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<br></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">So this caused me to go look at versioning, and found that Scribus is using Python 2.3, rather than going after the latest Python 2.7 install.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<br></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Thanks,</p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
Steve</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></div><div><br></div><div><br><div class="gmail_quote">On Mon, Oct 17, 2011 at 10:27 AM, Gregory Pittman <span dir="ltr"><<a href="mailto:gregp_ky@yahoo.com">gregp_ky@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 10/17/2011 10:05 AM, Steve Wright wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear scripting gurus,<br>
<br>
I have some modules that I have installed on my machine, (atom and gdata for<br>
Google Calendar API stuff) that work when I call them from the an external<br>
script, but when I try to run them from the Scribus console or directly from<br>
the script menu, the import doesn't work and the script fails. Is there a<br>
place to explicitly set the path for an imported module? Any other<br>
suggestions?<br>
<br>
</blockquote>
<br></div>
Do you get any sort of traceback message?<br>
<br>
I'm not sure of what sort of import commands you might need for these.<br>
For example, when you use the<br>
import scribus<br>
command,<br>
<br>
then your commands look like<br>
<br>
scribus.getText()<br>
<br>
Greg<br>
<br>
<br>
___<br>
Scribus Mailing List: <a href="mailto:scribus@lists.scribus.net" target="_blank">scribus@lists.scribus.net</a><br>
Edit your options or unsubscribe:<br>
<a href="http://lists.scribus.net/mailman/listinfo/scribus" target="_blank">http://lists.scribus.net/<u></u>mailman/listinfo/scribus</a><br>
See also:<br>
<a href="http://wiki.scribus.net" target="_blank">http://wiki.scribus.net</a><br>
<a href="http://forums.scribus.net" target="_blank">http://forums.scribus.net</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>When I could find voice, I shrieked aloud in agony, "Either this is madness or it is Hell." "It is neither," calmly replied the voice of the Sphere, "it is Knowledge." <i>Flatland</i>, by Edwin A. Abbott<br>
</div>