[Eric] Re: Question about imported modules and paths in Eric4

Sjujsckij Nickolaj sterkrig at home.no
Sat Dec 20 21:38:41 GMT 2008


  Hello
I think you should learn about modules and their paths in Python. For  
example, I don't know what is module gto, probably it'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.

> Using Eric4 v4.2.3 (r2620) on KDE 7.
  Whoops! Could you lend me your time machine? (-:E

> I still haven't been able to figure this out.
>
> More specifics, I'm importing a module named "gto" as such:
>
>> import gto
>
> This works fine if I run my python script from the command line.  When
> I debug the script in Eric4 I get the following error
>
>> The debugged program raised the exception ImportError
>> "No module named gto"
>
> So I'm wondering how I can get Eric4 to import the environment from
> the shell.  Or at least how I can specify the paths in which Eric4
> will look for modules.
>
> Using Eric4 v4.2.3 (r2620) on KDE 7.
>
> Thanks,
> Robert
>
> On Tue, Dec 16, 2008 at 4:18 PM, Robert Cheatham
> <robertcheatham at gmail.com> wrote:
>>
>> I'm trying to use Eric4 for python debugging in Linux
>>
>> I'm having a problem with imported modules.  These modules are found  
>> somewhere in our system's path variables (not sure where).  The project  
>> I'm trying to debug works fine when run from the command line (and when  
>> debugged under pdb), but Eric4 apparently doesn't pick up the  
>> environment from the shell in which it was started, so an error is  
>> thrown when attempting to import certain modules.
>>
>> I'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.  I can't figure out how to do this.  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?
>>
>> Using Eric4 v4.2.3 (r2620) on KDE 7.
>>
>>
>> Thank you.
> _______________________________________________
> Eric mailing list
> Eric at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric


More information about the Eric mailing list