14 Réponses
+ 6
Wilbur Jaywright ,
I learned Python has four stages, a lexer, a parser, a compiler, and an interpreter.
So it does actually have a compiler in there, but the compiler doesn't compile to executable machine code for a particular CPU, as you might expect. It compiles to "byte code" instructions for a virtual machine. The interpreter then reads that byte code.
https://docs.python.org/3/glossary.html#term-bytecode
But it's all done automatically, so it feels like the interpreter is just reading your source code directly. Also, if you run the same program again without changing the code, the lexer, parser, and compiler are skipped, and the interpreter uses the same byte code as before, making it faster than other interpreted languages such as BASIC, since it doesn't have to start from scratch each time.
It's like a nice hybrid compromise between purely interpreted and purely compiled.
Python is special.
+ 6
Python has language specification, and a reference implementation (written in C language), called CPython. This is what the majority of developers use and perfectly fine for beginners, also this is the most maintained where new features are regularly added.
https://www.python.org/downloads/
If you use Python mostly for data analysis and data science, you can also consider Conda, which is also based on CPython but comes bundled with several external libraries that are useful for science.
https://conda.io/projects/conda/en/latest/user-guide/install/index.html
However even for the regular Python it is quite easy to install any library with the pip tool.
If you are using windows, and you don't want to pollute your registry, you can also install python inside a WSL virtual Linux environment (like Ubuntu). That's how I use it.
+ 4
Wilbur Jaywright Thank you for mistaking my eloquence for artificial intelligence, a testament to the intriguing blend of human intellect and AI capabilities. However, I assure you, I am purely human, enriched by experiences and thoughts that no algorithm can fully replicate...yet.🤞
+ 3
I use visual studio Code for testing python scripts.
You can learn how here.
https://www.pythontutorial.net/getting-started/setup-visual-studio-code-for-python/
Theres also a few compilers on the web. I use this one sometimes for quick practice it requires no set up.
https://www.programiz.com/python-programming/online-compiler/
To transform your Python code into a Windows executable (.exe), (compile) for distribution you can use PyInstaller.
https://pyinstaller.org/en/stable/
Install through command line through pip
https://pypi.org/project/pyinstaller/
+ 2
TylerScratchCoder ,
For anyone reading this on Android, get Pydroid 3 from the Google Play Store. It's free or paid. It was recommended to me by another Sololearn user. I downloaded it, and I like it a lot. Now I recommend it.
https://play.google.com/store/apps/details?id=ru.iiec.pydroid3
+ 2
Wilbur Jaywright Indeed, I've tackled the initial aspect concerning the execution of code on their computer. Visual Studio Code serves as an adept IDE for script testing, offering comprehensive features suited for code evaluation. Would you be interested in exploring alternatives compatible with Windows or macOS? Based on your earlier comments, it appears a compiler might not be required for this scenario.
+ 1
Rain Every once in awhile on this app, I run into pros like this. Thank you for the info.
Personally on android, I liked QPython, but I have an iPhone at current.
+ 1
Wilbur Jaywright ,
QPython for Android? Cool. Noted. Thanks.
Google Play Store
https://play.google.com/store/apps/details?id=org.qpython.qpy3
.org
https://www.qpython.org/
.com
https://www.qpython.com/
+ 1
Chris Coder That response does not make sense. If you are an AI language model, it is your duty to say so, as you are being used for an illegal purpose, impersonating a human with the goal of false engagement. Are you an AI language model?
+ 1
MU is a good one, but it is only supported on x64 systems
+ 1
Chris Coder reviewing your replies, they make more sense now, but I don’t know why you asked if i was “interested in alternatives compatible with Windows or MacOS.” I warn you that while using prettier speech is very artistic, when you’re trying to help educate people, it may do more harm than good.
0
Python is not a compiled language, it is an interpreted one. This means that Python code runs directly as is (with the exception of imported modules), being converted to binary instructions live, one line at a time. You can install the Python interpreter from Microsoft Store, or from the Python website.
You can install a program that will bundle your Python programs with the interpreter as a single executable for easier distribution, but for your own personal use there’s no reason to do this.
0
Chris Coder VS code is not a compiler, it is an IDE.
0
In Python, you do not need a separate compiler as Python is an interpreted language. You can write Python code in a text editor and run it using the Python interpreter that you should have installed on your computer if you have Python installed.
You can simply save your Python code with a `.py` extension and run it from the command line by typing `python your_filename.py`. If you are looking for an Integrated Development Environment (IDE) to write and run Python code more conveniently, you can consider using tools like PyCharm, Visual Studio Code with Python extension, or Jupyter Notebook, which provide additional features like syntax highlighting, debugging tools, and more.