28 - Command Line Arguments ( sys.argv ) | Python Tutorials

  Рет қаралды 28,015

SimplyCoded

SimplyCoded

Күн бұрын

Пікірлер: 12
@hansmaier4119
@hansmaier4119 Жыл бұрын
I only had to watch 25 videos before I found yours. Now I understand how sys.argv. Thanks a million
@codingspace1143
@codingspace1143 6 жыл бұрын
Nice explanation really ...but how I can passed arguments between two python scripts in my network? Thanks
@faiqahmadkhan6009
@faiqahmadkhan6009 4 жыл бұрын
It was really helpful . thank you, can you please tell how to pas arguments in a loop or in array form. actually i have 300 files and want to pass them as arguments.
@SimplyCoded
@SimplyCoded 4 жыл бұрын
They’re passed just like any other argument. Without seeing your code I’m not sure what you’re struggling with in particular. MyFunc(myFileList) def MyFunc(fileList): for file in fileList: #deal with file
@mr.anderson5393
@mr.anderson5393 4 жыл бұрын
When would you use this?
@SimplyCoded
@SimplyCoded 4 жыл бұрын
Anytime you want to start a script with specific options. I’m guessing you’ve never used a command line utility, but the gist of it is: Your script is either made to do multiple related things and depending on which option “command line arg” you pass in will change the scripts behavior, and or as the programmer you try to make your script as generic as possible so that the user can pass in the details at the start of the script thus making it more flexible without having the user know how to code.
@mr.anderson5393
@mr.anderson5393 4 жыл бұрын
@@SimplyCoded I did it before, just that I forgot the syntax I guess. After watching your video, it came back. Thanks for the video.
@sufiyanmomin443
@sufiyanmomin443 5 жыл бұрын
How to set default command line argument
@dimitriosdesmos4699
@dimitriosdesmos4699 7 жыл бұрын
After i get the basics from other videos i come here for really cool stuff that i cant get elswhere, but if you think for one second that a newbie will understand anything that you say think again. You go into sys...like....what is SYS??....no introduction whatsoever. .....
@brandonlee712
@brandonlee712 5 жыл бұрын
Why not just use input()
@TalsonHacks
@TalsonHacks 4 жыл бұрын
Brandon Lee cuz Input is limited, but argv can be used to add as many arguments as you like
@rohankarra6191
@rohankarra6191 6 жыл бұрын
Im a better snake than u
29 - Functions ( pass; global ) | Python Tutorials
7:28
SimplyCoded
Рет қаралды 1 М.
Run Python Scripts With Command Line Arguments Using sys.argv (With Examples)
23:33
Fabio Musanni - Programming Channel
Рет қаралды 11 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Argparse Tutorial - Python  2023 (Creating Your First CLI)
18:59
Command Line Arguments in Python - How to Read Command Line Arguments in Python
7:04
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,8 МЛН
Argparse Basics - How I run my scripts via the Command Line
6:45
John Watson Rooney
Рет қаралды 83 М.
5 Python Libraries You Should Know in 2025!
22:30
Keith Galli
Рет қаралды 89 М.
Argument Parsing - Advanced Python Tutorial #4
15:51
NeuralNine
Рет қаралды 88 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 853 М.