[Python] How to run python shell automatically when REPL started
Hi, I have embedded REPL shell to my website.
However, when the page is loaded (i.e. REPL loaded), the default page (first page I see) is the bash terminal instead of the python shell.
How do I make the python shell started by default and force the users to stay in the python shell? I don't want my users to see other files in the repository.
Thanks in advance.
Basically, I want my REPL terminal looks like this (see image below) when it's loaded (now I have to type
python explicitly to start the interactive shell). Moreover, I don't want users to
exit the python shell by typing
I have another question, if I run
import modi in the python shell, it complains that it doesn't have its dependencies installed.
Is there a way that I can install the dependencies (i.e. running
python3 setup.py install) implicitly? I don't want my users to type that command explicitly.
FYI, I have configured my
.replit file as below:
# https://docs.repl.it/repls/dot-replit run="while true; do python; done" language="python3" onBoot="python3 setup.py install" [packager] afterInstall="echo installation is finished!" ignoredPaths=[".git", ".github", "doc", "tests"] ignoredPackages=["python-can"]
I thought the onBoot option would work as I expected but had no luck there. Maybe I'm not rebooting the shell properly? I just refreshed the page (I'm not sure what triggers the REPL.it to reboot).
I would appreciate it if you'd help on this.