<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on Ghafoor's Personal Blog</title><link>http://ghafoorsblog.com/tags/python/</link><description>Recent content in Python on Ghafoor's Personal Blog</description><generator>Hugo</generator><language>en</language><managingEditor>noreply@example.com (AG Sayyed)</managingEditor><webMaster>noreply@example.com (AG Sayyed)</webMaster><copyright>Copyright © 2024-2026 AG Sayyed. All Rights Reserved.</copyright><lastBuildDate>Sat, 16 May 2026 17:42:12 +0100</lastBuildDate><atom:link href="http://ghafoorsblog.com/tags/python/index.xml" rel="self" type="application/rss+xml"/><item><title>Unhandled Errors</title><link>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/03-module/009-unhandled-errors/</link><pubDate>Thu, 13 Nov 2025 12:04:01 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/03-module/009-unhandled-errors/</guid><description>&lt;p class="lead text-primary"&gt;
This document explains how to handle unexpected errors and exceptions in high-level programming languages like Python, covering common error types, traceback analysis, debugging techniques including printf debugging and the logging module, and strategies for making programs resilient to failures.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;While high-level languages like Python, Java, and Ruby handle memory management automatically, programs written in these languages can still encounter unexpected conditions that cause failures. When code doesn&amp;rsquo;t properly handle these conditions, it triggers errors or exceptions, causing programs to terminate unexpectedly.&lt;/p&gt;</description></item><item><title>Dealing With Memory Leaks</title><link>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/05-module/005-dealing-with-memory-leaks/</link><pubDate>Tue, 11 Nov 2025 02:21:53 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/google/it-automation-content/it-automation-python-pcert/04-troubleshooting-debugging/05-module/005-dealing-with-memory-leaks/</guid><description>&lt;p class="lead text-primary"&gt;
This document provides hands-on investigation of memory leaks through practical examples, demonstrating how applications exhaust memory through excessive allocations. It walks through using monitoring tools like top to identify memory growth patterns, applying Python's memory_profiler to pinpoint problematic code lines, and resolving issues where programs unnecessarily retain full data structures instead of minimal references.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="understanding-memory-requests"&gt;Understanding Memory Requests&lt;/h2&gt;
&lt;h3 id="why-applications-request-memory"&gt;Why Applications Request Memory&lt;/h3&gt;
&lt;p&gt;There are many reasons why an application may request a lot of memory. Sometimes it&amp;rsquo;s what&amp;rsquo;s needed for the program to complete its task. Sometimes it&amp;rsquo;s caused by a part of the software misbehaving.&lt;/p&gt;</description></item><item><title>08-ibm-fssd-python-flask-kanban</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/08-ibm-fssd-python-flask-kanban/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/08-ibm-fssd-python-flask-kanban/</guid><description>&lt;h2 id="product-backlog"&gt;Product Backlog&lt;/h2&gt;
&lt;h3 id="epic-complete-python-flask-course"&gt;Epic: Complete Python Flask Course&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;due: 2025-09-01&lt;/li&gt;
&lt;li&gt;tags: [python, flask, fullstack]&lt;/li&gt;
&lt;li&gt;workload: Extreme&lt;/li&gt;
&lt;li&gt;defaultExpanded: true&lt;/li&gt;
&lt;li&gt;steps:
&lt;ul&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Review all course modules&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Identify key deliverables&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Set up development environment&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Plan project milestones&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Finalize documentation&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Module-1 completed&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Module-2 completed&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Module-3 completed&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-md" data-lang="md"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;Main Objectives:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Master Python and Flask for web development
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Complete all three modules
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Build and document a mini web app project
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;6&lt;/span&gt;&lt;span class="cl"&gt;Success Criteria:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; All modules completed
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Mini project delivered
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; All assignments submitted
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="sprint-backlog"&gt;Sprint Backlog&lt;/h2&gt;
&lt;h2 id="in-progress"&gt;In Progress&lt;/h2&gt;
&lt;h3 id="story-module-1---flask-basics-and-setup"&gt;Story: Module 1 - Flask Basics and Setup&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;due: 2025-08-01&lt;/li&gt;
&lt;li&gt;tags: [module-1, python, flask]&lt;/li&gt;
&lt;li&gt;priority: high&lt;/li&gt;
&lt;li&gt;workload: Normal&lt;/li&gt;
&lt;li&gt;steps:
&lt;ul&gt;
&lt;li&gt;&lt;input checked="" disabled="" type="checkbox"&gt; Watch module videos&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Complete readings&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Add visuals using mermaid and excalidraw&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Submit assignments&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Take module quiz&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Add your module MCQ, if applicable&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-md" data-lang="md"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;As a learner, I want to complete Module 1 so that I can set up Flask and understand its basics.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;Acceptance Criteria:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; All module tasks completed
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Quiz passed
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Assignments submitted
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="story-module-2---building-flask-apis"&gt;Story: Module 2 - Building Flask APIs&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;due: 2025-08-08&lt;/li&gt;
&lt;li&gt;tags: [module-2, python, flask]&lt;/li&gt;
&lt;li&gt;priority: high&lt;/li&gt;
&lt;li&gt;workload: Normal&lt;/li&gt;
&lt;li&gt;steps:
&lt;ul&gt;
&lt;li&gt;&lt;input checked="" disabled="" type="checkbox"&gt; Watch module videos&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Complete readings&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Add visuals using mermaid and excalidraw&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Submit assignments&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Take module quiz&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Add your module MCQ, if applicable&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-md" data-lang="md"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;As a learner, I want to complete Module 2 to build and test RESTful APIs with Flask.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;Acceptance Criteria:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; All module tasks completed
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Quiz passed
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Assignments submitted
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="story-module-3---flask-templates-and-deployment"&gt;Story: Module 3 - Flask Templates and Deployment&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;due: 2025-08-15&lt;/li&gt;
&lt;li&gt;tags: [module-3, python, flask]&lt;/li&gt;
&lt;li&gt;priority: high&lt;/li&gt;
&lt;li&gt;workload: Normal&lt;/li&gt;
&lt;li&gt;steps:
&lt;ul&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Watch module videos&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Complete readings&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Add visuals using mermaid and excalidraw&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Submit assignments&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Take module quiz&lt;/li&gt;
&lt;li&gt;&lt;input disabled="" type="checkbox"&gt; Add your module MCQ, if applicable&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-md" data-lang="md"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;As a learner, I want to complete Module 3 to use templates and deploy a Flask web app.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;Acceptance Criteria:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; All module tasks completed
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Quiz passed
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;-&lt;/span&gt; Assignments submitted
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="reviewqa"&gt;Review/QA&lt;/h2&gt;
&lt;h2 id="done"&gt;Done&lt;/h2&gt;</description></item></channel></rss>