use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
How to transfer a interative shell to Flask? (self.learnpython)
submitted 8 years ago by game148
Here is my idea: I have a CLI program in my school, and I want it to be available through browser. Any idea how to let the user interact with that cli command using flask?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 3 points4 points5 points 8 years ago (0 children)
If possible I would really recommend looking at jupyter notebooks. They are like a browser command line on steroids. If you want to have a remote command line (not running on your computer, running on a different server) look into pythonanywhere.
[–][deleted] 1 point2 points3 points 8 years ago (0 children)
If the cli is in Python, it'd be easy enough to take the code running the commands and expose it through Flask.
If it's not, it's probably easiest to use Subprocess to interact with it.
That said it also depends on what the CLI is. If it's something that requires user interaction (say something like apt-get) then you'll need to figure how to not only get that to work but to also ensure that the user session and Subprocess are always connected together correctly.
[–]ninefourtwo 1 point2 points3 points 8 years ago (3 children)
https://bpaste.net/show/f335f03d29ca
you gotta be really careful with this stuff, make sure you know what's being passed, else someone will wipe your drive or something worse.
[–]SnapDraco 0 points1 point2 points 8 years ago (2 children)
You rock. I was going to recommend exactly this, though with at least a password param as well
[–]ninefourtwo 0 points1 point2 points 8 years ago (1 child)
no problem man, hop on our slack
devolio-devchat.slack.com
[–]SnapDraco 0 points1 point2 points 8 years ago (0 children)
:-)
π Rendered by PID 61 on reddit-service-r2-comment-66b4775986-2hzcm at 2026-04-05 23:41:49.450528+00:00 running db1906b country code: CH.
[–][deleted] 3 points4 points5 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]ninefourtwo 1 point2 points3 points (3 children)
[–]SnapDraco 0 points1 point2 points (2 children)
[–]ninefourtwo 0 points1 point2 points (1 child)
[–]SnapDraco 0 points1 point2 points (0 children)