How to develop in Python

I will continue to explain while reading the reference book.

Python mainly has interactive programming and coding methods to write to modules (files). You are free to choose either one depending on the intended use, or you can develop while using both. Interactive programming is to launch a terminal or command prompt, launch Python in it, and then code on the terminal. Basically, if you write one line and press Enter, that line will be executed on the PVM. There is also a way to write several lines at once, but this time. By the way, even if you don't use print statement, you can get the output automatically interactively. By the way, Anaconda sets variables at the time of installation and also prepares a command prompt for Anaconda.

Anaconda Command Prompt and IDE (Integrated Development Environment) Spyder: Anaconda IDE.jpg

Launch Python at the command prompt: Python立ち上げ.jpg

Input and output values: 対話型でのHello World!と足し算の入力と出力.jpg

However, in interactive mode, once the code is executed, the code is not saved. So if you want to write the same code, you have to copy and paste it, and you will have to compile it every time. By the way, CTRL + Z is for Windows and CTRL + D is for Unix to end Python in the prompt.

However, if you write it in a module, the code will remain semi-permanently, and once compiled, it will be automatically converted to chord, and you only have to execute the bytecode on the PVM. The Python file has a .py extension and the bytecode is .pyc (it automatically generates .pyc at compile time). There is a way to run the code in this file inside the prompt. For example, to run it as if you created a module called test.py at the prompt Moduleの実行.jpg Will execute the code in the module. Unlike interactive, a print statement is required to print the values in the module. As I wrote in the previous post, I use Anaconda's IDE, so this method may be less used, but I thought it would be useful when I reviewed it.

Anaconda IDE (Spyder): Spyder(IDE of Python).jpg

So far, I've explained the general development tools of Python, but from the next time, I'll actually write about coding.

Well, I thought I'd make a LIFO and FIFO in Python for the time being, but it seems that it will take some time to get started. If you have any corrections or questions in this post, please let me know in the comments or by e-mail!

Reference: First Python 3rd Edition (Publisher: O'Reilly Japan)

Anaconda download site (I think it's in English only): http://continuum.io/downloads

Recommended Posts

How to develop in Python
[Python] How to do PCA in Python
How to collect images in Python
How to use SQLite in Python
How to use Mysql in python
How to wrap C in Python
How to use ChemSpider in Python
How to use PubChem in Python
How to handle Japanese in Python
[Introduction to Python] How to use class in Python?
How to access environment variables in Python
How to install Python
How to dynamically define variables in Python
How to do R chartr () in Python
[Itertools.permutations] How to put permutations in Python
How to work with BigQuery in Python
How to get a stacktrace in python
How to display multiplication table in python
How to develop in a virtual environment of Python [Memo]
How to switch python versions in cloud9
How to adjust image contrast in Python
How to use __slots__ in Python class
How to dynamically zero pad in Python
How to use regular expressions in Python
How to display Hello world in python
How to use is and == in Python
How to write Ruby to_s in Python
How to use the C library in Python
How to receive command line arguments in Python
[REAPER] How to play with Reascript in Python
How to clear tuples in a list (Python)
How to generate permutations in Python and C ++
How to implement Discord Slash Command in Python
Summary of how to import files in Python 3
How to simplify restricted polynomial fit in python
How to use Python Image Library in python3 series
How to implement shared memory in Python (mmap.mmap)
How to create a JSON file in Python
Summary of how to use MNIST in Python
How to specify TLS version in python requests
Steps to develop a web application in Python
How to notify a Discord channel in Python
How to get the files in the [Python] folder
How to use tkinter with python in pyenv
How to run Leap Motion in non-Apple Python
[Python] How to draw a histogram in Matplotlib
How to output "Ketsumaimo" as standard output in Python
How to handle datetime type in python sqlite3
How to make Python Interpreter changes in Pycharm
How to plot autocorrelation and partial autocorrelation in python
How to remove duplicate elements in Python3 list
How to install Python [Windows]
To flush stdout in Python
python3: How to use bottle (2)
Login to website in Python
How to update Python Tkinter to 8.6
How to use Python argparse
[Python] How to use checkio
How to run Notepad ++ Python
Speech to speech in python [text to speech]
How to change Python version