Truncation of floats upon loading .hoc file from ipython

When Python is the interpreter, what is a good
design for the interface to the basic NEURON

Moderator: hines

Site Admin
Posts: 1609
Joined: Wed May 18, 2005 3:32 pm

Re: Truncation of floats upon loading .hoc file from ipython

Post by hines »

The problem remains after changing the init file as you suggested.
now does not work anymore in an ipython console (without spyder, after reinstallation of neuron).
The "embedded" variable is certainly the cause of failure to print due to import hoc being executed prior to import neuron.
I did notice that the problem was dependent on whether there was a $HOME/.spyder2 folder which might contain startup information that
silently executed one or the other on startup. This made my results confusing at first since the problem was difficult to reproduce. I finally
made it completely reproducible by removing the .spyder2 folder prior to launching spyder. Anyway, it is disappointing that manual modification
of the "embedded" variable did not fix your problem, though I certainly would have expected it to fix the <print from hoc> issue.
In [3]: neuron.h.dend[1].diam3d(1)
Out[3]: 0.0
But that is a serious problem that is difficult to lay at the feet of the "embedded" variable since it has nothing to do with printing a value
within the HOC world but is an entirely python world issue about the return value of a function call. So the first issue for me is to be able to
reproduce this specific problem. Would it be possible for us to have a skype or google hangout conversation where you could share your screen,
show me the problem, and let me ask a few questions about your environment. We can take this issue to email where it will be easier to
Post Reply