Re: python3 - Import python file as module

2020-05-20 Thread Shivani Shinde
Hi Peter, Thank you for your inputs. This really helped me. Thanks! -- CONFIDENTIALITY. This email and any attachments are confidential to Alef Edge Inc., and may also be privileged, except where the email states it can be disclosed. If this email is received in error, please do not disclos

Re: python3 - Import python file as module

2020-05-18 Thread Peter Otten
shivani.shi...@alefedge.com wrote: > Hi, > I am a beginner to Python. I want to achieve the following: > > My directory structure: > > a > └── b > └── c > ├── p > │ └── q > │ └── test.py > └── x > └── y > └── run.py > > In

Re: Python3 : import

2017-07-07 Thread Andrew Z
On Friday, July 7, 2017 at 4:16:38 PM UTC-4, Ian wrote: > On Fri, Jul 7, 2017 at 2:00 PM, Andrew Z wrote: > > [az@hp tst1]$ python3 ./uno.py > > Traceback (most recent call last): > > File "./uno.py", line 1, in > > from . import db > > SystemError: Parent module '' not loaded, cannot perfo

Re: Python3 : import

2017-07-07 Thread Ian Kelly
On Fri, Jul 7, 2017 at 2:00 PM, Andrew Z wrote: > [az@hp tst1]$ python3 ./uno.py > Traceback (most recent call last): > File "./uno.py", line 1, in > from . import db > SystemError: Parent module '' not loaded, cannot perform relative import That error message is a bit confusing, but relat

Re: Python3 : import

2017-07-07 Thread Andrew Z
On Friday, July 7, 2017 at 4:00:51 PM UTC-4, Andrew Z wrote: > this has bee driving me nutz for the past few hours. > 2 modules are in the same directory. I want to be able to use them both: > > [code] > > [az@hp tst1]$ pwd > /home/az/Dropbox/work/Prjs/tst1 > > [az@hp tst1]$ ls -l > total 16 > -

Re: Python3 : import

2017-07-07 Thread Andrew Z
On Friday, July 7, 2017 at 4:00:51 PM UTC-4, Andrew Z wrote: > this has bee driving me nutz for the past few hours. > 2 modules are in the same directory. I want to be able to use them both: > > [code] > > [az@hp tst1]$ pwd > /home/az/Dropbox/work/Prjs/tst1 > > [az@hp tst1]$ ls -l > total 16 > -

Re: python3 import idlelib.PyShell fails

2013-06-30 Thread Helmut Jarausch
On Sun, 30 Jun 2013 13:20:24 +0200, Peter Otten wrote: Thanks a lot! Helmut. -- http://mail.python.org/mailman/listinfo/python-list

Re: python3 import idlelib.PyShell fails

2013-06-30 Thread Peter Otten
Helmut Jarausch wrote: > Hi, > > I have a strange error. When I try import idlelib.PyShell from Python3.3 > it fails with > > Python 3.3.2+ (3.3:68ff68f9a0d5+, Jun 30 2013, 12:59:15) > [GCC 4.7.3] on linux > Type "help", "copyright", "credits" or "license" for more information. import idlel