[Python-Dev] Problem in importing python packages under python 3.6 environment

Terry Reedy tjreedy at udel.edu
Thu Aug 9 13:46:55 EDT 2018

On 8/9/2018 8:45 AM, Poornima .D. wrote:

> I have limited knowledge on python development.  I am trying to write a 
> test application which needs to import from many packages across  
> mutliple directories.
> I tried using an environment variable and appending to sys.path variable 
> so that import Class methods works.
> I am trying to replace the above logic by below syntax.
> from directory.fileName import ClassName
> But this syntax does not work.  Please let me know any solution for this 
> issue.

When you post elsewhere, you must supply more information:
* Copy and paste a minimal example of code that fails, ideally just one 
line.  If your example involves importing code you wrote, add the 
directory structure of your code.
* Copy and paste the actually traceback and error message.

Terry Jan Reedy

More information about the Python-Dev mailing list