[chimerax-users] developing bundles autocompletion
Eric Pettersen
pett at cgl.ucsf.edu
Fri Jun 5 17:08:20 PDT 2020
This is undoubtedly because it uses an in-process kernel (qtconsole.inprocess). I just tested switching to a “regular” kernel, and that does allow connection from outside ChimeraX, but the connection is essentially useless because in the external Python (I tried jupyter-console) sys.path was entirely different, so no chimerax packages were on the path, and in addition ’session’ was not defined, which would make it very hard to do anything. On top of that it broke the internal shell because although sys.path was fine, ’session’ was again not defined, which made it hard to do anything useful.
The code to the builtin shell is in /home/danpal/programs/chimerax-0.93/lib/python3.7/site-packages/chimerax/shell/tool.py . It’s not very long. I’m no Jupyter expert, so if anyone wants to suggest changes that would get external kernel access working without breaking the internal shell, I’m willing to listen.
—Eric
> On Jun 5, 2020, at 2:37 PM, Daniel Esteban Palma Igor <daniel.palma.i at ug.uchile.cl> wrote:
>
> Thanks, didn't know that this option existed. Are there plans to implement external connection to the console?, currently if I try to get the connection information I get the next error:
>
> %connect_info
> /home/danpal/programs/chimerax-0.93/lib/python3.7/site-packages/ipykernel/zmqshell.py:373: UserWarning: Could not get connection info: RuntimeError('app not specified, and not in a running Kernel')
> warnings.warn("Could not get connection info: %r" % e)
>
> On Fri, 5 Jun 2020 at 16:04, Eric Pettersen <pett at cgl.ucsf.edu <mailto:pett at cgl.ucsf.edu>> wrote:
> Hi Daniel,
> ChimeraX’s builtin shell (Tools→General→Shell) is based on Jupyter QtConsole. Tab will autocomplete or show the completion possibilities. Typing the first open paren of a function/method will show the argument signature, doc string, and other information. I also hope you’ve checked out the Programmer’s Guide information (Help→Programming Manual).
>
> --Eric
>
> Eric Pettersen
> UCSF Computer Graphics Lab
>
>
> > On Jun 4, 2020, at 8:42 AM, Daniel Esteban Palma Igor <daniel.palma.i at ug.uchile.cl <mailto:daniel.palma.i at ug.uchile.cl>> wrote:
> >
> > Hi,
> > normally I use spyder for writing python code, is there a way to have autocompletion of functions and modules when developing a bundle for ChimeraX?
> >
> > Any other tips for development is well received.
> >
> > Regards,
> > Daniel Palma Igor
> > _______________________________________________
> > ChimeraX-users mailing list
> > ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
> > Manage subscription:
> > https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
>
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20200605/4d045c21/attachment-0001.html>
More information about the ChimeraX-users
mailing list