The Python versions are the same.  I think I'll need to consult some of
the wiser people around here when they get back from holiday.  I was
hoping it was something simple but there are probably some strange things
about our environment that I don't understand.  I'll post again once I
get it figured out.<br>
<br>
Thanks to everyone for your helpful responses!<br><br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Пожалуйста<br>
</blockquote>
I can&#39;t compete with that. :)<br><br><div class="gmail_quote">On Tue, Dec 23, 2008 at 8:46 AM, Sjujsckij Nickolaj <span dir="ltr">&lt;<a href="mailto:sterkrig@home.no">sterkrig@home.no</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&nbsp;Also see if Python shell and eric run the same Python (not 2.4 and 2.5, for example), as you use quite old system.<br>
And try to work out, what&#39;s the difference between PYTHONPATHs and if you&#39;re lucky eliminate the reason.<br>
Dou you have Eric (and dependencies) properly installed, by the way? You know, .deb&#39;s from repositories, apt-get install and so on.<br>
For here Eric picks up variables all right too.<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Tusen takk.<br>
</blockquote>
&nbsp;Пожалуйста (-:E<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Ha ha ha! &nbsp;My fault. &nbsp;It&#39;s actually Kubuntu 7.*, running KDE 3.5.6.<br>
Thank you for your response.<br>
<br>
Yes, when running Python from the shell, the &#39;sys.path&#39; variable has<br>
included the information in the &#39;PYTHONPATH&#39; variable from the shell.<br>
Additionally, running the commands &quot;os.environ[&#39;PYTHONPATH&#39;]&quot; and<br>
&quot;os.system(&#39;echo $PYTHONPATH&#39;)&quot; outputs the correct &#39;PYTHONPATH&#39;<br>
information.<br>
<br>
However, it appears that Eric4 creates its own environment. &nbsp;The<br>
&#39;sys.path&#39; variable does not include the &#39;PYTHONPATH&#39; information from<br>
the shell in which Eric4 was started. &nbsp;Also, while the<br>
&quot;os.environ[&#39;PATH&#39;]&quot; and &quot;os.system( &#39;echo $PATH&#39;)&quot; commands work<br>
properly when run from Eric4, their values are different from the<br>
&#39;PATH&#39; variable in the original shell. &nbsp;The &quot;os.environ[&#39;PYTHONPATH&#39;]&quot;<br>
and &quot;os.system(&#39;echo $PYTHONPATH&#39;)&quot; commands fail, indicating that the<br>
environment created by Eric4 is not the same as in the original shell.<br>
<br>
The above may be intentional, however I would like to be able to do<br>
one of the following:<br>
<br>
1) Get Eric4 to inherit the PYTHONPATH information from the shell in<br>
which it is launched<br>
<br>
2) Copy-paste the information from the PYTHONPATH variable into a<br>
search path in the Eric4 project.<br>
<br>
3) Run a short script at the beginning of my programs something to the<br>
effect of this:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;newPaths = os.system( &quot;Get PYTHONPATH info from original shell&quot; )<br>
 &nbsp; &nbsp; &nbsp; &nbsp;sys.path.append( newPaths )<br>
<br>
Options 1) and 3) are preferable so that all the environment info will<br>
be picked up automatically.<br>
<br>
If neither option is possible, I can manually insert the search paths<br>
using multiple &quot;sys.path.append()&quot; commands, but this will be a<br>
maintenance headache and will be tougher to convince others to move<br>
away from print statement debugging. &nbsp;I am, of course, open to<br>
other/better options.<br>
<br>
Tusen takk.<br>
--Robert<br>
<br>
On Sun, Dec 21, 2008 at 10:38 AM, Sjujsckij Nickolaj &lt;<a href="mailto:sterkrig@home.no" target="_blank">sterkrig@home.no</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
&nbsp;Hello<br>
I think you should learn about modules and their paths in Python. For example, I don&#39;t know what is module gto, probably it&#39;s your own one, and you rely on current dir importing it... So read about PYTHONPATH and inspect its value in your user shell, python and Eric shells (sys.path), and remember about importing from current directory.<br>

<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Using Eric4 v4.2.3 (r2620) on KDE 7.<br>
</blockquote>
<br>
&nbsp;Whoops! Could you lend me your time machine? (-:E<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I still haven&#39;t been able to figure this out.<br>
<br>
More specifics, I&#39;m importing a module named &quot;gto&quot; as such:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
import gto<br>
</blockquote>
<br>
This works fine if I run my python script from the command line. &nbsp;When<br>
I debug the script in Eric4 I get the following error<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The debugged program raised the exception ImportError<br>
&quot;No module named gto&quot;<br>
</blockquote>
<br>
So I&#39;m wondering how I can get Eric4 to import the environment from<br>
the shell. &nbsp;Or at least how I can specify the paths in which Eric4<br>
will look for modules.<br>
<br>
Using Eric4 v4.2.3 (r2620) on KDE 7.<br>
<br>
Thanks,<br>
Robert<br>
<br>
On Tue, Dec 16, 2008 at 4:18 PM, Robert Cheatham<br>
&lt;<a href="mailto:robertcheatham@gmail.com" target="_blank">robertcheatham@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I&#39;m trying to use Eric4 for python debugging in Linux<br>
<br>
I&#39;m having a problem with imported modules. &nbsp;These modules are found somewhere in our system&#39;s path variables (not sure where). &nbsp;The project I&#39;m trying to debug works fine when run from the command line (and when debugged under pdb), but Eric4 apparently doesn&#39;t pick up the environment from the shell in which it was started, so an error is thrown when attempting to import certain modules.<br>

<br>
I&#39;m used to working on Visual Studio, so my first instinct was to just copy the information from the path variables into the the path variable in the Eric4 project. &nbsp;I can&#39;t figure out how to do this. &nbsp;Is there a way to get Eric4 to either pick up the environment variables from the shell or to transfer the path information so that Eric4 can use it?<br>

<br>
Using Eric4 v4.2.3 (r2620) on KDE 7.<br>
<br>
<br>
Thank you.<br>
</blockquote>
<br>
_______________________________________________<br>
Eric mailing list<br>
<a href="mailto:Eric@riverbankcomputing.com" target="_blank">Eric@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/eric" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/eric</a><br>
</blockquote></blockquote></blockquote>
<br>
<br>
<br></div></div><font color="#888888">
-- <br>
Trollen pynkere vrekukka!<br>
 &nbsp;Ŝtérkrìg</font><div><div></div><div class="Wj3C7c"><br>
_______________________________________________<br>
Eric mailing list<br>
<a href="mailto:Eric@riverbankcomputing.com" target="_blank">Eric@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/eric" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/eric</a><br>
</div></div></blockquote></div><br>