SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: G J. <gle...@gm...> - 2008年04月29日 01:27:29
Hello,
I appologize for a slightly off topic post, but I'm sure someone here
knows the answer. I like the idea of developing code interactively
with IPython, but I cannot get past one hurdle. I would like to write
my code in a module that I then import and instantiate classes or call
functions from interactively. However, when I try to do this in
IPython I find that after I import my code, it is cached and even
after restarting and reimporting, the changes are not recognized. What
is the paradigm people use to get around this, or what is the
preferred paradigm for interactive development using IPython.
Thanks,
Glenn
From: Angus M. <am...@gm...> - 2008年04月29日 03:32:32
2008年4月28日 G Jones <gle...@gm...>:
> Hello,
> I appologize for a slightly off topic post, but I'm sure someone here
> knows the answer.
You're probably right, and people are pretty happy to answer things
here in general. You're more likely to get traction for this question
on the IPython mailing list at <ipython-user at scipy.org>, to which I
have also sent this reply.
> I like the idea of developing code interactively
> with IPython, but I cannot get past one hurdle. I would like to write
> my code in a module that I then import and instantiate classes or call
> functions from interactively.
As far as I can tell, this is a popular and common approach, and one I
use exclusively.
> However, when I try to do this in
> IPython I find that after I import my code, it is cached and even
> after restarting and reimporting, the changes are not recognized. What
> is the paradigm people use to get around this, or what is the
> preferred paradigm for interactive development using IPython.
The method you describe should work without any problem, suggesting to
me that something isn't quite right with your approach yet. Perhaps
you could give a concrete example so we can help debug the problem.
Angus.
-- 
AJC McMorland, PhD candidate
Physiology, University of Auckland
(Nearly) post-doctoral research fellow
Neurobiology, University of Pittsburgh
From: Robin <ro...@gm...> - 2008年04月29日 09:18:53
On Tue, Apr 29, 2008 at 2:27 AM, G Jones <gle...@gm...> wrote:
> Hello,
> I appologize for a slightly off topic post, but I'm sure someone here
> knows the answer. I like the idea of developing code interactively
> with IPython, but I cannot get past one hurdle. I would like to write
> my code in a module that I then import and instantiate classes or call
> functions from interactively. However, when I try to do this in
> IPython I find that after I import my code, it is cached and even
> after restarting and reimporting, the changes are not recognized. What
> is the paradigm people use to get around this, or what is the
> preferred paradigm for interactive development using IPython.
> Thanks,
> Glenn
While I don't see any persistance across restarts of ipython - I do
within a session.
Check the reload command - which will reimport an already imported
module picking up any fresh changes in the source.
Cheers
Robin
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /