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

2018-08-09 Thread Terry Reedy

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


___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2018-08-09 Thread Mariatta Wijaya
Hi Poornima,

Your question is more appropriate for the python-list mailing list (
https://mail.python.org/mailman/listinfo/python-list) or python-tutors
mailing list (https://mail.python.org/mailman/listinfo/tutor).



On Thu, Aug 9, 2018, 8:30 AM Poornima .D.  wrote:

> Hi All,
>
>
> 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.
>
>
>
>
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/mariatta.wijaya%40gmail.com
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2018-08-09 Thread Oleg Broytman
Hello.

   This mailing list is to work on developing Python (adding new
features to Python itself and fixing bugs); if you're having problems
learning, understanding or using Python, please find another forum.
Probably python-list/comp.lang.python mailing list/news group is the
best place; there are Python developers who participate in it; you may
get a faster, and probably more complete, answer there. See
https://www.python.org/community/ for other lists/news groups/fora. Thank
you for understanding.

On Thu, Aug 09, 2018 at 06:15:49PM +0530, "Poornima .D." 
 wrote:
> Hi All,
> 
> 
> 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.

   Not enough information to answer. To ask such a question you'd better
prepare a simple exmaple that doesn't work -- just a few small files and
directories.

   Learn about Python modules/packagaes at
https://docs.python.org/3/tutorial/modules.html especially paying
attention to The Module Search Path:
https://docs.python.org/3/tutorial/modules.html#the-module-search-path

Oleg.
-- 
Oleg Broytmanhttps://phdru.name/p...@phdru.name
   Programmers don't die, they just GOSUB without RETURN.
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2018-08-09 Thread Brett Cannon
This mailing list is for the discussion of the development *of* Python, not
its use. Your best bet for help is either a site like Stack Overflow or
another mailing list like python-tutor or python-list.

On Thu, 9 Aug 2018 at 08:30 Poornima .D.  wrote:

> Hi All,
>
>
> 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.
>
>
>
>
>
> ___
> Python-Dev mailing list
> Python-Dev@python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/brett%40python.org
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2018-08-09 Thread Poornima .D.
Hi All,


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.
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com