Today we learn how to work with config files in Python. Writing, reading and parsing them.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine.com/books/
💻 The Algorithm Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/NeuralNine
🎙 Discord: / discord
🎵 Outro Music From: www.bensound.com/
Love how frequent you post videos, and how they are practical every time. You have quickly became one of my number one resources when getting stuck on projects at home.
This was a great into into Config files and reinforced with a great example. Thanks!
Thanks man got me through the hardest part of my Rainmeter OS customization.
Ha, bro, literally this is what I got assigned to work on today at work and have never done this before. What amazing timing lol.
I noticed at 10:06, you copied the line of code where the cursor was at with a keyboard shortcut. I can't seem to find how to do the shortcut, if anybody could tell me what that shortcut is, it would be much appreciated!
Feels good to learn something new!
How do you then modify add delete more user with the main program any example?
Nice! Previously used config parser on my motion detection project to hide my username and password. But this expands further on it’s uses. Thanks!
I believe it would be safer to use a .env file (dotenv) for storing sensitive information like passwords, etc
Are you psychic ? I literally started learning about config files and it seemed like you have made this video knowing it. Thank you very much.
Hacker h vo
I've learnt so much Python from you, thank you!
Pls search itz shorts time
@@alien_X1 oO
Quick question brother how can i convert silverbullet config .svb to .py is there a repo in github that convert .svb or .loli to .py thanks alot
Lol, I never known there's a library for configs, i was parsing them manually in every single project i have, this saves alot of time
i have a config file and declared with some variables in it. I would like to use some variables as a parameter in User defined function. For example : f1(config.VAL_PATH,config.DATASET_NAME) . But when i used like this i am getting Attribute Error. Eventhough config.py is available in same working directory. Pls help me to do in colab.
Very cool :) Was thinking this might include Cisco network device configs - but still handy! Thanks for making the font large enough for me to watch on my phone on the way to work
Very nice thanks !
Really helpful
Can you continue with the C tutorials, they were really interesting.
Nice one!
Muito top. Obrigado
Plz provide intro music link
Thanks a lot 🎉🎉🎉🎉🎉
that was useful tnx
really good
When reading from a config file, is it possible to validate the data? For example, I might expect a certain value to be between 1000 and 2000. If it’s not, I want to raise an exception.
Yes it is possible. You can create your own exception from base exception and throw it out. With exit(0)
I usually prefer json instead of conf files.
cooooooooooool
Teach me cython decompilation python file.
Doesn't even support lists bro Don't make the same mistake i did and just use a different library or JSON
Completely lost you after the 5mins. Could you just initially do a SIMPLE write read so we can get the jist of what vars/arrays/bits/bytes/tuples/ or whatever can be got out of the file, and show goes where when why and how and then go on to write an RTOS, it really should be KISS Keep It Straight ^ Simple, I have created a data file and cannot get a string from it, python complains wrong format, so will give up and try another way for a 'simple' .ini to save so data. But many thks for you your attempt on this, at least I now know there are possibilities,.
I hate it so many people use library's AND THEY NEVER WORK AND JUST MAKE IT HARDER I HATE THIS.
Bro, trust me, if you can't do something with a library, doing it without one isn't going to be any less difficult. The reason people use libraries is because they make things easier. Much easier, in fact. Don't just rely on video tutorials, you'll actually learn more by reading the documentation. Look for configparser in the Python docs and read through the page carefully. If you're having trouble understanding that page then you haven't learned enough of the basics, so start reading the Python docs from the beginning. And be patient, learning programming takes time.
:)
2nd :)
config file and password in this video kzhead.info/sun/bNFqccmloYydYIU/bejne.html
tooo much talking, bro just show the concept