Re: Importing from within package

2020-09-23 Thread Abdur-Rahmaan Janhangeer
Thanks for the lead. Checking tomorrow! If so i'll have to include other folders as well ... Kind Regards, Abdur-Rahmaan Janhangeer https://www.github.com/Abdur-RahmaanJ Mauritius sent from gmail client on Android, that's why the signature is so ugly. --

Re: Importing from within package

2020-09-23 Thread Dieter Maurer
Abdur-Rahmaan Janhangeer wrote at 2020-9-23 22:41 +0400: >In shopyo/shopyo (the same folder as __main__.py) there is a folder called >shopyoapi. Not in the distribution: ... shopyo-1.1.45/shopyo/ shopyo-1.1.45/shopyo/__init__.py shopyo-1.1.45/shopyo/__main__.py shopyo-1.1.45/shopyo/app.py

Re: Importing from within package

2020-09-23 Thread Abdur-Rahmaan Janhangeer
In shopyo/shopyo (the same folder as __main__.py) there is a folder called shopyoapi. What i want is to import create_module from cmd.py from shopyoapi in __main__.py but it does not work or more precisely i am looking how to make it work! Since this is not py2 i guess no init needed in

Re: Importing from within package

2020-09-23 Thread Dieter Maurer
Abdur-Rahmaan Janhangeer wrote at 2020-9-22 20:14 +0400: >I have this main script: >https://github.com/Abdur-rahmaanJ/shopyo/blob/dev/shopyo/__main__.py > >However, i get errors after package installation >saying: >ImportError: cannot import name 'shopyoapi' from 'shopyo' It is right:

Re: Importing from within package

2020-09-22 Thread Abdur-Rahmaan Janhangeer
Greetings list, In case this might help, i am on Python3.8 and running in a virtual env This command also does not work: python -m shopyo new . test2 Kind Regards, Abdur-Rahmaan Janhangeer about | blog github

Re: Importing from within package

2020-09-22 Thread Chris Angelico
On Wed, Sep 23, 2020 at 2:16 PM Terry Reedy wrote: > > On 9/22/2020 8:31 PM, Chris Angelico wrote: > > On Wed, Sep 23, 2020 at 9:24 AM Dennis Lee Bieber > > wrote: > >> > >> On Tue, 22 Sep 2020 20:14:01 +0400, Abdur-Rahmaan Janhangeer > >> declaimed the following: > >> > >>> I have this main

Re: Importing from within package

2020-09-22 Thread Terry Reedy
On 9/22/2020 8:31 PM, Chris Angelico wrote: On Wed, Sep 23, 2020 at 9:24 AM Dennis Lee Bieber wrote: On Tue, 22 Sep 2020 20:14:01 +0400, Abdur-Rahmaan Janhangeer declaimed the following: I have this main script: https://github.com/Abdur-rahmaanJ/shopyo/blob/dev/shopyo/__main__.py

Re: Importing from within package

2020-09-22 Thread 黃炳熙
Chris Angelico writes: > ... > In a package, __main__.py does that same job. Sorry ChrisA, would you please some example? Because i am working in progress with Python things... Sicnerely, Byung-Hee -- ^고맙습니다 _布德天下_ 감사합니다_^))// -- https://mail.python.org/mailman/listinfo/python-list

Re: Importing from within package

2020-09-22 Thread Chris Angelico
On Wed, Sep 23, 2020 at 9:24 AM Dennis Lee Bieber wrote: > > On Tue, 22 Sep 2020 20:14:01 +0400, Abdur-Rahmaan Janhangeer > declaimed the following: > > >I have this main script: > >https://github.com/Abdur-rahmaanJ/shopyo/blob/dev/shopyo/__main__.py > > > > Well, that file name scares

Importing from within package

2020-09-22 Thread Abdur-Rahmaan Janhangeer
Greeting list, I have this main script: https://github.com/Abdur-rahmaanJ/shopyo/blob/dev/shopyo/__main__.py However, i get errors after package installation saying: ImportError: cannot import name 'shopyoapi' from 'shopyo' I've tried from .shopyoapi also but to no avail. To reproduce: python