unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* interactive input using guix-jupyter-kernel
@ 2020-07-17  1:27 david larsson
  2020-07-24 16:51 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: david larsson @ 2020-07-17  1:27 UTC (permalink / raw)
  To: help-guix

Hi,

How can I ask for password input and get a password prompt in the 
notebook if I use the guix kernel in jupyter?

;;guix environment python-env <- python-ipython python-ipykernel
import getpass
password = getpass.getpass()

using a regular python kernel this works fine but not with guix kernel.


In the console output I get this:

guix[21400]: forwarding "execute_reply" from 21419, socket #<procedure 
%kernel-shell-procedure (s)> to 
"3834336638323162363266303430333461663738663337306539323561666263"

so Im wondering if this particular request just have no guile target 
code? Like a python request would perhaps terminate in code from 
python-qtconsole is what Im thinking.


I installed and started guix-jupyter like this:

echo "(list (channel (name 'guix) (url 
\"https://git.savannah.gnu.org/git/guix.git\") (commit 
\"96e1866605f3e1dd94ec3aa3cd8c41af45589b64\")))" >/tmp/channels.scm
guix time-machine -C /tmp/channels.scm -- package -i jupyter 
guix-jupyter python-jupyter-console python-qtconsole 
python-widgetsnbextension python-ipywidgets -p 
~/guix-profiles/jupyter_guix_time_machine
GUIX_PROFILE="/tmp/jupyter_guix_time_machine"
. "$GUIX_PROFILE"/etc/profile
jupyter-notebook .


Best regards,
David



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: interactive input using guix-jupyter-kernel
  2020-07-17  1:27 interactive input using guix-jupyter-kernel david larsson
@ 2020-07-24 16:51 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2020-07-24 16:51 UTC (permalink / raw)
  To: david larsson; +Cc: help-guix

Hi David,

david larsson <david.larsson@selfhosted.xyz> skribis:

> How can I ask for password input and get a password prompt in the
> notebook if I use the guix kernel in jupyter?
>
> ;;guix environment python-env <- python-ipython python-ipykernel
> import getpass
> password = getpass.getpass()
>
> using a regular python kernel this works fine but not with guix kernel.

Oh, it may be a bug in Guix-Jupyter.  I confirm I can reproduce the
issue; I get:

--8<---------------cut here---------------start------------->8---
guix[11012]: evaluating code in environment "python-env" (PID 11126)
guix[11012]: forwarding "status" from 11126, socket #<procedure %kernel-iosub-procedure (s)> to "3163313661666238316638303430643538306265613536353333636162366133"
guix[11012]: forwarding "execute_input" from 11126, socket #<procedure %kernel-iosub-procedure (s)> to "3163313661666238316638303430643538306265613536353333636162366133"
--8<---------------cut here---------------end--------------->8---

and then apparently the Python kernel never replies.

Looking at:

  https://gitlab.inria.fr/guix-hpc/guix-kernel/-/blob/master/jupyter/messages.scm

I think the problem is just that ‘input_request’ messages aren’t
implemented:

  https://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-stdin-router-dealer-channel

I’m not sure I’ll look into it before I go on vacation, but you’re
welcome to give it a try!

Ludo’.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-24 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17  1:27 interactive input using guix-jupyter-kernel david larsson
2020-07-24 16:51 ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).