Code: Select all
from scipy import *
Code: Select all
h.load_file(whatever.hoc)
Code: Select all
x = 0.001
If i change for
Code: Select all
x = 1e-3
Code: Select all
import scipy as sc
regards
Moderator: hines
Code: Select all
from scipy import *
Code: Select all
h.load_file(whatever.hoc)
Code: Select all
x = 0.001
Code: Select all
x = 1e-3
Code: Select all
import scipy as sc
That's fine. Just remember that a variable whose name in hoc is x will be called h.x in Python.stil wrote:I used documentations in http://www.davison.webfactional.com/not ... oc-python/, somehow kept using a regular hoc file for all the model description, and used python for all the surrounding tasks (simulation control, plotting)...
Not at all. Just pointing out that, if you want to use Python to refer to a variable that was created by a hoc statement, there is a way to do that. For example, if there is a hoc statement likeDo you suggest to write 'everything' in the same language, to make a choice between hoc and python