comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » How reload (re-import) a modified Python module through the IDL to Python bridge ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How reload (re-import) a modified Python module through the IDL to Python bridge ? [message #93367 is a reply to message #93366] Mon, 27 June 2016 06:25 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Monday, June 27, 2016 at 2:13:26 PM UTC+1, alx wrote:
> I want to use homemade Python modules through the IDL Python bridge.
> While developing such a module (for instance by modifying it in Spyder IDE and running it in an IDLDE session, back and forth), I did not find the right way to (re)import the last modified version of the Python module, in order to use it again, from the still open IDL session.
> Is there a way, from IDL or Python side, to solve that ? How does IDL locate the module specified by its name in Python.Import method ?
> Thanks to anyone for any clarification.
> alx.

Hi, if you're on the python 2.x side, I think that reload() might do the job.
https://docs.python.org/2.7/library/functions.html?highlight =reload#reload
There are some ways of doing this in 3.x using the "imp" module. No experience with that.
By the way, that's the python way. No idea if this works on the idl-python bridge! [probably not :-/]

Cheers,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ENVI_DOIT, 'MNF_DOIT' from previous noise statistics?
Next Topic: How to use mpfitfun.pro for fitting?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:01:28 PDT 2025

Total time taken to generate the page: 0.00678 seconds