Skip to content

Conversation

ramcdougal
Copy link
Member

@ramcdougal ramcdougal commented Aug 18, 2025

This is most of #3570 BUT PythonObjects don't work, which was the point. Regular HocObjects do.

A test that almost worked on a previous commit:

oc>objref pyobj, rxd, cyt, ca, cl, n, reaction, cacl2
oc>
oc>{
>       oc>    if (nrnpython("from neuron import n, rxd")) {
>               oc>        pyobj = new PythonObject()
>               oc>        rxd = pyobj.rxd
>               oc>        n = pyobj.n
>               oc>        create soma
>               oc>        cyt = rxd.Region(n.allsec())
>               oc>        ca = rxd.Species(cyt, 0, "ca", 2, 1)
>               oc>        print "created ca"
>               oc>        cl = rxd.Species(cyt, 0, "cl", -1, 1)
>               oc>        print "created cl"
>               oc>        cacl2 = rxd.Species(cyt, 0, "cacl2", 0, 0)
>               oc>        print "preparing to define reaction"
>               oc>    }
>       oc>}
created ca
created cl
preparing to define reaction
oc>objref cacl2
oc>cacl2 = ca + 2 * cl
initcode failed with 1 left
oc>cacl2 = ca 
oc>cacl2 = ca + cl
oc>cacl2 = ca + cl + cl
initcode failed with 1 left
oc>

and at some poimnt I printed out ca + cl and that was fine.

Copy link

✔️ 1b4e186 -> Azure artifacts URL

Copy link
Contributor

✔️ 1b4e186 -> artifacts URL

Copy link
Contributor

✔️ e2a1081 -> artifacts URL

Copy link
Contributor

✔️ 7d88074 -> artifacts URL

Copy link

✔️ 7d88074 -> Azure artifacts URL

Copy link

✔️ 3e8bb12 -> Azure artifacts URL

Copy link
Contributor

✔️ 3e8bb12 -> artifacts URL

Copy link
Contributor

✔️ 71b9e78 -> artifacts URL

Copy link

Copy link
Contributor

✔️ d54d94d -> artifacts URL

Copy link

✔️ d54d94d -> Azure artifacts URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant