I think I see the answer.  When you change something in a Leo node, you do 
not induce Python to re-compile any .pyc files in the various pycaches. If 
Leo had already loaded matplotlib earlier, then it would reuse that 
compiled code when you did another matplotlib import from within Leo (e.g., 
when trying out those examples).   So if something changed in, say, a new 
updated matplotlib package, you wouldn't see it until you deleted all the 
pycache files - or until you ran from a terminal instead of Leo. 

Not exactly a Python bug, then, but say an unexpected feature?

On Saturday, March 28, 2020 at 7:26:58 AM UTC-4, Thomas Passin wrote:
>
> If you want to see something else really strange, the same 
> matplotlib-without-VR3 example that runs successfully with CTRL-B fails to 
> run from a (non-Leo) terminal.  The error says that this line invokes 
> parameters that don't exist.  I had to remove the line and then the plot 
> was produced:
>
> curve1.opts(height=350, width=300)
>
> [Later] After I upgraded Leo from Pypi, the same example no longer runs 
> within Leo until I remove that same line.  I don't see how any caching of a 
> package could survive across multiple restarts of Python, but how else 
> could this be explained?  I wonder if there is a problem with the 
> (relatively) new mechanism that Python uses for deciding whether to 
> re-compile .pyc files in the pycache directories.
>
> I also wonder if this weirdness has something to do with the difference 
> between my results and yours.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/5f8fca37-991a-4fbe-a048-ba18cfb13cfd%40googlegroups.com.

Reply via email to