I only had to watch 25 videos before I found yours. Now I understand how sys.argv. Thanks a million
@codingspace11436 жыл бұрын
Nice explanation really ...but how I can passed arguments between two python scripts in my network? Thanks
@faiqahmadkhan60094 жыл бұрын
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.
@SimplyCoded4 жыл бұрын
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.anderson53934 жыл бұрын
When would you use this?
@SimplyCoded4 жыл бұрын
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.anderson53934 жыл бұрын
@@SimplyCoded I did it before, just that I forgot the syntax I guess. After watching your video, it came back. Thanks for the video.
@sufiyanmomin4435 жыл бұрын
How to set default command line argument
@dimitriosdesmos46997 жыл бұрын
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. .....
@brandonlee7125 жыл бұрын
Why not just use input()
@TalsonHacks4 жыл бұрын
Brandon Lee cuz Input is limited, but argv can be used to add as many arguments as you like