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

List:       python-list
Subject:    Re: newbie question
From:       Calvin Spealman <cspealma () redhat ! com>
Date:       2019-08-01 14:57:05
Message-ID: CACo5Rz5PBqtUSRv+HuoffTtT+S+Mj57QkEuJNVEse61Gx=kSQg () mail ! gmail ! com
[Download RAW message or body]

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>
-- 
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