- 论坛徽章:
- 0
|
#! /usr/bin/python 这是个什么意思???
可以让你的脚本直接运行
Python in Nutshell里的说明
You can run Python code interactively, with the Python interpreter or an IDE. Normally, however, you initiate execution by running a top-level script. To run a script, you give its path as an argument to python, as covered earlier in this chapter. Depending on your operating system, you can invoke python directly, from a shell script, or in a command file. On Unix-like systems, you can make a Python script directly executable by setting the file's permission bits x and r and beginning the script with a so-called shebang line, which is a first line of the form:
#!/usr/bin/env python {options}
providing a path to the python program. |
|