Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Jupyterhub examples #15

Open
JStatnekov opened this issue Feb 8, 2024 · 1 comment
Open

Question: Jupyterhub examples #15

JStatnekov opened this issue Feb 8, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@JStatnekov
Copy link

I'd really like to use cli2gui in a Jupyterhub project but I'm not sure if you're supporting that environment. I see that "web" is one of the GUI toolkits that's supported but perhaps that doesn't mean using Jupyterhub?

I've got a freshly built TLJH docker image from today's main head of https://github.com/jupyterhub/the-littlest-jupyterhub and have installed cli2gui by running "./pip install cli2gui" from within the /opt/tljh/user/bin directory of the running tljh docker instance. I've copied the contents of https://github.com/FHPythonUtils/Cli2Gui/blob/master/tests/argparse/test_10.py into a jupyterlab notebook cell (and commented out the top few file pathing stuff since cli2gui is already installed) . Upon running the cell, I get a tkinter error which suggests it's not detecting the Jupyter environment. The error is "TclError: no display name and no $DISPLAY environment variable." which makes a lot of sense since I'm not running this as a desktop app.

I'm hoping to get clarification that I can use your project within a Jupyter environment and if so, some pointers on how to get a working example.

I've found that this approach works well for detecting if a script is running under jupyter or not : https://stackoverflow.com/questions/15411967/how-can-i-check-if-code-is-executed-in-the-ipython-notebook

@JStatnekov JStatnekov added the question Further information is requested label Feb 8, 2024
@FredHappyface
Copy link
Member

Honestly I've not played around with Jupyterhub before so I'm not sure. If you want to use the web flavour of pysimplegui then you need to install the extra and pass gui=pysimpleguiweb in the cli2gui decorator function

Also do you mind dropping full stack traces when you can just so I can see what part of cli2gui falls over (might be indicative of a bug for instance)

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

No branches or pull requests

2 participants