- 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:

推薦閱讀
- 少兒人工智能趣味入門(mén):Scratch 3.0動(dòng)畫(huà)與游戲編程
- Kali Linux Web Penetration Testing Cookbook
- C語(yǔ)言程序設(shè)計(jì)習(xí)題解析與上機(jī)指導(dǎo)(第4版)
- Building a Game with Unity and Blender
- 簡(jiǎn)單高效LATEX
- Visual C#.NET程序設(shè)計(jì)
- Scratch3.0趣味編程動(dòng)手玩:比賽訓(xùn)練營(yíng)
- Hands-On GUI Programming with C++ and Qt5
- C++ Application Development with Code:Blocks
- 分布式數(shù)據(jù)庫(kù)原理、架構(gòu)與實(shí)踐
- Data Science Algorithms in a Week
- 軟件測(cè)試分析與實(shí)踐
- SEO教程:搜索引擎優(yōu)化入門(mén)與進(jìn)階(第3版)
- Python第三方庫(kù)開(kāi)發(fā)應(yīng)用實(shí)戰(zhàn)
- AngularJS UI Development