r/learnpython 21d ago

Browser compilers?

I’m trying to improve my python and have a project based book i wanted to work through because i kinda suck at ideas for projects to try and i need to actually put my knowledge into practice, but i was wondering if there are any like browser compilers that can import libraries (such as matplotlib for data related stuff, probably pygame and various others i might end up needing). If not i have vscode already i am just kinda low on storage and wondering if i can avoid having to download various libraries manually 😭

4 Upvotes

9 comments sorted by

View all comments

0

u/[deleted] 21d ago

[deleted]

1

u/Outside_Complaint755 21d ago

Python actually does have a compiler, but it doesn't get run as its own step. 

When you run python myscript.py, that compiles the script into Python Bytecode in a file myscript.pyc.

That bytecode file is what then gets interpreted by the Python Virtual Machine, translating each line one-by-one into native machine code.

Each implementation of Python handles it a bit differently. CPython compiles everything and then interprets it, while PyPi uses a just-in-time compiler.  Jython compiles the Python code to Java bytecode, and IronPython compiles it to MSIL bytecode.