By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,187 Members | 1,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,187 IT Pros & Developers. It's quick & easy.

noob: reloading modified python file within Python Shell

P: n/a
from people.models import *

Now I make changes to the models.py. How do I reload this module in
Python Shell?

Sep 10 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
johnny schrieb:
from people.models import *

Now I make changes to the models.py. How do I reload this module in
Python Shell?
reload(module)

which works only with

import people.models

reload(people.models)

Which is better anyway, as the

from module import *

syntax will create local names that won't be changed by the reload.

Diez
Sep 10 '07 #2

P: n/a
johnny wrote:
from people.models import *

Now I make changes to the models.py. How do I reload this module in
Python Shell?
import people.models
reload(people.models)
from people.models import *

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

Sep 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.