[TriPython] Hello World (was: Events at Redhat?)
Eric Bell
ericbell271 at gmail.com
Thu Dec 14 19:50:02 EST 2017
Hi,
It worked when I reloaded it before I imported the package.
E.g.
Import importlib
importlib.reload (mod)
Import mod
If I use importliv.reload after I import the mod then it doesn't work.
Thanks
Eric
On Dec 14, 2017 5:47 PM, "Eric Thomson" <thomson at neuro.duke.edu> wrote:
> On 12/13/17, 8:10 PM, "TriZPUG on behalf of Eric Bell"
> <trizpug-bounces+cbc=unc.edu at python.org on behalf of ericbell271 at gmail.com>
> wrote:
> > My problem is:
> > module runs and comes up with output in test
> > "Hello World"
> > I update the module to say something else and my output in test still
> says
> > "Hello World"
> .
> > I have used both imp and importlib to reload the module. This does not
>
> That is very peculiar, as I do that with importlib (Python 3.6) and it
> works great.
>
> The cases that work for me (and it sounds like you have tried already):
>
> import importlib
> import <module>
> importlib.reload(<module>)
>
> Or the case where I load the module with 'as':
> import imporblib
> import <module> as <foo>
> importlib.reload(<foo>)
>
> If that is not working, then like Chris suggested, it sounds like a file
> path problem. It would be helpful if you posted a gist or code snippet of
> what you have tried, with your directory structure explicitly specified.
> _______________________________________________
> TriZPUG mailing list
> TriZPUG at python.org
> https://mail.python.org/mailman/listinfo/trizpug
> http://tripython.org is the Triangle Python Users Group
>
-------------- next part --------------
Hi,
It worked when I reloaded it before I imported the package.
E.g.
Import importlib
importlib.reload (mod)
Import mod
If I use importliv.reload after I import the mod then it doesn't work.**
Thanks**
Eric
On Dec 14, 2017 5:47 PM, "Eric Thomson" <[1]thomson at neuro.duke.edu> wrote:
On 12/13/17, 8:10 PM, "TriZPUG on behalf of Eric Bell"
<trizpug-bounces+cbc=[2]unc.edu at python.org on behalf of
[3]ericbell271 at gmail.com> wrote:
> My problem is:
> module runs and comes up with output in test
>** **"Hello World"
>** I update the module to say something else and my output in test
still says
>** **"Hello World"
.
> I have used both imp and importlib to reload the module. This does not
That is very peculiar, as I do that with importlib (Python 3.6) and it
works great.
The cases that work for me (and it sounds like you have tried already):
import importlib
import <module>
importlib.reload(<module>)
Or the case where I load the module with 'as':
import imporblib
import <module> as <foo>
importlib.reload(<foo>)
If that is not working, then like Chris suggested, it sounds like a file
path problem. It would be helpful if you posted a gist or code snippet
of what you have tried, with your directory structure explicitly
specified.
_______________________________________________
TriZPUG mailing list
[4]TriZPUG at python.org
[5]https://mail.python.org/mailman/listinfo/trizpug
[6]http://tripython.org is the Triangle Python Users Group
References
Visible links
1. mailto:thomson at neuro.duke.edu
2. mailto:unc.edu at python.org
3. mailto:ericbell271 at gmail.com
4. mailto:TriZPUG at python.org
5. https://mail.python.org/mailman/listinfo/trizpug
6. http://tripython.org/
More information about the TriZPUG
mailing list