1

Have the following query:

consider test/auto/gen/init.py has a version field set as 1.1.1

Now start the script which contains:

Step 1: from test.auto import gen as auto_gen

Step 2: open the file test/auto/gen/__init__.py

Step 3: write __version__=1.1.2 to this file

Step 4: now use auto_gen to check the content auto_gen.__version__ this still points to 1.1.1

But when i exit the script and comeback again then i see after importing the auto_gen.__version__ gives me updated value as 1.1.2

I also tried importing again after writing to the file but still the same problem. (from test.auto import gen as auto_gen)

So this problem i see as a generic one. In the sense if i am running a script and it generates a python file on the fly the object does not get updated.

Exit from the ipython or the script excecution and then running again solves this.

Can any please give some suggestions to this problem.

Aprameya NDS
  • 467
  • 1
  • 5
  • 10
  • Thanks Ignacio for pointing me out to the one which has already been answered. But still had a query on the sub modules. I have "gen" folder which has many submodules. How do i go and reload each. Where do i get the track of these. Sorry a kind of newbie in these things. – Aprameya NDS Mar 10 '17 at 07:39

0 Answers0