[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: newbie question
From:       Sidney Langweil <sidneylangweil () gmail ! com>
Date:       2019-08-01 15:31:58
Message-ID: 3653d807-bdba-40a2-b6d1-7632e6816192 () googlegroups ! com
[Download RAW message or body]

On Thursday, August 1, 2019 at 7:57:31 AM UTC-7, Calvin Spealman wrote:
> Sorry, but you can't. If you have two python modules, neither has access to
> things in the other without an import.
> 
> That's the whole point of an import.
> 
> On Thu, Aug 1, 2019 at 10:30 AM Sidney Langweil <sidneylangweil@gmail.com>
> wrote:
> 
> > A Python script invokes a function in another file in the same directory.
> >
> > I would like to invoke that function without the need for an import.
> >
> > I think I read that having an empty __init__.py is sufficient.  But it
> > does not seem to work for me.
> >
> > I'm sure this is obvious to many of you.  Thanks in advance for your help.
> >
> > Sid
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
> 
> 
> -- 
> 
> CALVIN SPEALMAN
> 
> SENIOR QUALITY ENGINEER
> 
> cspealma@redhat.com  M: +1.336.210.5107
> [image: https://red.ht/sig] <https://red.ht/sig>
> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted>

Thank you.  As long as using 'import' is correct in this case, I do not mind inserting the extra line(s).

Side
-- 
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic