1. First create the file (cd to the directory where it needs to be placed) touch myTest.py 2. Edit myTest.py vi myTest.py Add content inside #! /usr/bin/env python Then add the code you need to add print('hello, world!') Then enter command mode, :wq save and exit vi 3. Change the permissions of myTest.py as needed. This is mainly used for testing, so do not set it to 777 chmod 777 myTest.py 4. This is to run myTest.py directly in the current directory (similar to directly executing exe in windows) ./myTest.py The above method of directly running py files in Linux is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of JS ES6 coding standards
>>: Why do select @@session.tx_read_only appear in DB in large quantities?
Preface The reason for writing this article is mai...
Table of contents Problem Description Rendering T...
Table of contents 1. Open the project directory o...
Table of contents 1. Virtual Host 1.1 Virtual Hos...
1. Download the software 1. Go to the MySQL offic...
Cocos Creator version: 2.3.4 Demo download: https...
Is there any way to remove spaces from a certain ...
This article shares the specific code for the js ...
Here are some problems encountered in the use of ...
This article shares the specific code of js to re...
Logo optimization: 1.The logo image should be as ...
Use scenarios: The project's pages need to lo...
Table of contents 1. Start and stop service instr...
Table of contents 1. Brief description 2. Steps t...
Table of contents 1. Software Package 2. Install ...