- Mastering Python Scripting for System Administrators
- Ganesh Sanjiv Naik
- 51字
- 2021-07-02 14:00:26
Command-line arguments in Python
We can start a program with additional arguments, in the command line. Python programs can start with command-line arguments. Let's look at an example:
$ python program_name.py img.jpg
Here, program_name.py and img.jpg are arguments.
Now, we are going to use modules to get the arguments:

推薦閱讀
- Mastering Visual Studio 2017
- AngularJS Testing Cookbook
- Python量化投資指南:基礎(chǔ)、數(shù)據(jù)與實(shí)戰(zhàn)
- Practical UX Design
- 零基礎(chǔ)玩轉(zhuǎn)區(qū)塊鏈
- MATLAB實(shí)用教程
- 領(lǐng)域驅(qū)動(dòng)設(shè)計(jì):軟件核心復(fù)雜性應(yīng)對之道(修訂版)
- Learning Unreal Engine Android Game Development
- Python:Deeper Insights into Machine Learning
- 移動(dòng)增值應(yīng)用開發(fā)技術(shù)導(dǎo)論
- Software Development on the SAP HANA Platform
- Functional Python Programming
- MongoDB Cookbook
- RESTful Web API Design with Node.js(Second Edition)
- C#網(wǎng)絡(luò)編程高級篇之網(wǎng)頁游戲輔助程序設(shè)計(jì)