Argument Parsing - Advanced Python Tutorial #4

preview_player
Показать описание
In this video we talk about argument parsing in Python.

◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚

💻 Exclusive Content 💻

🌐 Social Media & Contact 🌐

Рекомендации по теме
Комментарии
Автор

Very useful videos and examples. Very well explained specially from the perspective of a C/C++ programmer. Appreciate the time taken to create them. Please keep creating more and with updated content.

ThePlaneteer
Автор

great stuff!

maybe you could put your PIP in teh bottom left corner? that way we could see your full command line in the terminal.

ueliriegg
Автор

this is a really useful tutorial especially in ML applications like running a training script and passing the training data folder as a CLI argument, validation data, model type, etc...

WordsThroughTheSky
Автор

cool, this is only the second time I've written a script from one file to another but I feel way more comfortable going through the processes now!

Radical
Автор

for people wondering why @4:15, it didn't work, it's because the file wasn't saved, notice the "+" sign in []brackets. anyway just saying...

mj
Автор

Great content! Thank you for making these tutorials. Quick favor to ask, could you please move the camera to the left as sometimes it blocks the terminal? Thank you

Seriosso
Автор

def myfunction(*args, **kwargs):
print(args[0])
print(args[1])
print(args[2])
print(args[3])
print(kwargs['KEYONE'])
print(kwargs['KEYTWO'])
print(kwargs['KEYTHREE'])
myfunction("key", True, 19, '10', KEYONE='TEST', KEYTWO=7, KEYTHREE=[1, 23])

kvelez
Автор

Can you do arrow functions next? I only found out about them recently and they seem pretty interesting. I love these advanced tutorials, they teach A LOT.

techpro
Автор

didnt know that was possible, great content. Disclaimer though: the video was in front of the args u typed, but further it was great

hello-myot
Автор

Very helpful series of tutorials. Please keep them coming.

StephenEhrlichPhotos
Автор

Love to see it, great content bro, really enjoying it 👏🏾

Man-Vs-Car
Автор

Why not use argparse? Also I think argument parsing should be intermediate. Love the other videos so far though!

demonslayer
Автор

you could talk about argparse module too

bed
Автор

You look like a buffed version of Tim

Banana-pdqs
Автор

At 14:11 why not simply

opts_dict = dict(opts)
filename = opts_dict.get("-f", "default.txt")
message = opts_dict.get("-m", "default message")

?

MadOgre
Автор

Hello. Thank you for your videos. I'm learning a lot from them.

13:22 If you want that to work you can zip the key/value pairs if I'm not mistaken.

AzimAzizov
Автор

you are the best... i am not good at programming but I love your videos

madhav.s
Автор

What I like to use for the same reason is @click

michagonet
Автор

Great video. Might have to mess around making some command line code now.

erik-martin
Автор

Always useful content I really like your channel!

GodotEnjoyer