官术网_书友最值得收藏!

Code conventions used in the book

Now that the credibility of Python and NumPy has been established, let's get our hands dirty.

The default environment used for all Python code in this book will be IPython. Instructions on how to install IPython and other tools follow in the next section. Throughout the book, you will only have to enter input in either the command window or the IPython prompt. Unless otherwise specified, code will refer to Python code, and command will refer to bash or DOS commands.

All Python input code will be formatted in snippets like these:

 In [42]: print("Hello, World!")

In [42]: in the preceding snippet indicates that this is the 42nd input to the IPython session. Similarly, all input to the command line will be formatted as follows:

 $ python hello_world.py 

On Windows systems, the same command will look something like this:

C:\Users\JohnDoe> python hello_world.py

For the sake of consistency, the $ sign will be used to denote the command-line prompt, regardless of OS. Prompts, such as C:\Users\JohnDoe>, will not appear in the book. While, conventionally, the $ sign indicates bash prompts on Unix systems, the same commands (without typing the actual dollar sign or any other character), can be used on Windows too. If, however, you are using Cygwin or Git Bash, you should be able to use Bash commands on Windows too.

Note that Git Bash is available by default if you install Git on Windows.

主站蜘蛛池模板: 临泽县| 阳新县| 六安市| 酒泉市| 库尔勒市| 襄垣县| 清徐县| 和平区| 苗栗市| 阿城市| 浦北县| 凤凰县| 普兰店市| 西乌| 缙云县| 娄烦县| 大埔区| 乐陵市| 江西省| 合肥市| 望都县| 宽城| 汝城县| 和顺县| 新邵县| 南京市| 西昌市| 深州市| 分宜县| 东台市| 尉氏县| 永德县| 灵璧县| 龙海市| 松江区| 敖汉旗| 卢龙县| 星子县| 胶南市| 北票市| 邹平县|