i just tested an idea i had, what if i installed a package through os.system() in python (my school blocked cmd, and powershell)

so i tested it on a web ide that didn’t allow for custom packages and it worked

obviously it won’t have the same exact idea or whatever, but i also tested running cmd commands in windows 11 via vscode using python (even when cmd is blocked)

https://i.ibb.co/tYTMtRJ/image.png

Dec 8, 2023, 7:00 PM
7 0 5

comments

oh and also i forgot to say you seem to have used the word ideology incorectly lol. idk what you were trying to say but ideology is like a political thing that you believe in i’m pretty sure

yeah mb, i meant “same idea”

you can just use this batch script to run commands (this is how i install pygame and pyopengl and things on my school computers):

@echo off
set version=0.1.0
echo bpsh %version%
:loop
set cmd=echo bpsh: no command specified
title %username%@%computername% %cd% - bpsh %version%
set /p cmd="%username%@%computername% %cd%$ "
title %cmd% {%cd%} - (%username%@%computername%)
%cmd%
goto loop

if running python or python3 fails (it could say command not found, do nothing, or open the microsoft store), you should open the start menu and write “python”, and then right click and “open file location”. this should put you to a folder with a shortcut to python. right click the shortcut, then click open file location again. you should finally be on a file called python.exe. right click the address bar and click “copy link”, then go back to the window running the batch script and write cd "", then inside of the ““ part, right click, which should paste the path, then press enter, which should put you to the folder that contains python. finally, you should be able to run the command python -m pip install (package name) to install what you need.

very useful, thank you!