Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4324350
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:07:14+00:00 2026-05-21T09:07:14+00:00

Simple python question. When in interactive mode, I’m test an imported file, let’s say

  • 0

Simple python question.

When in interactive mode, I’m test an imported file, let’s say I use:

from foo import foo

But in the same time I edit the code. How can I update the script which is once loaded into interactive python? When I try to reimport it, nothing happens and I’m still on my old files.

Thanks for any help.

EDIT:
Ok, as I understand reload(modulename) works fine, but… What if I’m trying to reload a class with its methods? As it’s written in documentation:

If a module instantiates instances of a class, reloading the module that defines the class does not affect the method definitions of the instances — they continue to use the old class definition. The same is true for derived classes.

But there’s no word how to update a class methods. Any idea?

The answer’s here
How to reload the code of a method of class object in Python?

No more question as everything works fine now 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T09:07:15+00:00Added an answer on May 21, 2026 at 9:07 am

    Did you take a look at this question?
    Reloading a changed python file in emacs python shell

    Libraries in your python path can be easily updated with reload(modulename).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New to Python, have a simple, situational question: Trying to use BeautifulSoup to parse
I am able to understand immutability with python (surprisingly simple too). Let's say I
I made simple python program to generate big text file: import sys import random
Very simple question: Specifically in Python (since Python actually has strongly recommended style guidelines
Simple enough question: I'm using python random module to generate random integers. I want
I have some questions about the performance of this simple python script: import sys,
I have a simple python script (say, simple.py) , like a = 5 b
I came here to ask a simple, very beginner question regarding python. I just
Very simple question, hopefully. So, in Python you can split up strings using indices
Possible Duplicate: Python conditional assignment operator Apologies for such a simple question, but googling

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.