Re: Scoping issue with import

2005-03-01 Thread Steve Holden
James Stroud wrote: Say I have a module, we'll call it "my_imported_mod". It contains a function in it that calls another function, "myfun". The "myfun" function is in the module "my_main_mod", that imports "my_imported_mod". The code of "my_main_mod" might look like this: == from my

Re: Scoping issue with import

2005-02-28 Thread Calvin Spealman
Each module is only 'aware' of the built-ins and the modules it itself imports. So, all you need to do is add this line to my_imported_mod: from my_main_mod import myfun This is a fully intentional feature. Modules stand on their own. James Stroud wrote: > Say I have a module, we'll call it "my

Re: Scoping issue with import

2005-02-28 Thread Carl Banks
James Stroud wrote: > Say I have a module, we'll call it "my_imported_mod". It contains a function > in it that calls another function, "myfun". The "myfun" function is in the > module "my_main_mod", that imports "my_imported_mod". [snip] > How to rectify this with minimal code change? How to le

Scoping issue with import

2005-02-28 Thread James Stroud
Say I have a module, we'll call it "my_imported_mod". It contains a function in it that calls another function, "myfun". The "myfun" function is in the module "my_main_mod", that imports "my_imported_mod". The code of "my_main_mod" might look like this: == from my_imported_mod import