<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[The Python Papers]]></title><description><![CDATA[Learning and Developing in Python]]></description><link>https://www.pythonpapers.com</link><image><url>https://substackcdn.com/image/fetch/$s_!hYhe!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e3c79a3-b014-495b-8ecb-094e0086d5f6_1280x1280.png</url><title>The Python Papers</title><link>https://www.pythonpapers.com</link></image><generator>Substack</generator><lastBuildDate>Tue, 28 Apr 2026 23:42:17 GMT</lastBuildDate><atom:link href="https://www.pythonpapers.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Mike Driscoll]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[pypapers@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[pypapers@substack.com]]></itunes:email><itunes:name><![CDATA[Mike Driscoll]]></itunes:name></itunes:owner><itunes:author><![CDATA[Mike Driscoll]]></itunes:author><googleplay:owner><![CDATA[pypapers@substack.com]]></googleplay:owner><googleplay:email><![CDATA[pypapers@substack.com]]></googleplay:email><googleplay:author><![CDATA[Mike Driscoll]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[wxPython - Creating a Simple Image Viewer]]></title><description><![CDATA[The first step in creating an application is to come up with an idea.]]></description><link>https://www.pythonpapers.com/p/wxpython-creating-a-simple-image</link><guid isPermaLink="false">https://www.pythonpapers.com/p/wxpython-creating-a-simple-image</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Wed, 22 Apr 2026 16:50:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!fiSB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The first step in creating an application is to come up with an idea. You could try to copy something simple like Microsoft Paint or Notepad. You will quickly find that they aren&#8217;t so easy to emulate as you would think, though! So instead, you will create a simple application that can load and display a photo.</p><p>When it comes to creating a GUI application, it is a good idea to think about what it will look like. If you enjoy working with pencil and paper, you could draw a sketch of what your application will look like. There are many software applications you can use to draw with or create simple mock-ups. To simulate a Sizer, you can draw a box.</p><p>Here is a mockup of what the finished application should look like:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fiSB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fiSB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png 424w, https://substackcdn.com/image/fetch/$s_!fiSB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png 848w, https://substackcdn.com/image/fetch/$s_!fiSB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png 1272w, https://substackcdn.com/image/fetch/$s_!fiSB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fiSB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png" width="450" height="400" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:400,&quot;width&quot;:450,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:10372,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/195055230?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fiSB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png 424w, https://substackcdn.com/image/fetch/$s_!fiSB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png 848w, https://substackcdn.com/image/fetch/$s_!fiSB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png 1272w, https://substackcdn.com/image/fetch/$s_!fiSB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cb3e90f-8911-45b4-bc87-2e40e328bf7e_450x400.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now you have a goal in mind. This allows you to think about how you might lay out the widgets. Go ahead and create a new file named <code>image_viewer.py</code> and add the following code to it:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YpTl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YpTl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png 424w, https://substackcdn.com/image/fetch/$s_!YpTl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png 848w, https://substackcdn.com/image/fetch/$s_!YpTl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png 1272w, https://substackcdn.com/image/fetch/$s_!YpTl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YpTl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png" width="1456" height="1649" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1649,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:273387,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/195055230?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YpTl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png 424w, https://substackcdn.com/image/fetch/$s_!YpTl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png 848w, https://substackcdn.com/image/fetch/$s_!YpTl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png 1272w, https://substackcdn.com/image/fetch/$s_!YpTl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c3d827e-44eb-432c-846a-0b49cf8a98c8_1542x1746.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Here you create a new class named <code>ImagePanel()</code> that will hold all your widgets. Inside it, you have a <code>wx.Image</code>, which you will use to hold the photo in memory in an object that wxPython can work with. To display that photo to the user, you use <code>wx.StaticBitmap</code>. The other widget you need is the familiar <code>wx.Button</code>, which you will use to browse to the photo to load.</p><p>The rest of the code lays out the widgets using a vertically oriented <code>wx.BoxSizer</code>. You use the sizer&#8217;s <code>Fit()</code> method to try to make the frame &#8220;fit&#8221; the widgets. What that means is that you want the application to not have a lot of white space around the widgets.</p><p>When you run this code, you will end up with the following user interface:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rvyt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rvyt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png 424w, https://substackcdn.com/image/fetch/$s_!rvyt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png 848w, https://substackcdn.com/image/fetch/$s_!rvyt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png 1272w, https://substackcdn.com/image/fetch/$s_!rvyt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rvyt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png" width="536" height="604" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:604,&quot;width&quot;:536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:21985,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/195055230?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rvyt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png 424w, https://substackcdn.com/image/fetch/$s_!rvyt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png 848w, https://substackcdn.com/image/fetch/$s_!rvyt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png 1272w, https://substackcdn.com/image/fetch/$s_!rvyt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F615e4348-0a27-49f9-85ab-ce1f8737b071_536x604.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>That looks almost right. It looks like you forgot to add the text entry widget to the right of the browse button, but that&#8217;s okay. The objective was to try and get a close approximation to what the application would look like in the end, and this looks pretty good. Of course, none of the widgets actually do anything yet.</p><p>Your next step is to update the code so it works. Copy the code from the previous example and make a new file named <code>image_viewer_working.py</code>. There will be significant updates to the code, which you will learn about soon. But first, here is the full change in its entirety:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zifz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zifz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png 424w, https://substackcdn.com/image/fetch/$s_!zifz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png 848w, https://substackcdn.com/image/fetch/$s_!zifz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png 1272w, https://substackcdn.com/image/fetch/$s_!zifz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zifz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png" width="1456" height="3377" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3377,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:645819,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/195055230?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zifz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png 424w, https://substackcdn.com/image/fetch/$s_!zifz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png 848w, https://substackcdn.com/image/fetch/$s_!zifz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png 1272w, https://substackcdn.com/image/fetch/$s_!zifz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f4be926-c2d5-47d1-b265-09a4103b11d0_1542x3576.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This change is pretty long. To make things easier, you will go over each change in its own little chunk. The changes all occurred in the <code>ImagePanel</code> class, so you will go over the changes in each of the methods in turn, starting with the constructor below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!URPb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!URPb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png 424w, https://substackcdn.com/image/fetch/$s_!URPb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png 848w, https://substackcdn.com/image/fetch/$s_!URPb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png 1272w, https://substackcdn.com/image/fetch/$s_!URPb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!URPb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png" width="1456" height="1288" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1288,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:243428,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/195055230?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!URPb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png 424w, https://substackcdn.com/image/fetch/$s_!URPb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png 848w, https://substackcdn.com/image/fetch/$s_!URPb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png 1272w, https://substackcdn.com/image/fetch/$s_!URPb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69b9837b-39b2-4248-9ed1-23fd12f8ab66_1542x1364.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>There are a few minor changes here. The first one is that you added a <code>max_size</code> for the image. Then you hooked up an event to the the browse button. This button will now call <code>on_browse()</code> when it is clicked.</p><p>The next change is that you added a new widget, a <code>wx.TextCtrl</code> to be precise. You stored a reference to that widget in <code>self.photo_txt</code>, which will allow you to extract the path to the photo later.</p><p>The final change is that you now have two sizers. One is horizontal and the other remains vertical. The horizontal sizer is for holding the browse button and your new text control widgets. This allows your to place them next to each other, left-to-right. Then you add the horizontal sizer itself to the vertical <code>main_sizer</code>.</p><p>Now let&#8217;s see how <code>on_browse()</code> works:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0xu2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0xu2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png 424w, https://substackcdn.com/image/fetch/$s_!0xu2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png 848w, https://substackcdn.com/image/fetch/$s_!0xu2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png 1272w, https://substackcdn.com/image/fetch/$s_!0xu2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0xu2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png" width="1456" height="804" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:804,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:134786,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/195055230?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0xu2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png 424w, https://substackcdn.com/image/fetch/$s_!0xu2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png 848w, https://substackcdn.com/image/fetch/$s_!0xu2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png 1272w, https://substackcdn.com/image/fetch/$s_!0xu2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F17ff8e47-e454-46d0-9c3f-2fbdcc251568_1542x852.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Here you create a <code>wildcard</code> which is used by the <code>wx.FileDialog</code> to filter out all the other files types except the JPEG format. Next, you create the <code>wx.FileDialog</code>. When you do that, you set its parent to <code>None</code> and give it a simple title. You also set the <code>wildcard</code> and the <code>style</code>. <code>style</code> is an open file dialog instead of a save file dialog.</p><p>Then you show your dialog modally. This means the dialog will appear over your main application and prevent you from interacting with it until you have accepted or dismissed the file dialog. If the user presses the OK button, then you will use <code>GetPath()</code> to get the path of the selected file and set the text control to that path. This effectively saves off the photo&#8217;s path so you can use it later.</p><p>Lastly, you call <code>load_image()</code> which will load the image into wxPython and attempt to show it. You can find out how by reading the following code:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kf1u!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kf1u!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png 424w, https://substackcdn.com/image/fetch/$s_!kf1u!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png 848w, https://substackcdn.com/image/fetch/$s_!kf1u!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png 1272w, https://substackcdn.com/image/fetch/$s_!kf1u!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kf1u!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png" width="1456" height="1127" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1127,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:176930,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/195055230?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kf1u!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png 424w, https://substackcdn.com/image/fetch/$s_!kf1u!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png 848w, https://substackcdn.com/image/fetch/$s_!kf1u!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png 1272w, https://substackcdn.com/image/fetch/$s_!kf1u!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71f2fcd2-aaf3-42d0-acb9-55be92a008af_1542x1194.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The first step in this method is to extract the <code>filepath</code> from the text control widget. Then you pass that path along to a new instance of <code>wx.Image</code>. This will load the image into wxPython for you. Next, you get the width and height from the <code>wx.Image</code> object and use the <code>max_size</code> value to resize the image while maintaining its aspect ratio. You do this for two reasons. The first is because if you don&#8217;t, the image will get stretched out or warped. The second is that most images at full resolution won&#8217;t fit on-screen, so they need to be resized.</p><p>Once you have the new width and height, you <code>Scale()</code> the image down appropriately. Then you call your <code>wx.StaticBitmap</code> control&#8217;s <code>SetBitmap()</code> method to update it to the new image that you loaded. Finally, you call <code>Refresh()</code>, which will force the bitmap widget to redraw with the new image in it.</p><p>Here it is with a butterfly photo loaded in it:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4BgP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4BgP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png 424w, https://substackcdn.com/image/fetch/$s_!4BgP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png 848w, https://substackcdn.com/image/fetch/$s_!4BgP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png 1272w, https://substackcdn.com/image/fetch/$s_!4BgP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4BgP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png" width="636" height="636" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:636,&quot;width&quot;:636,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:287037,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/195055230?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4BgP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png 424w, https://substackcdn.com/image/fetch/$s_!4BgP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png 848w, https://substackcdn.com/image/fetch/$s_!4BgP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png 1272w, https://substackcdn.com/image/fetch/$s_!4BgP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48abc893-8bd5-4b0d-b263-82087e08a0b1_636x636.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now you have a fully-functional application that can load JPEG photos. You can update the application to load other image types if you&#8217;d like. The wxPython toolkit uses Pillow, so it will load the same types of image file types that Pillow itself can load.</p><h2><strong>Wrapping Up</strong></h2><p>The wxPython toolkit is extremely versatile. It comes with many, many widgets built-in and also includes a wonderful demo package. The demo package will help you learn how to use the widgets in your own code. You are only limited by your imagination.</p><p>Play around with the code in this tutorial and then take a look at the demo package when you get a chance. Then start creating your own neat applications!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.pythonpapers.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">The Python Papers is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Python 101 - How to Create an "exe" for Mac]]></title><description><![CDATA[Each operating system has its own method of installing or running an application.]]></description><link>https://www.pythonpapers.com/p/python-101-how-to-create-an-exe-for</link><guid isPermaLink="false">https://www.pythonpapers.com/p/python-101-how-to-create-an-exe-for</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Tue, 14 Apr 2026 13:31:13 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!BImZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Each operating system has its own method of installing or running an application. On Windows, you run an executable most of the time. Executables have an extension of <code>.exe</code>. Apple&#8217;s Mac software has the concept of applications that use the extension <code>.app</code>. These are technically a bundle of files including a runnable binary. They are kind of like a runnable zip-file. All you need to do is double-click the <code>.app</code> file to run it.</p><p>If you want to distribute a Python application on Mac OSX, you have three options:</p><ul><li><p>PyInstaller - <a href="https://www.pyinstaller.org/">https://www.pyinstaller.org/</a></p></li><li><p>Briefcase - <a href="https://beeware.org/project/projects/tools/briefcase/">https://beeware.org/project/projects/tools/briefcase/</a></p></li><li><p>py2app - <a href="https://py2app.readthedocs.io/en/latest/">https://py2app.readthedocs.io/en/latest/</a></p></li></ul><p>You learned about the PyInstaller package in <strong>chapter 44</strong>. In this chapter you will learn how to use PyInstaller to create an <code>.app</code> bundle.</p><p>In this tutorial, you will cover the following two topics:</p><ul><li><p>Installing PyInstaller</p></li><li><p>Creating an Executable with PyInstaller</p></li></ul><p>Being able to create <code>.app</code> bundles gives to a way to distribute your application to Mac users. Let&#8217;s find out how to install the Python packages that you need so you can get started!</p><h2><strong>Installing PyInstaller</strong></h2><p>Both PyInstaller and Briefcase can be installed using <code>pip</code>. Here is how you would install PyInstaller:</p><pre><code><code>python -m pip install pyinstaller
</code></code></pre><p>This is a pretty quick installation because PyInstaller has a few dependencies. Once PyInstaller is installed, you can move on to the next section and create an executable for Mac OSX.</p><h2><strong>Creating an Executable with PyInstaller</strong></h2><p>Creating an executable requires code. You can use a simple wxPython application for this tutorial. Here is the <code>image_viewer</code> program code that you can use to open and display images:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BImZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BImZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png 424w, https://substackcdn.com/image/fetch/$s_!BImZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png 848w, https://substackcdn.com/image/fetch/$s_!BImZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png 1272w, https://substackcdn.com/image/fetch/$s_!BImZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BImZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png" width="1456" height="3471" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3471,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:646578,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/194185964?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!BImZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png 424w, https://substackcdn.com/image/fetch/$s_!BImZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png 848w, https://substackcdn.com/image/fetch/$s_!BImZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png 1272w, https://substackcdn.com/image/fetch/$s_!BImZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac75576-2e03-4f46-851b-e7919789a1d0_1536x3662.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You can use the same commands for PyInstaller that you use on Windows to create a Mac application bundle. Open up a console window on your Mac and navigate to the folder that contains <code>image_viewer.py</code>. Then run the following command:</p><pre><code><code>pyinstaller image_viewer.py --windowed
</code></code></pre><p>Running this command will give you this output, which is quite similar to the output you would see on Windows:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_EBe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_EBe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png 424w, https://substackcdn.com/image/fetch/$s_!_EBe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png 848w, https://substackcdn.com/image/fetch/$s_!_EBe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png 1272w, https://substackcdn.com/image/fetch/$s_!_EBe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_EBe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png" width="1456" height="748" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:748,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:248756,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/194185964?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_EBe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png 424w, https://substackcdn.com/image/fetch/$s_!_EBe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png 848w, https://substackcdn.com/image/fetch/$s_!_EBe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png 1272w, https://substackcdn.com/image/fetch/$s_!_EBe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbccd36d0-5bd3-418c-85b0-87e0ca9f07d7_1908x980.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Of course, when you run PyInstaller on a Mac, you will see that the platform information reflects that. When this finishes, you will have a <code>dist</code> folder that contains your app bundle. There does seem to be a bug in Python 3.7 and 3.8 that occurs when you try to launch the app bundle:</p><pre><code>FileNotFoundError: Tcl data directory</code></pre><p>To fix this issue, you will need to run the following commands in your console:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rDA5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70289113-7717-4678-a546-0ffd93e5672c_1316x428.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rDA5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70289113-7717-4678-a546-0ffd93e5672c_1316x428.png 424w, https://substackcdn.com/image/fetch/$s_!rDA5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70289113-7717-4678-a546-0ffd93e5672c_1316x428.png 848w, https://substackcdn.com/image/fetch/$s_!rDA5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70289113-7717-4678-a546-0ffd93e5672c_1316x428.png 1272w, https://substackcdn.com/image/fetch/$s_!rDA5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70289113-7717-4678-a546-0ffd93e5672c_1316x428.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rDA5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70289113-7717-4678-a546-0ffd93e5672c_1316x428.png" width="1316" height="428" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70289113-7717-4678-a546-0ffd93e5672c_1316x428.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:428,&quot;width&quot;:1316,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:33517,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/194185964?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70289113-7717-4678-a546-0ffd93e5672c_1316x428.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rDA5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70289113-7717-4678-a546-0ffd93e5672c_1316x428.png 424w, https://substackcdn.com/image/fetch/$s_!rDA5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70289113-7717-4678-a546-0ffd93e5672c_1316x428.png 848w, https://substackcdn.com/image/fetch/$s_!rDA5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70289113-7717-4678-a546-0ffd93e5672c_1316x428.png 1272w, https://substackcdn.com/image/fetch/$s_!rDA5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70289113-7717-4678-a546-0ffd93e5672c_1316x428.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now, when you go to run the application bundle, it will launch your wxPython GUI correctly. Because of this issue, if you use the <code>--onefile</code> option, you won&#8217;t be able to add those two folders. So the <code>--onefile</code> option won&#8217;t actually launch. Instead, you will see it attempt to launch and immediately crash. Hopefully, PyInstaller or a newer version of Python will resolve this issue.</p><h2><strong>Wrapping Up</strong></h2><p>Creating executables on macOS is a bit more complicated than on Windows. You also have fewer options for creating application bundles. Windows offers many Python packages to choose from for creating binaries. Mac has PyInstaller and Beeware&#8217;s Briefcase. The latter is designed to work with other Beeware products, but can be used with regular Python too.</p><p>Go ahead and give them both a try to see what works best for you. PyInstaller is a much more mature option, but sometimes it&#8217;s nice to try newer packaging applications.</p><h2>Get the Book</h2><p>Did you enjoy this article? Well, it&#8217;s from my book, <strong>Python 101 - 2nd Edition</strong>. Check it out at any of the following websites:</p><ul><li><p><a href="https://driscollis.gumroad.com/l/pypy101">Gumroad</a> </p></li><li><p><a href="https://leanpub.com/py101">Leanpub</a> </p></li><li><p><a href="https://amzn.to/3SyQTGx">Amazon</a></p></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.pythonpapers.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">The Python Papers is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Textual - An Intro to DOM Queries (Part II)]]></title><description><![CDATA[Last week, you learned the basics of Textual&#8217;s DOM queries.]]></description><link>https://www.pythonpapers.com/p/textual-an-intro-to-dom-queries-part-a6d</link><guid isPermaLink="false">https://www.pythonpapers.com/p/textual-an-intro-to-dom-queries-part-a6d</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Wed, 08 Apr 2026 17:06:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!JVnb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa490a257-e998-4581-9f20-9c0763d1fb36_1446x1340.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Last week, you learned the basics of Textual&#8217;s DOM queries. If you missed it, you can <a href="https://www.pythonpapers.com/p/textual-an-intro-to-dom-queries-part">read the article</a> now!</p><p>In this tutorial you will be learning about the following topics:</p><ul><li><p>The DOMQuery object</p></li><li><p>Getting the first or last widget</p></li><li><p>Query filters</p></li><li><p>Query exclusions</p></li><li><p>Other query methods</p></li></ul><p>Let&#8217;s get started!</p><h2><strong>The DOMQuery Object</strong></h2><p>The <code>DOMQuery</code> object gets returned whenever you &#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/textual-an-intro-to-dom-queries-part-a6d">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Textual - An Intro to DOM Queries (Part I)]]></title><description><![CDATA[In this article, you will learn how to query the DOM in Textual.]]></description><link>https://www.pythonpapers.com/p/textual-an-intro-to-dom-queries-part</link><guid isPermaLink="false">https://www.pythonpapers.com/p/textual-an-intro-to-dom-queries-part</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Tue, 31 Mar 2026 17:54:55 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!V0VY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6c8fa373-1808-4e27-983c-76dafa14fb36_1550x1266.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In this article, you will learn how to query the DOM in Textual. You will discover that the DOM keeps track of all the widgets in your application. By running queries against the DOM, you can find widgets quickly and update them, too.</p><p>You will be learning the following topics related to the DOM:</p><ul><li><p>The query one method</p></li><li><p>Textual queries</p></li></ul><p>You will learn more in th&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/textual-an-intro-to-dom-queries-part">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Python Pop Quiz - List Popping]]></title><description><![CDATA[The Python list data type is much like an array in other programming languages.]]></description><link>https://www.pythonpapers.com/p/python-pop-quiz-list-popping</link><guid isPermaLink="false">https://www.pythonpapers.com/p/python-pop-quiz-list-popping</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Thu, 26 Mar 2026 15:05:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!G3wZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb337ced-09c9-4b31-83e4-90fe1ebb1601_2550x3204.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The Python list data type is much like an array in other programming languages. The list includes many different methods. You can get a full listing of those methods like this:</p><pre><code>my_list = []
print(dir(my_list))</code></pre><p>One of those methods is called <code>pop()</code>. You can pass an index of the item you want to pop from the list (if you don&#8217;t, the last item is chosen). That&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/python-pop-quiz-list-popping">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Python Pop Quiz - Truthy or Falsey]]></title><description><![CDATA[Python supports Booleans in much the same way as other programming languages do.]]></description><link>https://www.pythonpapers.com/p/python-pop-quiz-truthy-or-falsey</link><guid isPermaLink="false">https://www.pythonpapers.com/p/python-pop-quiz-truthy-or-falsey</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Wed, 18 Mar 2026 13:40:58 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!uShb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ec0460c-a373-48af-8265-a668470c7160_1260x670.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Python supports Booleans in much the same way as other programming languages do. In Python&#8217;s case, it uses the <code>True</code> and <code>False</code> keywords. But there is also the concept of truthy and falsey. An example of a truthy value in Python is a number greater than zero (also a number less than zero), and an example of a falsey value would be an empty string. When us&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/python-pop-quiz-truthy-or-falsey">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Textual - Creating a Custom Checkbox]]></title><description><![CDATA[Textual is a great Python user interface package.]]></description><link>https://www.pythonpapers.com/p/textual-creating-a-custom-checkbox</link><guid isPermaLink="false">https://www.pythonpapers.com/p/textual-creating-a-custom-checkbox</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Wed, 11 Mar 2026 18:04:42 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ugD_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d4c7095-68f1-4b03-b22b-8ff158d4697e_1740x1066.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Textual is a great Python user interface package. Textual lets you create a GUI-like interface in your terminal.</p><p>You can use many different widgets in Textual. However, the widget you will be focusing on in this tutorial is the humble checkbox.</p><p>Checkboxes are used for Boolean choices. They return a True if checked and a False if unchecked. You can use a c&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/textual-creating-a-custom-checkbox">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Python Pop Quiz - Positional Arguments]]></title><description><![CDATA[Python functions can take in several different types of arguments.]]></description><link>https://www.pythonpapers.com/p/python-pop-quiz-positional-arguments</link><guid isPermaLink="false">https://www.pythonpapers.com/p/python-pop-quiz-positional-arguments</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Thu, 05 Mar 2026 13:37:38 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!9Gq-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb19e656-6139-4775-8791-115954bf9e6f_2260x1756.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Python functions can take in several different types of arguments. What are the different argument types called?</p><p>If you don&#8217;t know, you should review the following:</p><ul><li><p>Positional arguments</p></li><li><p>Keyword arguments</p></li></ul><p>This information may help you solve the quiz, or it may confuse you more. Read the next section when you&#8217;re ready to take a crack at it!</p><h2><strong>The Quiz</strong></h2><p>How do you &#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/python-pop-quiz-positional-arguments">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Python Pop Quiz - Type Addition]]></title><description><![CDATA[Python has multiple built-in functions you can use to introspect your code.]]></description><link>https://www.pythonpapers.com/p/python-pop-quiz-type-addition</link><guid isPermaLink="false">https://www.pythonpapers.com/p/python-pop-quiz-type-addition</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Wed, 25 Feb 2026 13:43:24 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!txoC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F798f0eee-fd0f-4a50-8bb6-8b0caea2a350_2464x2260.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Python has multiple built-in functions you can use to introspect your code. You&#8217;ll learn more about those functions in a later quiz.</p><p>For this quiz, you&#8217;ll focus on <code>isinstance()</code>, a function you can use to check if a variable is a particular type. For example, you might want to check if a variable is a string or an integer.</p><p>Good luck!</p><h2><strong>The Quiz</strong></h2><p>What will be th&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/python-pop-quiz-type-addition">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Python Pop Quiz - Letter Explosion]]></title><description><![CDATA[You learned about exploding a range object in the last quiz.]]></description><link>https://www.pythonpapers.com/p/python-pop-quiz-letter-explosion</link><guid isPermaLink="false">https://www.pythonpapers.com/p/python-pop-quiz-letter-explosion</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Tue, 17 Feb 2026 15:17:53 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lQbZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3994bbeb-77d2-47cf-bf04-d1a81a30bf61_2056x1416.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You learned about exploding a <code>range</code> object in the last quiz. For this quiz, you will extend that knowledge and discover what happens when you explode a string.</p><p>But wait! There&#8217;s more here than meets the eye. What is up with the numbers in the squiggly brackets?</p><p>If you&#8217;re familiar with string methods, you can figure this quiz out pretty quickly!</p><h2><strong>The Quiz</strong></h2><p>Wha&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/python-pop-quiz-letter-explosion">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Python Basic Type Hinting]]></title><description><![CDATA[When Python first added type hinting to the language in version 3.5, you could only add type hints to functions.]]></description><link>https://www.pythonpapers.com/p/python-basic-type-hinting</link><guid isPermaLink="false">https://www.pythonpapers.com/p/python-basic-type-hinting</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Tue, 10 Feb 2026 17:13:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hYhe!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e3c79a3-b014-495b-8ecb-094e0086d5f6_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When Python first added type hinting to the language in version 3.5, you could only add type hints to functions. However, in Python 3.6, the language added the ability to annotate variables as well. Over the following years, Python has steadily added more features to its type hinting capabilities and slowly refined the typing interface.</p><p>You will be study&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/python-basic-type-hinting">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Python Pop Quiz - Number Explosion]]></title><description><![CDATA[You will sometimes come across examples of code that use one or two asterisks.]]></description><link>https://www.pythonpapers.com/p/python-pop-quiz-number-explosion</link><guid isPermaLink="false">https://www.pythonpapers.com/p/python-pop-quiz-number-explosion</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Fri, 06 Feb 2026 00:43:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!RYhS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You will sometimes come across examples of code that use one or two asterisks. Depending on how the asterisks are used, they can mean different things to Python.</p><p>Check your understanding of what a single asterisk means in the following quiz!</p><h2><strong>The Quiz</strong></h2><p>What will be the output if you run this code?</p><p>A) <code>{range}</code> </p><p>B) <code>(range)</code> </p><p>C) <code>[0, 1, 2]</code> </p><p>D) <code>(0, 1, 2)</code> </p><p>E) <code>{0, 1, 2}</code></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RYhS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RYhS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png 424w, https://substackcdn.com/image/fetch/$s_!RYhS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png 848w, https://substackcdn.com/image/fetch/$s_!RYhS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png 1272w, https://substackcdn.com/image/fetch/$s_!RYhS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RYhS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png" width="1456" height="1253" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/caa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1253,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:750347,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/187025709?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RYhS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png 424w, https://substackcdn.com/image/fetch/$s_!RYhS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png 848w, https://substackcdn.com/image/fetch/$s_!RYhS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png 1272w, https://substackcdn.com/image/fetch/$s_!RYhS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcaa7db67-52b7-4510-9804-af6c2c3027e8_1840x1584.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>St&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/python-pop-quiz-number-explosion">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Python Typing Book Kickstarter]]></title><description><![CDATA[Python has had type hinting support since Python 3.5, over TEN years ago!]]></description><link>https://www.pythonpapers.com/p/python-typing-book-kickstarter</link><guid isPermaLink="false">https://www.pythonpapers.com/p/python-typing-book-kickstarter</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Tue, 03 Feb 2026 15:25:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!RP_P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36123bf0-9b1b-4da0-a31b-2c4f784c38fe_1800x2700.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Python has had type hinting support since Python 3.5, over TEN years ago! However, Python&#8217;s type annotations have changed repeatedly over the years. In <strong>Python Typing: Type Checking for Python Programmers</strong>, you will learn all you need to know to add type hints to your Python applications effectively.</p><p>You will also learn how to use Python type checkers, con&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/python-typing-book-kickstarter">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Vibe Coding Pong with Python and pygame]]></title><description><![CDATA[Pong is one of the first computer games ever created, way back in 1972.]]></description><link>https://www.pythonpapers.com/p/vibe-coding-pong-with-python-and</link><guid isPermaLink="false">https://www.pythonpapers.com/p/vibe-coding-pong-with-python-and</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Wed, 28 Jan 2026 13:48:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Z3i4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65c11682-5894-4fb4-b8bf-16abd60896c9_1608x1264.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Pong is one of the first computer games ever created, way back in 1972. If you have never heard of Pong, you can think of it as a kind of &#8220;tennis&#8221; game. There are two paddles, on each side of the screen. They move up and down. The goal is to bounce a ball between the two paddles. If you miss the ball, your opponent scores a point.</p><p>Atari created Pong and &#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/vibe-coding-pong-with-python-and">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Python 101 - Introspection]]></title><description><![CDATA[One of the reasons Python is special is that it provides lots of tools that allow you to learn about Python itself.]]></description><link>https://www.pythonpapers.com/p/python-101-introspection</link><guid isPermaLink="false">https://www.pythonpapers.com/p/python-101-introspection</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Thu, 22 Jan 2026 13:36:03 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!3Pm9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f5954f-dad5-4a8d-9c19-a97da9bf9b0b_1262x428.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>One of the reasons Python is special is that it provides lots of tools that allow you to learn about Python itself. When you learn about yourself, it is called <strong>introspection</strong>. There is a similar type of introspection that can happen with programming languages.</p><p>Python provides several built-in functions that you can use to learn about the code that you are&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/python-101-introspection">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[New Book: Vibe Coding Video Games with Python]]></title><description><![CDATA[My latest book, Vibe Coding Video Games with Python, is now available as an eBook.]]></description><link>https://www.pythonpapers.com/p/new-book-vibe-coding-video-games</link><guid isPermaLink="false">https://www.pythonpapers.com/p/new-book-vibe-coding-video-games</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Thu, 15 Jan 2026 12:46:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!qb0g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>My latest book, <strong>Vibe Coding Video Games with Python,</strong> is now available as an eBook. The paperback will be coming soon, hopefully by mid-February at the latest. The book is around 183 pages in length and is 6x9&#8221; in size.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qb0g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qb0g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qb0g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qb0g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qb0g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qb0g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg" width="1410" height="2250" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2250,&quot;width&quot;:1410,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:309108,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/184544107?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qb0g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qb0g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qb0g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qb0g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2aecb37a-4a8f-4e03-94c8-552d409d3c23_1410x2250.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Vibe Coding Video Games with Python</figcaption></figure></div><p>In this book, you will learn how to use artificial intelligence to create mini-games. You will attempt&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/new-book-vibe-coding-video-games">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Textual - How to Log to Both the Console and a File]]></title><description><![CDATA[Textual is a wonderful Python package that allows you to create a text-based user interface (TUI) in your terminal.]]></description><link>https://www.pythonpapers.com/p/textual-how-to-log-to-both-the-console</link><guid isPermaLink="false">https://www.pythonpapers.com/p/textual-how-to-log-to-both-the-console</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Tue, 13 Jan 2026 14:41:39 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!VxC4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1a98969-6268-4c81-b810-cc3db97ff22b_1276x384.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Textual is a wonderful Python package that allows you to create a text-based user interface (TUI) in your terminal. You may have read about Textual several times in this newsletter.</p><p>When you are debugging Textual applications, you can log or print to something called the <a href="https://textual.textualize.io/guide/devtools/#console">Textual console</a>. You run this console in a separate terminal and then run your Textu&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/textual-how-to-log-to-both-the-console">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How to Type Hint a Decorator in Python]]></title><description><![CDATA[Decorators are a concept that can trip up new Python users.]]></description><link>https://www.pythonpapers.com/p/how-to-type-hint-a-decorator-in-python</link><guid isPermaLink="false">https://www.pythonpapers.com/p/how-to-type-hint-a-decorator-in-python</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Tue, 06 Jan 2026 19:25:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!wpLH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19284c86-af54-4408-a0c0-0c96304b7649_1596x1236.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Decorators are a concept that can trip up new Python users. You may find this definition helpful: A decorator is a function that takes in another function and adds new functionality to it without modifying the original function.</p><p>Functions can be used just like any other data type in Python. A function can be passed to a function or returned from a functi&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/how-to-type-hint-a-decorator-in-python">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How to Switch to ty from Mypy]]></title><description><![CDATA[Python has supported type hinting for quite a few versions now, starting way back in 3.5.]]></description><link>https://www.pythonpapers.com/p/how-to-switch-to-ty-from-mypy</link><guid isPermaLink="false">https://www.pythonpapers.com/p/how-to-switch-to-ty-from-mypy</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Tue, 30 Dec 2025 14:48:34 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hYhe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e3c79a3-b014-495b-8ecb-094e0086d5f6_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Python has supported type hinting for quite a few versions now, starting way back in 3.5. However, Python itself does not enforce type checking. Instead, you need to use an external tool or IDE. The first and arguably most popular is <a href="https://mypy.readthedocs.io/en/stable/index.html">mypy</a>. </p><p>Microsoft also has a Python type checker that you can use in VS Code called&nbsp;<a href="https://github.com/microsoft/pyright">Pyright,</a>&nbsp;and then there&#8217;s the lesser-kn&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/how-to-switch-to-ty-from-mypy">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Product Review: Python Flash Cards]]></title><description><![CDATA[No Starch Press is best known for creating books on computer programming.]]></description><link>https://www.pythonpapers.com/p/product-review-python-flash-cards</link><guid isPermaLink="false">https://www.pythonpapers.com/p/product-review-python-flash-cards</guid><dc:creator><![CDATA[Mike Driscoll]]></dc:creator><pubDate>Tue, 23 Dec 2025 14:10:23 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ksdI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>No Starch Press is best known for creating books on computer programming. However, they recently released a new product called <a href="https://nostarch.com/pythonflashcards">Python Flash Cards</a> by Eric Matthes, the author of <a href="https://amzn.to/2WyQcPm">Python Crash Course</a>. I thought this was a unique product and decided to ask for a review copy.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ksdI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ksdI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ksdI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ksdI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ksdI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ksdI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg" width="768" height="576" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:576,&quot;width&quot;:768,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:102580,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.pythonpapers.com/i/182418499?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ksdI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ksdI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ksdI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ksdI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b2bbf0a-4831-4f00-8f51-9f92c242e07e_768x576.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The cards and their box are high-quality. I like the cardstock they used quite a bit&#8230;</p>
      <p>
          <a href="https://www.pythonpapers.com/p/product-review-python-flash-cards">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>