- Secret Recipes of the Python Ninja
- Cody Jackson
- 124字
- 2021-06-25 22:14:39
There's more...
On a side note, the -m option indicates that Python is to run the module as a stand-alone script, that is, its contents will be ran within the __main__ namespace. Doing this means you don't have to know the full path to the module, as Python will look for the script in sys.path. In other words, for modules that you would normally import into another Python file can be run directly from the command line.
In the example of running pipenv, the command takes advantage of the fact that Python allows the -m option to run a module directly or allow it to be imported; in this case, pipenv imports venv to create the virtual environment as part of the creation process.
推薦閱讀
- 數據庫程序員面試筆試真題與解析
- Building a Game with Unity and Blender
- arc42 by Example
- Learning AWS Lumberyard Game Development
- Cassandra Design Patterns(Second Edition)
- Microsoft System Center Orchestrator 2012 R2 Essentials
- R Deep Learning Cookbook
- 青少年信息學競賽
- Python全棧數據工程師養成攻略(視頻講解版)
- Java程序員面試筆試寶典(第2版)
- Troubleshooting Citrix XenApp?
- Learning Splunk Web Framework
- OpenCV Android Programming By Example
- Learning Kotlin by building Android Applications
- Go Systems Programming