Run python script with parameters

 


Problem Description:

To execute a python script, which has several methods.

Especially when reading a book, the book will explain how to run under linux, windows simply do not have those commands, how to do it?


 

 

Method 1: python editor comes IDLE

Run Module is directly run the script, we do not speak of this. That we discuss below, the Run ... Customized .

If the script is back with a number of other commands, the Run ... Customized can come in handy.

 

 

Method 2: windows of the cmd command window 

Most of the time, this is crippled.

 

Method 3: windows powershell

I have here is win10 systems, comes this window. And this seems almost cmd. Most of the time, this is crippled.

 

Method 4: Run the following Cygwin

What Cygwin is, how to install, please click here.

Cygwin is a Linux emulator. That is, basically, to explain the book Linux command, use this tool can perform.

This is Cygwin you can switch to the current directory.

If prompted, missing some commands, remember to reinstall Cygwin, select some package in time, carefully check the number of files you need (many are not checked by default).

For example, if the lack of prompt Cygwin gcc, when the re-installation, there will be a box, you search gcc, then you can check the number of packages you need.

 

Method 5: PyCharm the Terminal window

Of course, PyCharm is a very powerful software, and more feature-rich yet unlocked.

 

 

to sum up:

Cross-platform issues, always annoying. Many books explain some of the commands are run under Linux, in the windows, no start.

Here, just provide an idea. In having problems, try to try all kinds of ways to solve.

 

Guess you like

Origin www.cnblogs.com/music-liang/p/11863214.html