Unable to run python script from shell but able to run it from eclipse(PyDev)
Question: Python version:2.7 OS: CentOS

I have a python project with multiple files spread across different
directories. I am able to run this through Eclipse(PyDev). However I am unable
to run it from linux shell.

The directory structure looks like this:

    
    
          Projectrepo
              |
              |
            __|__
        src       conf
         |          |
         |          |
     buildexec.py   |
                    |
                 script_variables, list_of_scripts
    

`buildexec.py` is my main script. `script_variables` and `list_of_scripts` are
two modules which I am referencing from buildexec.py.

I have included `from conf.script_variables import *` in my main script and it
is working fine when I run it on eclipse. But, when I try to run it on shell,
I get an error

`'Traceback (most recent call last): File "buildexec.py", line 6, in <module>
from conf.script_variables import * ImportError: No module named
conf.script_variables'`

I have added PYTHONPATH=/usr/bin/python2.7 and have exported it..

Also, in the main script, I have added

`sys.path.append('/home/tejas/Projectrepo/conf')` before importing the
modules.


Answer: Was a simple solution! My pythonpath was pointing to the default directory
/usr/bin/python2.7. I added the location of the user defined modules also in
the python path using `export
PYTHONPATH=/usr/bin/python2.7:/home/tejas/Projectrepo/conf`

