Hi all,
I'm trying to use python and the neuron GUI, but every time that I lunch the GUI it freeze and it is completely unresponsive...
I think it's a problem of thread sync...
Is there any known solution, or I should keep going with hoc?
Neuron GUI with python?
Moderator: hines
-
- Posts: 14
- Joined: Tue May 24, 2005 3:56 am
- Location: CNRS, Gif sur Yvette, France
- Contact:
Re: Neuron GUI with python?
I find that the GUI works if launching the Python interpreter via
nrngui -python
but not with plain "python"
(this is on Linux and Darwin, don't know about Windows)
nrngui -python
but not with plain "python"
(this is on Linux and Darwin, don't know about Windows)
Re: Neuron GUI with python?
this is doing the trick!! Thanks a lot!
Re: Neuron GUI with python?
On my system (ubuntu 4.1.2)the proposed solution doesn't work. the code only seems to work when directly loaded from python (python <py_file_with_nrn_statement>)
Ben
Ben
Re: Neuron GUI with python?
Hi btorb,
I don't know but it seems you have a really old systems (4.1.2) has been discontinued long time ago. I think you should try to upgrade and check again.
I'm running an ubuntu 8.04 with neuron 6.2.3 and the way proposed above it's working fine.
I don't know but it seems you have a really old systems (4.1.2) has been discontinued long time ago. I think you should try to upgrade and check again.
I'm running an ubuntu 8.04 with neuron 6.2.3 and the way proposed above it's working fine.
-
- Posts: 267
- Joined: Fri Nov 28, 2008 3:38 pm
- Location: Yale School of Public Health
Re: Neuron GUI with python?
Sorry to resurrect an old conversation, but...
Did anyone ever figure out a good way to get the gui from python? If I start with "nrngui -python" and get a python interpretor that way, everything works wonderfully, but what I want to do is:
$ python
Python 2.5.2 (r252:60911, Oct 5 2008, 19:29:17)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import neuron
NEURON -- Release 7.0 (281:80827e3cd201) 2009-01-16
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See http://www.neuron.yale.edu/credits.html
>>> from neuron import h
>>> h('load_file("nrngui.hoc")')
1
1
>>> quit()
That almost works. Only one problem: As the original poster mentioned, this leads to a nonresponsive menu. If I enable composting (in Ubuntu 8.10), it's even worse: the window with the menu shows up in the window list, shows up in the workspace switcher, can even be moved... but is completely invisible.
Did anyone ever figure out a good way to get the gui from python? If I start with "nrngui -python" and get a python interpretor that way, everything works wonderfully, but what I want to do is:
$ python
Python 2.5.2 (r252:60911, Oct 5 2008, 19:29:17)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import neuron
NEURON -- Release 7.0 (281:80827e3cd201) 2009-01-16
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See http://www.neuron.yale.edu/credits.html
>>> from neuron import h
>>> h('load_file("nrngui.hoc")')
1
1
>>> quit()
That almost works. Only one problem: As the original poster mentioned, this leads to a nonresponsive menu. If I enable composting (in Ubuntu 8.10), it's even worse: the window with the menu shows up in the window list, shows up in the workspace switcher, can even be moved... but is completely invisible.
Re: Neuron GUI with python?
Generally, at least since NEURON 7.0, one can do the following:
$ python
>>> from neuron import gui
And the GUI will appear.
See:
https://www.neuron.yale.edu/phpBB2/view ... 1405#p5213
$ python
>>> from neuron import gui
And the GUI will appear.
See:
https://www.neuron.yale.edu/phpBB2/view ... 1405#p5213
-
- Posts: 267
- Joined: Fri Nov 28, 2008 3:38 pm
- Location: Yale School of Public Health
Re: Neuron GUI with python?
Works great. Thanks.