- 7,650 hits
- Follow FOSS -THE FUTURE IS HERE on WordPress.com
In python we raise exception to catch if anything goes wrong, but sometime with try block we have multiple lines of code and we are not able to track which line exactly throwing the exception. There is way to catch … Continue reading
Sometime during automation of a large deployment process, we have to bootstrap a node , create environment and add the node in that particular environment on the fly. Bootstraping : 2. Create environment dynamically from inside the programme:(python … Continue reading
Some time we have to read one existing json property file and update some values inplace. If we don’t use proper approach, the update may lead to breaking the json structure in the file. We have to hook the json … Continue reading
Sometimes we have to create tools that takes input as argument with certain options. We can create such tool with optparse module of python. Here is a small example of using this. For help, type: ( This will display all … Continue reading
Python has a built in module to send mail to recipient[s] as to,cc,bcc. Here assumption is that : the smtp is configured in localhost (where the script will run).