473,385 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Refreshing imported modules

I have the python interperter opened while editing a module. The
problem is that when I make changes, the module is not refreshed
whenever I import it again. I have to re-launch the interpreter, is
there a way to shortcut this?

May 2 '07 #1
1 1169
On May 2, 7:24 pm, noagbodjivic...@gmail.com wrote:
I have the python interperter opened while editing a module. The
problem is that when I make changes, the module is not refreshed
whenever I import it again. I have to re-launch the interpreter, is
there a way to shortcut this?
I believe you can use the 'reload' command. ie

First import your module :
>>import module_name

If you want to refresh the module after having changed it,
>>module_name = reload(module_name)
That should work. However, any variables you have declared which arise
from classes within your module must be redeclared.

May 3 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Martin M. | last post by:
Hi, I have the following question: How can an imported module see/find the path to itself? Background: From my main script I import a module which needs a file (AppleScript) located in the...
3
by: schpok | last post by:
When I "from foo import *" in my __init__.py, sometimes module foo's docs will be expanded in the pydocs. It seems to depend in what language foo was implemented. For example, if you "from math...
3
by: Mohamed Yousef | last post by:
Hello , The problem I'm asking about is how can imported modules be aware of other imported modules so they don't have to re-import them (avoiding importing problems and Consicing code and...
0
by: Mohamed Yousef | last post by:
Hello , The problem I'm asking about is how can imported modules be aware of other imported modules so they don't have to re-import them (avoiding importing problems and Consicing code and...
0
by: Gabriel Genellina | last post by:
En Sun, 24 Aug 2008 07:34:41 -0300, Mohamed Yousef <harrrrpo@gmail.comescribió: Yes. That way, when you see a name "foo" used in a module, you can look at the imports to see where it comes from....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.