<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:dc="https://purl.org/dc/elements/1.1/"
     xmlns:dcterms="http://purl.org/dc/terms/"
     xmlns:media="http://search.yahoo.com/mrss/"
     xmlns:atom="http://www.w3.org/2005/Atom"
>
    <channel>
                    <atom:link href="https://www.tomshardware.com/feeds/tag/programming" rel="self" type="application/rss+xml" />
                            <title><![CDATA[ Latest from Tom's Hardware in Programming ]]></title>
                <link>https://www.tomshardware.com/software/programming</link>
        <description><![CDATA[ All the latest programming content from the Tom's Hardware team ]]></description>
                                    <lastBuildDate>Sun, 10 May 2026 14:17:28 +0000</lastBuildDate>
                            <language>en</language>
                                <item>
                                                            <title><![CDATA[ Former Epic director is building a European rival to the Unreal and Unity game engines — 'The Immense Engine' dev sees opportunity for AI agents to 'do the work of ten or fifteen people' ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/software/developer-tools/former-epic-director-is-building-a-european-rival-to-the-unreal-and-unity-game-engines-the-immense-engine-dev-sees-opportunity-for-ai-agents-to-do-the-work-of-ten-or-fifteen-people</link>
                                                                            <description>
                            <![CDATA[ A heavyweight games industry veteran says he is building a fully European alternative to popular games engines from American and Chinese companies. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">VKd4DykNVGZJCVpBpjhGy4</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/ZLhp6MeUTrs5K8hT67g5eC-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sun, 10 May 2026 14:17:28 +0000</pubDate>                                                                                                                                <updated>Sun, 10 May 2026 15:21:19 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Mark Tyson ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/56vqMYLDaKRHPhHZgbADFR.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Mark&#039;s enthusiasm for computers dampened at an early age by the rubber-keyed Sinclair Spectrum 48K and feelings of Commodore 64 envy. However, in the mid-80s, hope in a digital future was rekindled by the purchase of an Atari 520 STe. Since that time Mark has used a multitude of computers for fun and professional endeavors. He often owned both Macs and PCs but went cold on the former after OS9 was killed off, and warmed to the latter with the introduction of Windows XP.&lt;br&gt;
&lt;br&gt;
Early work years were spent in artwork and reprographics but in the late noughties, Mark started to blog about computers, Taiwanese food culture, and guitar design. This activity led to a full-time position writing about breaking PC tech news for HEXUS, for the best part of a decade. When HEXUS was abruptly closed, Mark helped with the foundation of Club386, before finding a new home at Tom&#039;s Hardware.&lt;br&gt;
&lt;br&gt;
When not wearing through the keycap legends on his PC keyboards, Mark can be found wandering the computer malls of Taiwan&#039;s neon-lit conurbations and enjoying local and international cuisine.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/ZLhp6MeUTrs5K8hT67g5eC-1280-80.jpg">
                                                            <media:credit><![CDATA[Getty Images]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[coding]]></media:description>                                                            <media:text><![CDATA[coding]]></media:text>
                                <media:title type="plain"><![CDATA[coding]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/ZLhp6MeUTrs5K8hT67g5eC-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>A heavyweight games industry veteran says he is building a fully European alternative to popular game engines from American and Chinese companies. Arjan Brussee shared the plans in an interview hosted by the <a href="https://www.bnr.nl/nieuws/tech-innovatie/10600523/guerrilla-oprichter-en-voormalig-epic-directeur-komt-met-volledig-europese-game-engine">De Technoloog</a> podcast (Dutch), reports the <a href="https://www.videogameschronicle.com/news/guerilla-games-co-founder-and-epic-veteran-building-a-european-alternative-to-unreal-engine/">Video Games Chronicle</a>. </p><p>Dutchman Brussee has some serious games industry credentials. His stint at <a href="https://www.tomshardware.com/news/sony-buys-minority-stake-in-epic-games">Epic Games</a> was split over two eras, the first one, which saw him programming the Jazz Jackrabbit games in the 90s. Then, from 2018 to 2023, Brussee returned to Epic as the global director of product management for Unreal Engine. Between those eras, Brussee became the co-founder of Guerrilla Games from 2003 (Killzone franchise), and Boss Key Productions from 2012.</p><h2 id="the-immense-engine-a-european-alternative">The Immense Engine, a European alternative</h2><p>Most readers will be familiar with game engines like <a href="https://www.tomshardware.com/video-games/pc-gaming/unreal-engine-5-7-brings-significant-improvements-over-the-notoriously-demanding-5-4-version-tester-claims-benchmark-shows-up-to-25-percent-gpu-performance-increase-35-percent-cpu-boost">Unreal </a>and <a href="https://www.tomshardware.com/news/unity-issues-apology-for-new-runtime-fee-policy-promises-changes">Unity </a>(the latter was founded in Denmark but relocated to San Francisco in 2009). Brussee reckons that a European game engine will rival these offerings and alternatives from the Chinese, but The Immense Engine will be “fully European-hosted, built by Europeans, and complies with European rules and guidelines.”</p><p>Having a Europe-first game engine could be a boon for 3D simulations in defense or logistics on the continent. If it is built to adhere to the aforementioned <a href="https://www.tomshardware.com/tech-industry/power-bricks-and-wall-warts-must-be-usb-c-by-2028-new-eu-legislation-also-adds-power-rating-labels-for-power-units-and-cables">European rules</a> and guidelines, this could broaden its adoption in big government and local government projects, too.</p><p>Work already is underway with The Immense Engine, and other than gaming, it is clearly being developed with practical representations of 3D worlds in mind. We recently reported on the Japanese local government using U.S. <a href="https://www.tomshardware.com/virtual-reality/japan-using-game-development-engines-for-urban-planning-and-disaster-management-kimono-sales-also-stretching-unity-and-unreal-engine-capabilities-beyond-the-small-screen">game engines for large civil engineering projects</a>, so Brussee is thinking along similar lines.</p><h2 id="there-has-to-be-an-ai-angle">There has to be an AI angle</h2><p><a href="https://www.tomshardware.com/tech-industry/artificial-intelligence/ai-coding-platform-goes-rogue-during-code-freeze-and-deletes-entire-company-database-replit-ceo-apologizes-after-ai-engine-says-it-made-a-catastrophic-error-in-judgment-and-destroyed-all-production-data">Software coding and AI </a>are inevitably going to be further intertwined going forward, and Brussee embraces rather than shuns this trend. In the podcast interview, he said he sees opportunities with the rise of AI, especially by making the most of fewer human resources. </p><p>“If you are smart and know how to put a good framework of <a href="https://www.tomshardware.com/tech-industry/cryptocurrency/ai-agents-can-be-manipulated-into-giving-away-your-crypto-according-to-princeton-researchers">AI agents </a>to work, you can do the work of ten or fifteen people,” noted the game industry veteran. Brussee strongly suggests the use of AI agents in developing the engine, but whether that means there will be AI tools built into The Immense Engine remains to be seen.</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Developer creates a basic first person shooter game using Gaussian splats, and you can play it for free in your browser ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/software/programming/developer-creates-a-basic-first-person-shooter-game-using-gaussian-splats-and-you-can-play-it-for-free-in-your-browser</link>
                                                                            <description>
                            <![CDATA[ It's not much of a game, but it's an impressive proof of concept for the novel technology. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">77FZxLxDFwqRBp7Tgee7NK</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/GHdzAuGKuZWM4xJkHxAf9U-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Mon, 27 Apr 2026 10:30:00 +0000</pubDate>                                                                                                                                                                                                                                <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Zak Killian ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/yonJziSpjzVFahKcUonJvi.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Zak Killian is a freelance contributor to Tom&#039;s Hardware who has also written for HotHardware and Tech Report. Ever since typing in games from magazines in ATARI BASIC on his family&#039;s Atari 800XL as a youth, Zak has been deeply fascinated with the capabilities of computers. His passion for gaming as a kid led to more technical engagement with PCs as a teenager, when he first built his own system: an AMD K6. Not long after, he founded his own PC repair shop in the year 2000. Now, decades later, he&#039;s still building and benchmarking new boxes, still gaming in every free hour, and still arguing on the internet with almost any opinion anyone has. Something of a modern-day Renaissance man, he may not be an expert on anything, but he knows just a little about nearly everything. &lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/GHdzAuGKuZWM4xJkHxAf9U-1280-80.jpg">
                                                            <media:credit><![CDATA[Future]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[A screenshot from the PlayCanvas FPS game made with gaussian splats showing impressive visual realism.]]></media:description>                                                            <media:text><![CDATA[A screenshot from the PlayCanvas FPS game made with gaussian splats showing impressive visual realism.]]></media:text>
                                <media:title type="plain"><![CDATA[A screenshot from the PlayCanvas FPS game made with gaussian splats showing impressive visual realism.]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/GHdzAuGKuZWM4xJkHxAf9U-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>It's true: London-based developer Iakov Sumygin has created a minimalistic playable video game using Gaussian splats for the environment data, and you can load it up and <a href="https://playcanv.as/p/qxGSuzYq/" target="_blank">try it right now in your browser</a>. There's not much to do, but we're a tech site, not a dedicated gaming site, and so, as you could imagine, the more interesting part of this story is the technology behind it rather than the extremely basic FPS gameplay.</p><p>To understand this post, you're going to have to understand what Gaussian splats are. If you're familiar with the concept of volume pixels, or "voxels," Gaussian splats can be thought of as "voxels of variable size and density." They're not really like voxels; they don't <a href="https://www.tomshardware.com/video-games/pc-gaming/planetary-minecraft-inspired-demo-uses-a-spherical-planet-game-has-the-same-blocky-mechanics-but-converts-flat-earth-surface-into-a-sphere">exist in a fixed grid,</a> and they aren't physicalized the same way voxels are. In essence, Gaussian splats are a data type that you can use for representing a 3D world with extremely high visual fidelity, legitimately photo-realistic quality, yet with a modest rendering cost. </p><p>Splat scenes, sometimes called "3DGS" scenes, are created quite simply by taking many photos or even videos of a real space and then performing a process called "Structure-from-Motion," which essentially interprets the video data as a 3D scene and creates the sparse point cloud. Then, scene optimization is performed (often using AI) to adjust each Gaussian's position, shape, opacity, and color to match the input images or video.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:3834px;"><p class="vanilla-image-block" style="padding-top:49.97%;"><img id="JhCVxkrej2ZAkL5WDT4Qug" name="playcanvas-engine-collision-mesh" alt="A screenshot of the PlayCanvas editor showing the 3D environment made by the splat-transform tool." src="https://cdn.mos.cms.futurecdn.net/JhCVxkrej2ZAkL5WDT4Qug.jpg" mos="" align="middle" fullscreen="1" width="3834" height="1916" attribution="" endorsement="" class="inline expandable"><a href='https://cdn.mos.cms.futurecdn.net/JhCVxkrej2ZAkL5WDT4Qug.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="caption-text">A screenshot of the PlayCanvas editor showing the 3D environment made by the splat-transform tool. </span><span class="credit" itemprop="copyrightHolder">(Image credit: Iakov Sumygin)</span></figcaption></figure><p>Gaussian splats are a fairly new technology; while the core idea dates back to Lee Westover's work in the early 1990s, the modern version mostly stems from a paper published by French researchers in 2023 that refined the concept. Since then, the tech has been developed and used quite a bit; last year's <em>Superman</em> movie famously used Gaussian splats for complex visual effects, while musician A$AP Rocky has released music videos with the technique, including one ("<a href="https://youtu.be/g1-46Nu3HxQ" target="_blank"><em>HELICOPTER</em></a>") based on a newer "4D Gaussian Splatting" method that bakes a temporal element into the capture, allowing for moving objects.</p><p>Now, you'll notice I said "visual" fidelity above, and therein lies the rub: Gaussian splats can't really be used for interactive media because they don't capture anything about the world except how it looks. Or can they? That's the real innovation of Sumygin's work: taking a pre-made scan of an abandoned building and running it through specialized tools (which he created) to voxelize the splats and create a collision mesh. Boom: workable 3D geometry for a video game.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:3200px;"><p class="vanilla-image-block" style="padding-top:56.25%;"><img id="qcPZGbqTvPwj265HPP9WDn" name="playcanvas-splat-game-bad-lighting" alt="A screenshot from the PlayCanvas FPS game made with gaussian splats showing an enemy character with poor lighting." src="https://cdn.mos.cms.futurecdn.net/qcPZGbqTvPwj265HPP9WDn.jpg" mos="" align="middle" fullscreen="1" width="3200" height="1800" attribution="" endorsement="" class="inline expandable"><a href='https://cdn.mos.cms.futurecdn.net/qcPZGbqTvPwj265HPP9WDn.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="caption-text">The baked lighting looks good on the gun, but doesn't apply very well to the characters, and there aren't any shadows. </span><span class="credit" itemprop="copyrightHolder">(Image credit: Future)</span></figcaption></figure><p>After that, he baked a lighting grid to apply lighting to the object and character models he imported to the project, vibe-coded a basic AI and pathfinding method for the enemy soldiers, and dropped the whole thing on PlayCanvas, which is a browser-based game engine platform owned by Snap, the company that Sumygin works for. (Yes, <a href="https://www.tomshardware.com/maker-stem/engineer-creates-ad-block-for-the-real-world-with-augmented-reality-glasses-no-more-products-or-branding-in-your-everyday-life" target="_blank">that's the SnapChat guys</a>.)</p><p>Speaking as a gamer, the demo isn't particularly interesting as a video game. There's one clumsy-looking gun, one enemy model with very static animations, many bugs (my gun was eating more ammo per shot every time I reloaded it), and it's very easy to break, such as by falling through the world. I'm also not as taken with the visuals as some people seem to be. While it does indeed look convincingly photorealistic at points, fine detail is basically nil; in parts, it reminds me of Id Software's Rage, which had gorgeous graphics until you looked too closely at things. Frankly, <a href="https://www.tomshardware.com/video-games/pc-gaming/unreal-engine-5-7-brings-significant-improvements-over-the-notoriously-demanding-5-4-version-tester-claims-benchmark-shows-up-to-25-percent-gpu-performance-increase-35-percent-cpu-boost" target="_blank">Unreal Engine 5 projects</a> like <em>Unrecord</em> and <em>Bodycam</em> do the same thing better.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1920px;"><p class="vanilla-image-block" style="padding-top:56.25%;"><img id="GN27okaXx8GynjDm6ZmvDC" name="playcanvas-splat-game-close-up-detail" alt="A screenshot from the PlayCanvas FPS game made with gaussian splats showing poor up-close detail." src="https://cdn.mos.cms.futurecdn.net/GN27okaXx8GynjDm6ZmvDC.jpg" mos="" align="middle" fullscreen="1" width="1920" height="1080" attribution="" endorsement="" class="inline expandable"><a href='https://cdn.mos.cms.futurecdn.net/GN27okaXx8GynjDm6ZmvDC.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="caption-text">Low-quality up-close detail like this will continue to be a challenge for environments captured with this technology. </span><span class="credit" itemprop="copyrightHolder">(Image credit: Future)</span></figcaption></figure><p>It's really what Sumygin's little game represents that is interesting, because Sumygin's project is completely fascinating from a technical perspective. He doesn't say how long it took him to make, but now that the tooling is done, it should be relatively straightforward and quick for anyone to <a href="https://www.tomshardware.com/3d-printing/this-3d-printer-was-repurposed-as-a-robotic-camera-and-it-doubles-as-a-photogrammetry-rig-for-3d-scanning" target="_blank">3D scan an environment</a> and create a game with impressive visuals based in that environment. It's quite fascinating as a concept. Oh, and the whole project is under 100 megabytes, which is also quite impressive for the level of detail.</p><p>If you're a developer interested in the technique, Sumygin's project is completely open-source <a href="http://playcanvas.com/project/1480299" target="_blank">over on PlayCanvas</a>, including the assets that he used. Frankly, the project is mostly an advertisement for his company's SuperSplat product, but it's an effective one, and it gives a tantalizing glimpse into what could be a very handy tool in the game developers' toolbox.</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Enterprising developer somehow writes an x86 CPU emulator in plain CSS — no Javascript, no WASM, just stylesheet computing ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/software/programming/enterprising-developer-somehow-writes-an-x86-cpu-emulator-in-plain-css-no-javascript-no-wasm-just-stylesheet-computing</link>
                                                                            <description>
                            <![CDATA[ Enterprising developer somehow writes an x86 CPU emulator in plain CSS ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">Y3zJYGwec33RLp7C9jKFJ9</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/tbCAspmcJtNGAiseDkgPXh-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Wed, 25 Feb 2026 11:20:00 +0000</pubDate>                                                                                                                                                                                                                                <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Bruno Ferreira ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/ZQiPPaXaAuQ4VrVEYnnR7G.png ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Bruno Ferreira&#039;s journey kicked off with the venerable ZX Spectrum, a cassette player, and his hopes and dreams. He quickly realized he had more fun figuring out how computers work than he did actually using the things. Kicking off a developer career with C and Assembly before moving to scripting languages, he&#039;s worn many hats, including both database architect and systems administration. As a teen, Bruno co-founded a web development outfit where he was for 17 years before moving on to spend nearly a decade at The Tech Report as a writer, editor, and (of course) developer. In this decade, he&#039;s been at Asus, MLCommons, and HotHardware, among others. When not fiddling with computers and games, his love for music and production sends him off to live shows and festivals. Occasionally, he pretends he can play the guitar and bass.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/tbCAspmcJtNGAiseDkgPXh-1280-80.jpg">
                                                            <media:credit><![CDATA[Getty]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[hashes]]></media:description>                                                            <media:text><![CDATA[hashes]]></media:text>
                                <media:title type="plain"><![CDATA[hashes]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/tbCAspmcJtNGAiseDkgPXh-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Yes, you did read the headline correctly, and you'd be wise to fetch a cross, garlic, and a stake. Lyra Rebane, a madlady who dabbles in CSS and infosec, figured out she could leverage the power of contemporary implementations of the stylesheet language to <a href="https://lyra.horse/x86css/" target="_blank">emulate an x86 processor</a>, all without even a single line of JavaScript, WASM, or any other such tomfoolery.</p><div  class="fancy-box"><div class="fancy_box-title">Go deeper with TH Premium: CPU</div><div class="fancy_box_body"><figure class="van-image-figure "  ><div class='image-full-width-wrapper'><div class='image-widthsetter' ><p class="vanilla-image-block" style="padding-top:56.25%;"><img id="Xh2MupWrRjJPiLLuopmKRB" name="W1103180" caption="" alt="A hand holding the Ryzen 7 9850X3D." src="https://cdn.mos.cms.futurecdn.net/Xh2MupWrRjJPiLLuopmKRB.jpg" mos="" link="" align="" fullscreen="" width="" height="" attribution="" endorsement="" class="pinterest-pin-exclude"></p></div></div><figcaption itemprop="caption description" class=""><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p class="fancy-box__body-text"><ul><li><a data-analytics-id="inline-link" href="https://www.tomshardware.com/tech-industry/cpu-scaling-with-dlss-investigating-cpu-performance-in-the-age-of-upscaling" target="_blank">CPU scaling with DLSS</a></li><li><a data-analytics-id="inline-link" href="https://www.tomshardware.com/pc-components/cpus/ryzen-to-the-top-how-amd-innovated-in-the-gaming-cpu-market" target="_blank">Ryzen to the top: How AMD innovated in the gaming CPU market</a></li><li><a data-analytics-id="inline-link" href="https://www.tomshardware.com/tech-industry/semiconductors/how-arm-is-working-its-way-into-pcs-and-data-centers-inside-the-products-and-trends-behind-the-hype" target="_blank">How ARM is working its way into PCs</a></li><li><a data-analytics-id="inline-link" href="https://www.tomshardware.com/tech-industry/amd-ces-2026-gaming-trends-press-q-and-a-roundtable-transcript-we-see-a-little-bit-of-an-uptick-in-the-percentage-of-am4-versus-am5-platforms" target="_blank">AMD CES 2026 gaming trends press Q&A roundtable transcript</a></li></ul></p></div></div><p>The emulator even comes complete with a basic display and keypad, and some preinstalled programs for calculating the Fibonacci sequence, Pascal's triangle, and a variation of Wordle. You'll need a recent version of a Chromium-based browser, as some CSS features she used are not yet standard. Rebane even goes as far as showing fellow mad-people how to compile their own C programs for the emulator using the gcc-ia16 compiler. </p><p>As the first question out of everyone's mouths will be "Can it run Doom?", the answer is that no, it cannot, or at least not yet. While the x86css emulator implements most of the x86 assembly, it's missing key functionality like interrupt handling, port input/output, and block-operation instructions, all key to making most any game as we know them. Perhaps more poignantly, Doom is a 32-bit program and requires a 32-bit CPU (80386 or above), 4 MB of RAM, and the ability to enter protected mode.</p><p>Cold-hearted developers like myself will also find some warmth in the fact that Rebane did not use any vibe-coding or AI bot assistance for writing this emulator. And as she points out, a bot could have hardly done this, as the necessary leaps in logic to force CSS to be a full-fledged state machine require some serious out-of-the-box thinking. Rebane points to <a href="https://dev.to/janeori/expert-css-the-cpu-hack-4ddj" target="_blank">Jane Ori's CSS CPU Hack</a> as instrumental to her own ideas.</p><div class="see-more see-more--clipped"><blockquote class="twitter-tweet hawk-ignore" data-lang="en"><p lang="en" dir="ltr">i built an entire x86 CPU emulator in CSS (no javascript)you can write programs in C, compile them to x86 machine code with GCC, and run them inside CSS pic.twitter.com/jU29iLZfbZ<a href="https://twitter.com/cantworkitout/status/2026120879755628980">February 24, 2026</a></p></blockquote><div class="see-more__filter"></div></div><p>As to the reason or utility of such an enterprise, she simply stated that it was a fun project. Many developers (me included) have long made jokes when people mention HTML and CSS as "programming languages," and this is definitely a moment of harsh acceptance. Some commenters wonder if this implies that contemporary CSS might become a serious attack vector, but that seems unlikely given that Rebane had to create the machine to run the code with.</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Ambitious developer showcases slick triple-level Quake-like game stored in tiny 64KB executable — every game asset tucked inside what could be a ‘rounding error’ in modern app payload terms ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/video-games/retro-gaming/ambitious-developer-showcases-slick-triple-level-quake-like-game-stored-in-tiny-64kb-executable-every-game-asset-tucked-inside-what-could-be-a-rounding-error-in-modern-app-payload-terms</link>
                                                                            <description>
                            <![CDATA[ Developer Daivuk has released QUOD, a 64KB ‘boomer shooter’ with an uncanny resemblance to id Software’s seminal FPS title, Quake. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">hEwBwBUt5Kc3ErTCGyfA9Q</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/ZC8SyYTWX3Vj45fjHMrZBQ-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Tue, 24 Feb 2026 13:43:47 +0000</pubDate>                                                                                                                                                                                                                                <category><![CDATA[Retro Gaming]]></category>
                                                    <category><![CDATA[Video Games]]></category>
                                                                                                                    <dc:creator><![CDATA[ Mark Tyson ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/56vqMYLDaKRHPhHZgbADFR.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Mark&#039;s enthusiasm for computers dampened at an early age by the rubber-keyed Sinclair Spectrum 48K and feelings of Commodore 64 envy. However, in the mid-80s, hope in a digital future was rekindled by the purchase of an Atari 520 STe. Since that time Mark has used a multitude of computers for fun and professional endeavors. He often owned both Macs and PCs but went cold on the former after OS9 was killed off, and warmed to the latter with the introduction of Windows XP.&lt;br&gt;
&lt;br&gt;
Early work years were spent in artwork and reprographics but in the late noughties, Mark started to blog about computers, Taiwanese food culture, and guitar design. This activity led to a full-time position writing about breaking PC tech news for HEXUS, for the best part of a decade. When HEXUS was abruptly closed, Mark helped with the foundation of Club386, before finding a new home at Tom&#039;s Hardware.&lt;br&gt;
&lt;br&gt;
When not wearing through the keycap legends on his PC keyboards, Mark can be found wandering the computer malls of Taiwan&#039;s neon-lit conurbations and enjoying local and international cuisine.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/ZC8SyYTWX3Vj45fjHMrZBQ-1280-80.jpg">
                                                            <media:credit><![CDATA[Daivuk]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[QUOD game in 64KB]]></media:description>                                                            <media:text><![CDATA[QUOD game in 64KB]]></media:text>
                                <media:title type="plain"><![CDATA[QUOD game in 64KB]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/ZC8SyYTWX3Vj45fjHMrZBQ-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Developer Daivuk has released <em>QUOD</em>, a 64KB ‘boomer shooter’ with an uncanny resemblance to id Software’s seminal FPS title, <em>Quake</em>. Astonishingly, this tiny executable delivers a Quake-like 3D gaming experience with “3 levels, 1 boss fight, 4 unique enemies, 4 weapons, and a handful of power-ups.” Moreover, it doesn’t call on any external resources; the whole caboodle of textures, sounds, music, levels, models, animations, and code is compressed into that minimal 64KB download.</p><div class="youtube-video" data-nosnippet ><div class="video-aspect-box"><iframe data-lazy-priority="high" data-lazy-src="https://www.youtube-nocookie.com/embed/qht68vFaa1M" allowfullscreen></iframe></div></div><p>Above, you can see Daivuk present his own tiny FPS masterwork, in a nicely structured step-by-step video, which touches on topics such as optimizing the textures, maps, models & animations, audio, code, and even creating a virtual machine for a further 2KB of file size savings.</p><p>The developer starts by explaining that the QUOD project has been about 10 years in gestation, but has only really been worked upon in the last year. Daivuk indicates to viewers that he has long thought 64KB is the sweet spot for such impressive demos. “It’s very small, but still leaves room for creativity,” he says.</p><p>Devotion to optimization shows in several key segments of the video explaining how this 64KB feat was achieved. For example, instead of saving image file resources into the tiny file, Daivuk saved ‘action-based textures’ which are a Photoshop-action-like ‘recipes’ for creating these visual ingredients. The dev even went as far as developing a custom VM and programming language for the sake of smaller file sizes.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1920px;"><p class="vanilla-image-block" style="padding-top:56.25%;"><img id="asoCqXWZqahiJmYyQFQBAQ" name="quod-hero" alt="QUOD game in 64KB" src="https://cdn.mos.cms.futurecdn.net/asoCqXWZqahiJmYyQFQBAQ.jpg" mos="" align="middle" fullscreen="" width="1920" height="1080" attribution="" endorsement="" class="inline"></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: <a href="https://daivuk.itch.io/quod/devlog/1180224/i-made-an-fps-in-64-kb" target="_blank">Daivuk</a>)</span></figcaption></figure><p>Despite its 1980s-era (tape drive, pre-<a href="https://www.tomshardware.com/maker-stem/microcontrollers-projects/floppy-disk-drive-converted-into-smart-tv-remote-for-kids-devs-toddler-inserts-vividly-labeled-floppies-to-watch-his-favorite-shows">floppy drive</a>) game file size, QUOD.exe still requires a 2010s era CPU and GPU to render its frantic FPS-blasting fun. The minimum specs for this demoscene title include an “Intel i5 or equivalent, <a href="https://www.tomshardware.com/reviews/geforce-gtx-770-gk104-review,3519.html">GTX 770</a> or equivalent, 8GB RAM.” Of course, you will also need a spare sliver of disk space – that’s also a mere 64KB, as this is a self-contained non-install application.</p><p>Daivuk seems to have plenty of ideas on how to make 64KB demos and games even better. In the video outro, he mentions a host of possible optimizations and refinements that may come to QUOD v2, or whatever may be next. We will be <a href="https://www.youtube.com/@daivuk">staying tuned</a> to this creator’s channel, for sure.</p><p>We’ve seen and reported on impressive small-file-size demo works before, like a colorful ray tracing animation app <a href="https://www.tomshardware.com/software/operating-systems/ray-tracer-ported-to-an-x86-boot-sector-in-only-483-bytes-run-on-pentium-pro-and-faster-cpus">squashed into a minuscule 483 bytes</a>! We also wrote about a <a href="https://www.tomshardware.com/video-games/retro-gaming/quake-like-game-made-with-javascript-takes-up-just-13kb-of-storage">Quake-like JavaScript game in 13KB</a>. Nevertheless, QUOD remains outstanding for its slick Quake(y) FPS playability, looks, and feel. You don’t have to rely on watching the video to judge this, you can download and run it in seconds…</p><h2 id="30-years-prior">30 years prior</h2><p>Incidentally, id Software’s Qtest multiplayer-only demo of <a href="https://www.tomshardware.com/video-games/quake-was-the-only-game-to-support-dos-and-win95-with-tcp-ip-multiplayer-in-one-executable-deep-dive-explains-how-id-software-did-it">Quake </a>was released exactly 30 years ago today. But Quake’s shareware release was on June 22, 1996 (MS-DOS), with the full version becoming available to buyers a month later.</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Quake was the only game to support DOS and Win95 with TCP/IP multiplayer in one executable—deep dive explains how id Software did it ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/video-games/quake-was-the-only-game-to-support-dos-and-win95-with-tcp-ip-multiplayer-in-one-executable-deep-dive-explains-how-id-software-did-it</link>
                                                                            <description>
                            <![CDATA[ Deep dive explains how Quake targeted DOS, Windows 95, and TCP/IP simultaneously ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">PXLhB3Bu7XYeMW2kTgtnz</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/DYPMhqHaWTFyMQHW5hiHEY-1280-80.png" type="image/png" length="0"></enclosure>
                                                                        <pubDate>Wed, 19 Nov 2025 10:30:00 +0000</pubDate>                                                                                                                                <updated>Wed, 19 Nov 2025 16:48:42 +0000</updated>
                                                                                                                                            <category><![CDATA[Video Games]]></category>
                                                                                                                    <dc:creator><![CDATA[ Bruno Ferreira ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/ZQiPPaXaAuQ4VrVEYnnR7G.png ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Bruno Ferreira&#039;s journey kicked off with the venerable ZX Spectrum, a cassette player, and his hopes and dreams. He quickly realized he had more fun figuring out how computers work than he did actually using the things. Kicking off a developer career with C and Assembly before moving to scripting languages, he&#039;s worn many hats, including both database architect and systems administration. As a teen, Bruno co-founded a web development outfit where he was for 17 years before moving on to spend nearly a decade at The Tech Report as a writer, editor, and (of course) developer. In this decade, he&#039;s been at Asus, MLCommons, and HotHardware, among others. When not fiddling with computers and games, his love for music and production sends him off to live shows and festivals. Occasionally, he pretends he can play the guitar and bass.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/png" url="https://cdn.mos.cms.futurecdn.net/DYPMhqHaWTFyMQHW5hiHEY-1280-80.png">
                                                            <media:credit><![CDATA[id Software]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[quake logo]]></media:description>                                                            <media:text><![CDATA[quake logo]]></media:text>
                                <media:title type="plain"><![CDATA[quake logo]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/DYPMhqHaWTFyMQHW5hiHEY-1280-80.png" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>The mid-90s was arguably the period in PC history with the most whiplash-inducing changes. The arrival of 3D acceleration cards, the transition from plain-textbox DOS to fancy Windows 95, and the advent of the Internet all happened at once. This rapidly shifting landscape posed quite the challenge for game developers, as they had to consider writing their games for DOS, Windows 95, or both. </p><p>In an <a href="https://fabiensanglard.net/quake_chunnel/index.html" target="_blank">exceedingly detailed writeup</a>, Fabien Sanglard explains how the OG <em>Quake</em> got its support for TCP/IP <em>and</em> was arguably the only game that used the same executable with native support for both operating systems.</p><p>Many games of the era, like <em>Fallout</em>, <em>Grand Theft Auto</em>, and <em>Mortal Kombat 3</em>, would ship separate executables for DOS and Windows 95. However, id Software wanted <em>Quake</em> to use nearly the same executable (and codebase), and it wanted the game to have support for TCP/IP, the Internet communications protocol. Playing remotely with more than one person was the fresh new thing back then; true multiplayer was often limited to home or office networks.</p><p>Fulfilling both requirements at once was no easy feat for <em>Quake</em>. DOS was long in the tooth by the time of the game's development and needed a ton of hacks to use all of the hardware capabilities of the time, namely but not only more than 640 KB of memory. </p><p>To get around DOS' limitations, games started including DPMI (DOS Protected Mode Interface) extenders like Watcom's DOS/4GW or CWSDPMI. These extenders offered a standardized memory interface, multitasking, and other capabilities. The extender technically served as a micro-kernel, so think of it as a DOS replacement. Typically, games would ship with a target DPMI server and be their single client.</p><p>During Quake's development, id wanted to shift from the (at-the-time) proprietary Watcom compiler used in <em>Doom</em> to the open-source djgpp toolkit in a bid to make cross-platform development far easier. Heck, <em>Quak</em>e even had a DEC Alpha port, if anyone remembers those. In a shift from the usual arrangement, id asked djgpp's engineers to ensure that its DPMI client supported Windows 95's included DPMI server in addition to CWSDPMI.</p><p>The problem was that although DPMI was a standard, its specification was not finalized until the late 90s. That meant that in practice, client software was normally beholden to one specific server. But the djgpp team delivered, and senior Microsoft kernel engineer Raymond Chen put it plainly:</p><p><em>"The fact that programs seem to run mostly okay in spite of running under a foreign extender is either completely astonishing or totally obvious, depending on your point of view."</em></p><p><em>Quake</em> had native TCP/IP support coded in, yes, but since it was cross-platform, it needed a way to interact with Windows 95's Winsock TCP/IP layer. Additionally, in-game match/server browsers were a new concept at the time, so id killed two grunts with one rocket by enlisting the help of Mpath Interactive and integrating its Mplayer match-making software into <em>Quake</em>.</p><p>Mplayer's software comprised two pieces: a "Gizmo" game browser that would autodetect any Mplayer-compatible games you had installed and list game rooms for them, and a solution called the "Chunnel", the component that would actually talk to Windows' TCP/IP stack.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:991px;"><p class="vanilla-image-block" style="padding-top:107.67%;"><img id="YKaPB6d4KobtjUcSt7uWvn" name="Quake 1 cross-OS structure" alt="Quake 1 cross-OS structure" src="https://cdn.mos.cms.futurecdn.net/YKaPB6d4KobtjUcSt7uWvn.png" mos="" align="middle" fullscreen="" width="991" height="1067" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="caption-text"><em>Quake</em>'s cross-OS structure diagram </span><span class="credit" itemprop="copyrightHolder">(Image credit: Fabien Sanglard)</span></figcaption></figure><p>To round out cross-compatibility, <em>Quake</em> also shipped with Mpath's genvxd.dll. This is a virtual device driver that translated DOS networking functionality (that itself uses the now-standard BSD socket function calls) to Windows 95's Winsock. Once that was fitted in, the journey was finally complete, and <em>Quake</em> would run seamlessly in both DOS or Windows, without needing separate installers or executables.</p><p>For the nitty-gritty technical details, be sure to <a href="https://fabiensanglard.net/quake_chunnel/index.html" target="_blank">visit Fabien Sanglard's deep dive</a>. If this conversation got you raring to play the original game again, go ahead and get <a href="https://www.tomshardware.com/news/quake-original-remaster">the remastered version</a>.</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ 37 years ago this week, the Morris worm infected 10% of the Internet within 24 hours — worm slithered out and sparked a new era in cybersecurity ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/tech-industry/cyber-security/on-this-day-in-1988-the-morris-worm-slithered-out-and-sparked-a-new-era-in-cybersecurity-10-percent-of-the-internet-was-infected-within-24-hours</link>
                                                                            <description>
                            <![CDATA[ Cornell graduate student Robert Tappan Morris unleashed his eponymous worm upon the Internet 37 years ago, changing the face of cybersecurity. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">2yx5XwXvHBuRrnnp8Re97X</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/ttuF6zAsvkYiVcKNJst2TH-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Tue, 04 Nov 2025 13:45:00 +0000</pubDate>                                                                                                                                <updated>Tue, 04 Nov 2025 17:02:11 +0000</updated>
                                                                                                                                            <category><![CDATA[Cybersecurity]]></category>
                                                    <category><![CDATA[Tech Industry]]></category>
                                                                                                                    <dc:creator><![CDATA[ Mark Tyson ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/56vqMYLDaKRHPhHZgbADFR.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Mark&#039;s enthusiasm for computers dampened at an early age by the rubber-keyed Sinclair Spectrum 48K and feelings of Commodore 64 envy. However, in the mid-80s, hope in a digital future was rekindled by the purchase of an Atari 520 STe. Since that time Mark has used a multitude of computers for fun and professional endeavors. He often owned both Macs and PCs but went cold on the former after OS9 was killed off, and warmed to the latter with the introduction of Windows XP.&lt;br&gt;
&lt;br&gt;
Early work years were spent in artwork and reprographics but in the late noughties, Mark started to blog about computers, Taiwanese food culture, and guitar design. This activity led to a full-time position writing about breaking PC tech news for HEXUS, for the best part of a decade. When HEXUS was abruptly closed, Mark helped with the foundation of Club386, before finding a new home at Tom&#039;s Hardware.&lt;br&gt;
&lt;br&gt;
When not wearing through the keycap legends on his PC keyboards, Mark can be found wandering the computer malls of Taiwan&#039;s neon-lit conurbations and enjoying local and international cuisine.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/ttuF6zAsvkYiVcKNJst2TH-1280-80.jpg">
                                                            <media:credit><![CDATA[Getty / Tomas Knopp]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Internet worm]]></media:description>                                                            <media:text><![CDATA[Internet worm]]></media:text>
                                <media:title type="plain"><![CDATA[Internet worm]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/ttuF6zAsvkYiVcKNJst2TH-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>This week in 1988, Cornell graduate student Robert Tappan Morris unleashed his eponymous worm upon the Internet. The wave of infections grew to 10% of the entire Internet within 24 hours, causing astronomically expensive damage for the time. However, the pioneering Morris worm malware wasn’t made with malice, says an <a href="https://www.fbi.gov/news/stories/morris-worm-30-years-since-first-major-attack-on-internet-110218" target="_blank">FBI retrospective</a> on the “programming error.” It was designed to gauge the size of the Internet, resulting in a classic case of unintended consequences.</p><h2 id="morris-worm-dissection">Morris worm dissection</h2><p>Known to be something of a prankster, Morris must have felt some foreboding about releasing his ‘innocent’ program into the wild. Evidence of this comes from his release method. “He released it by hacking into an MIT computer from his Cornell terminal in Ithaca, New York,” according to the FBI.</p><p>The Morris worm was written in C and targeted BSD <a href="https://www.tomshardware.com/reviews/nvidia-3d-linux,225-7.html">UNIX </a>systems, like VAX and Sun-3 machines. Specifically, the FBI writes, it “exploited a backdoor in the Internet’s electronic mail system and a bug in the ‘finger’ program that identified network users.” In contrast to computer viruses, the worm Morris had devised had no need of a host program, but could self-replicate and spread autonomously. </p><p>Thankfully, the Morris worm wasn’t written to cause damage to files. Due to those unintended consequences, though, it precipitated massive slowdowns, and messaging delays and <a href="https://www.tomshardware.com/software/windows/new-windows-11-feature-aims-to-diagnose-crashes-will-check-ram-after-bsods-to-look-for-problems">system crashes</a> were common symptoms. It became a computer news sensation in the worst possible way. Just to get rid of the worm in a timely fashion, some institutions ended up wiping complete systems and unplugging networks for as long as a week.</p><p>Among the Morris worm's casualties were prestigious institutions such as Berkeley, Harvard, Princeton, Stanford, Johns Hopkins, <a href="https://www.tomshardware.com/news/nasa-hacks-its-supercomputing-way-through-intel-amd-parts">NASA</a>, and the Lawrence Livermore National Laboratory. </p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:450px;"><p class="vanilla-image-block" style="padding-top:133.33%;"><img id="ZBWQMDdKwR72jd8ugHkbN7" name="Morris_Worm" alt="Morris worm isolated safely on a floppy" src="https://cdn.mos.cms.futurecdn.net/ZBWQMDdKwR72jd8ugHkbN7.jpg" mos="" align="middle" fullscreen="" width="450" height="600" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="caption-text">Morris worm isolated safely on a floppy. Sorry, the resolution is low. </span><span class="credit" itemprop="copyrightHolder">(Image credit: <a href="https://www.flickr.com/people/87242149@N00" target="_blank">Go Card USA</a>)</span></figcaption></figure><h2 id="whodunit">Whodunit?</h2><p>Experts worked hard to find a fix, and while they did so, the question of who was behind the worm came to the fore. Understandably, whoever created and unleashed this worm needed to feel some consequences, and thus, <a href="https://www.tomshardware.com/news/eff-fbi-qeek-squad-informants,36627.html">the FBI</a> was brought in. </p><p>Apparently, Morris sought to anonymously explain and apologize for the worm, but an inadvertent slip of his initials by a friend landed Morris in it. </p><p>FBI interviews and computer file analysis would subsequently confirm Morris was the culprit. He was indicted under the rather freshly inked Computer Fraud and Abuse Act of 1986. After a court appearance for his misdemeanors in 1989, Morris ended up not with jail time, but with a fine, probation, and 400 hours of community service to complete. </p><h2 id="computer-worms-have-been-around-longer-than-the-world-wide-web">Computer worms have been around longer than the World Wide Web</h2><p>Back in November 1988, the Internet bore little resemblance to what it is today. For example, the World Wide Web (WWW) wasn’t even a thing. Though the WWW would soon form the core experience for the first tide of surfers in the 90s.</p><p>At the time, the Internet’s backbone was the NSFNET, the recent successor to <a href="https://www.tomshardware.com/networking/this-week-in-1969-the-internet-was-born-and-immediately-glitched-only-two-of-the-five-letters-in-the-first-computer-to-computer-message-were-received">ARPANET</a>. Its purpose was mostly to expand the prior backbone’s reach beyond military and defense institutions, and it more broadly embraced academia. While we are here, it is worth mentioning that NSFNET was decommissioned in 1995, and succeeded by the commercial Internet, which emerged in the 1990s off the back of private ISPs and commercial backbones.</p><p>So, when we talk about 10% of the Internet being paralyzed by the Morris Worm, contemporary estimates are that about 6,000 of the approximately 60,000 connected systems were infected and impacted. Moreover, when we highlighted the potentially massive costs of this first worm propagating, estimates range from $100,000 to millions of dollars. </p><p>Computer worms have remained a scary phenomenon in recent times. For example, we reported on the first-generation AI worm, the <a href="https://www.tomshardware.com/tech-industry/artificial-intelligence/ai-worm-infects-users-via-ai-enabled-email-clients-morris-ii-generative-ai-worm-steals-confidential-data-as-it-spreads">Morris II generative AI worm,</a> last year. </p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Apple doubles security bounty to $2 million, with bonuses potentially increasing rewards to $5 million. ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/tech-industry/cyber-security/apple-doubles-security-bounty-to-usd2-million-with-bonuses-potentially-increasing-rewards-to-usd5-million</link>
                                                                            <description>
                            <![CDATA[ Apple has announced that it will double its bug bounty cap to $2 million. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">fpih6Ns59jMfUtDd7YJ8GV</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/jpzTKxu8gNjKb7xphDZ8NS-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sun, 12 Oct 2025 12:20:00 +0000</pubDate>                                                                                                                                <updated>Sun, 12 Oct 2025 14:20:51 +0000</updated>
                                                                                                                                            <category><![CDATA[Cybersecurity]]></category>
                                                    <category><![CDATA[Tech Industry]]></category>
                                                                                                <author><![CDATA[ editors@tomshardware.com (Jowi Morales) ]]></author>                    <dc:creator><![CDATA[ Jowi Morales ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/gM7E2WSDg2wgCFoaDPz9yK.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Jowi Morales is a writer and journalist covering the tech beat since 2021. However, he’s been interested in technology far earlier than that. He started discovering desktop computers when his father brought home a Windows 95 PC, but his first real experience working under the hood of the PC was when the old computer’s hard drive was filled to the brim in the year 2000. He deleted the Windows folder to attempt to rectify the situation, which led to his dad buying a new desktop PC. Since then, he learned a lot more about computers, and he’s always been the go-to tech expert for his family and friends.&lt;/p&gt;&lt;p&gt;Jowi primarily uses a Windows workstation and an Android phone, but he also bought into the Apple ecosystem with the 6th-gen iPad, iPhone 14 Pro Max, and the M1 MacBook Air. Today, Jowi covers hardware and software from Redmond and Cupertino, while also looking at the tech industry in general.&lt;/p&gt;&lt;p&gt;Aside from covering technology, Jowi is an avid photographer and writes about automobiles, aviation, and tanks. You can find his bylines at &lt;a href=&quot;https://www.makeuseof.com/author/jowi-morales/&quot;&gt;MakeUseOf&lt;/a&gt;, &lt;a href=&quot;https://www.slashgear.com/author/jowimorales/&quot;&gt;SlashGear&lt;/a&gt;, and, of course, &lt;a href=&quot;https://www.tomshardware.com/author/jowi-morales&quot;&gt;Tom’s Hardware&lt;/a&gt;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/jpzTKxu8gNjKb7xphDZ8NS-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Apple Mac Studio (Early 2025)]]></media:description>                                                            <media:text><![CDATA[Apple Mac Studio (Early 2025)]]></media:text>
                                <media:title type="plain"><![CDATA[Apple Mac Studio (Early 2025)]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/jpzTKxu8gNjKb7xphDZ8NS-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Apple announced at Hexacon 2025, the top global offensive security conference, that it will double its highest security bounty to $2 million. This makes Cupertino the most generous company that offers an award for unearthing vulnerabilities, and it’s even offering top-up bonuses that can see security experts earning more than $5 million for uncovering exploits. According to <a href="https://security.apple.com/blog/apple-security-bounty-evolved/">Apple’s Security Research blog</a>, it has already awarded over $35 million to more than 800 security researchers since 2020, bringing the average award to $43,750. It even claimed that multiple individuals have received $500,000 in rewards.</p><p>The top $2-million award is reserved for those who discover sophisticated exploit chains similar to what mercenary spyware attacks exploit. Beyond that, there’s also a bonus system for those who can break Apple’s Lockdown Mode secure environment and vulnerabilities in its beta software, bringing the potential payout to over $5 million. There are also smaller awards, like $1 million for those who can crack broad iCloud security and those who can create a wireless proximity attack using radio, up to $300,000 to anyone who develops a one-click WebKit sandbox escape mechanism, and $100,000 to those who can bypass Gatekeeper on macOS.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1280px;"><p class="vanilla-image-block" style="padding-top:56.25%;"><img id="dkF5ccf9kFXC7FvdBKuXei" name="Apple doubles security bounty to $2m" alt="bug bounty program launch and current max payout" src="https://cdn.mos.cms.futurecdn.net/dkF5ccf9kFXC7FvdBKuXei.jpg" mos="" align="middle" fullscreen="1" width="1280" height="720" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/dkF5ccf9kFXC7FvdBKuXei.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>This isn’t the only bug bounty program anyone can participate in. <a href="https://www.tomshardware.com/tech-industry/amd-willing-to-pay-you-up-to-dollar30k-via-its-new-bug-bounty-program">AMD announced its own program</a> last year, with a payout of up to $30,000, while Intel offers a maximum of $100,000. Microsoft’s maximum award at the moment is $250,000, and it has even lowered its age limit to 13 because of this <a href="https://www.tomshardware.com/tech-industry/cyber-security/microsofts-youngest-security-researcher-started-collaboration-with-the-company-at-just-13-high-school-junior-filed-20-vulnerability-reports-last-summer-named-msrc-most-valuable-researcher-twice">high school junior who filed over 20 security vulnerability reports</a> last summer. Meta launched a bug bounty program in 2011 and now offers a maximum bug bounty of $300,000 (with $25,000,000 awarded to date). And last, but not least, Google began its Vulnerability Reward Program (VRP) in 2010. The search giant’s rewards vary from a few hundred dollars to a million dollars for the most serious vulnerabilities on its Titan M security chip. The company paid $11.8 million in 2024 to 660 researchers, bringing the average award to $17,800 per head.</p><p>These awards can make finding bugs a lucrative field, especially for talented security researchers. And while it might seem like an expensive proposition for companies, it’s far cheaper for them to pay out these bounties instead of having a bad actor discover it and disseminate it under their noses, resulting in reputational and financial damages for the corporation. Moreover, software mistakes can potentially cost lives, as state actors and other third parties are increasingly using sophisticated means to target specific personalities.</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Developer recreates classic shoot 'em up Zaxxon as a UEFI firmware — isometric arcade game coded in x86 assembly for no-OS represents 'total freedom from big tech' ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/software/programming/developer-recreates-classic-shoot-em-up-zaxxon-as-a-uefi-firmware-isometric-arcade-game-coded-in-x86-assembly-for-no-os-represents-total-freedom-from-big-tech</link>
                                                                            <description>
                            <![CDATA[ A Zaxxon remake, coded in x86-64 Assembly language, is now available as a UEFI application. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">xTBycCPfSwAZQQbEg4sunA</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/ob5Ec5KRoiqc4BgGuttUpe-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Mon, 06 Oct 2025 12:58:50 +0000</pubDate>                                                                                                                                                                                                                                <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Mark Tyson ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/56vqMYLDaKRHPhHZgbADFR.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Mark&#039;s enthusiasm for computers dampened at an early age by the rubber-keyed Sinclair Spectrum 48K and feelings of Commodore 64 envy. However, in the mid-80s, hope in a digital future was rekindled by the purchase of an Atari 520 STe. Since that time Mark has used a multitude of computers for fun and professional endeavors. He often owned both Macs and PCs but went cold on the former after OS9 was killed off, and warmed to the latter with the introduction of Windows XP.&lt;br&gt;
&lt;br&gt;
Early work years were spent in artwork and reprographics but in the late noughties, Mark started to blog about computers, Taiwanese food culture, and guitar design. This activity led to a full-time position writing about breaking PC tech news for HEXUS, for the best part of a decade. When HEXUS was abruptly closed, Mark helped with the foundation of Club386, before finding a new home at Tom&#039;s Hardware.&lt;br&gt;
&lt;br&gt;
When not wearing through the keycap legends on his PC keyboards, Mark can be found wandering the computer malls of Taiwan&#039;s neon-lit conurbations and enjoying local and international cuisine.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/ob5Ec5KRoiqc4BgGuttUpe-1280-80.jpg">
                                                            <media:credit><![CDATA[Inkbox Software ]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Zaxxon remake in UEFI]]></media:description>                                                            <media:text><![CDATA[Zaxxon remake in UEFI]]></media:text>
                                <media:title type="plain"><![CDATA[Zaxxon remake in UEFI]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/ob5Ec5KRoiqc4BgGuttUpe-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Inkbox Software has <a href="https://github.com/InkboxSoftware/spacegamex64">released</a> a recreation of a beloved isometric arcade game that runs directly from a PC’s Unified Extensible Firmware Interface (UEFI). Moreover, they coded their version of Zaxxon (1982) in x86-64 Assembly language, and have generously released it as open source under the GPLv3 license. There have been prior <a href="https://www.tomshardware.com/news/doom-port-released-as-bios-payload">UEFI games</a> and <a href="https://www.tomshardware.com/software/someone-made-a-functioning-irc-client-that-runs-entirely-inside-the-motherboards-uefi">apps</a>, but they are often incomplete or limited demos, and run within the UEFI as payloads, rather than booting directly to the game.</p><div class="youtube-video" data-nosnippet ><div class="video-aspect-box"><iframe data-lazy-priority="low" data-lazy-src="https://www.youtube-nocookie.com/embed/ZFHnbozz7b4" allowfullscreen></iframe></div></div><p>In the above video, Inkbox explains the reason they decided to begin this classic arcade gaming UEFI coding quest. In brief, our assembly coding hero says that they were “so tired of operating systems holding me back,” and that they wanted their hardware to run a classic game as it was meant to be played. That means “Written in assembly, without an operating system,” asserts Inkbox. “This is total freedom from big tech. Reject OS, Return to metal.”</p><p>Of course, there are significant hurdles to creating a handsome and responsive Zaxxon port for a PC UEFI. You can learn how Inkbox navigated this difficult path in their extensive and in-depth, yet engrossing video.</p><figure role="gallery"><figure><img src="https://cdn.mos.cms.futurecdn.net/TxBka8NrUDBfrxdfbHZJpe.jpg" alt="Zaxxon remake in UEFI" /><figcaption><small role="credit">Inkbox Software </small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/Sjws8vSj9FRV276Fs4pLpe.jpg" alt="Zaxxon remake in UEFI" /><figcaption><small role="credit">Inkbox Software </small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/ob5Ec5KRoiqc4BgGuttUpe.jpg" alt="Zaxxon remake in UEFI" /><figcaption><small role="credit">Inkbox Software </small></figcaption></figure></figure>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Hack to the Future — here's how you can write BASIC code on a modern-day PC ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/software/programming/hack-to-the-future-heres-how-you-can-write-basic-code-on-a-modern-day-pc</link>
                                                                            <description>
                            <![CDATA[ BASIC was the Python of its day and it inspired many bedroom coders to spend hours in their room, hacking around to make games and tools. Now you can do the same in the 21st century. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">iqZoxKqL6xBngcrDieFPsG</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/paWRVk9iKNaURtRbd5vLFU-1280-80.gif" type="image/gif" length="0"></enclosure>
                                                                        <pubDate>Wed, 17 Sep 2025 11:49:35 +0000</pubDate>                                                                                                                                <updated>Wed, 17 Sep 2025 17:37:56 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/gif" url="https://cdn.mos.cms.futurecdn.net/paWRVk9iKNaURtRbd5vLFU-1280-80.gif">
                                                            <media:credit><![CDATA[AI generated using Adobe Firefly]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[BASIC 2025]]></media:description>                                                            <media:text><![CDATA[BASIC 2025]]></media:text>
                                <media:title type="plain"><![CDATA[BASIC 2025]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/paWRVk9iKNaURtRbd5vLFU-1280-80.gif" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>The Beginner’s All-Purpose Symbolic Instruction Code, BASIC, is where I started my coding journey. Sat, aged four or five in front of a Commodore 16, I typed in lines of words and numbers which made up an application or sound effect. Sometimes they worked, often they did not. The words that I typed, along with “syntax error,” meant nothing to a five-year-old child who wanted sugar-coated cereal and Transformers cartoons, but I persevered. </p><p>Fast forward to the 21st century, and I still use BASIC from time to time. I write BASIC on a Commodore 64 and a ZX Spectrum that I recently renovated. I’ve even written <a href="https://www.tomshardware.com/how-to/raspberry-pi-pico-basic-controlled-neopixels">BASIC on a Raspberry Pi Pico</a> to control a series of NeoPixels.</p><p>Recently, <a href="https://www.tomshardware.com/software/bill-gates-48-year-old-microsoft-6502-basic-goes-open-source" target="_blank">Microsoft open-sourced its MOS,6502 BASIC</a> from 1978, and that got me thinking about writing BASIC on a PC. Sure, I remember QBasic and the gorillas.bas game. I loved tweaking that game on my 486 DX33 back in the 1990s,  but I wanted to write BASIC on my Windows 10 PC in 2025. </p><p>I can’t use MOS6502 BASIC without spending a lot of time getting it to work on my PC, so what can I use instead? It turns out that there is, and it is called <a href="https://www.qb64phoenix.com/" target="_blank"><u>QB64 Phoenix Edition,</u></a> and it looks and feels just like QBasic, but with many more features.</p><ul><li>Realtime input error checking</li><li>Online and offline help system</li><li>Syntax highlighting</li><li>Automatic source formatting</li><li>Debugging</li><li>Compiles native binaries for Windows, macOS and Linux</li></ul><p>QB64 Phoenix Edition (QB64 PE) is a fresh offshoot of the original QB64 project, which seemed to die out in the early 2020s. The project’s goal is to keep the spirit of the old application alive and to provide more people with access to running BASIC on their computers. QB64 PE is cross-platform and it has compatibility with QBasic and QuickBasic 4.5 code. But QB64 PE also gives us an extended BASIC and OpenGL, meaning that we can create applications/games with graphics and sound.</p><p>So let's take a look at QB64 PE and create our own BASIC project.</p><h2 id="getting-started-with-qb64-pe">Getting Started with QB64 PE</h2><p>It really couldn’t be any simpler to get started with QB64 PE.</p><p><strong>1. Go to the </strong><a href="https://www.qb64phoenix.com/"><u><strong>QB4 PE project page</strong></u></a><strong> and download the package for your operating system.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1022px;"><p class="vanilla-image-block" style="padding-top:33.46%;"><img id="stkPJXAqq3TYA7d25LzWpS" name="qb1" alt="BASIC 2025" src="https://cdn.mos.cms.futurecdn.net/stkPJXAqq3TYA7d25LzWpS.jpg" mos="" align="middle" fullscreen="" width="1022" height="342" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. Extract the file to a directory.</strong></p><p><strong>3. Navigate to that directory and double left click on the qb64pe.exe application.</strong></p><figure role="gallery"><figure><img src="https://cdn.mos.cms.futurecdn.net/SFtZoFMytDTRNub5gVW8oS.jpg" alt="BASIC 2025" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/PYVZv3eqgfso4CS7XEBssS.jpg" alt="BASIC 2025" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure></figure><p>The QB64 PE user interface is very much like QBasic. We have the menu at the top, the coding area in the middle, and a status/output/debugging area at the bottom. Our project will see us working with the File and Run menu.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1274px;"><p class="vanilla-image-block" style="padding-top:109.26%;"><img id="gNtNq8QMX27GSGtWKHJKrS" name="qb3.JPG" alt="BASIC 2025" src="https://cdn.mos.cms.futurecdn.net/gNtNq8QMX27GSGtWKHJKrS.jpg" mos="" align="middle" fullscreen="" width="1274" height="1392" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>On first boot, QB64 PE will tell us that the application and any executables made by it can be falsely identified by your anti-virus package. You can optionally whitelist the directory, but I have not had any issues in my testing.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1262px;"><p class="vanilla-image-block" style="padding-top:103.65%;"><img id="88yjGmNbfvkDgS8j9ggA6T" name="wiki" alt="BASIC 2025" src="https://cdn.mos.cms.futurecdn.net/88yjGmNbfvkDgS8j9ggA6T.jpg" mos="" align="middle" fullscreen="" width="1262" height="1308" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>QB64 PE is an awesome application, and I urge you to dig into the <a href="https://qb64phoenix.com/qb64wiki/index.php/Main_Page"><u>gloriously in-depth documentation</u></a> (which is where I found how to show images) and learn more about QB64 PE.</p><h2 id="a-short-history-of-basic">A short history of BASIC</h2><p>The BASIC language has been with us since 1964, and it was developed as a high-level (easy-to-read) language by John G Kemeny, chairman of the Dartmouth College Math Department. The name BASIC came from Thomas Kurtz. </p><p>The structure of BASIC is meant to be over-simplified on purpose. Each line of BASIC is read by the compiler and turned into bytecode, which the machine can then run. But BASIC can be compiled or interpreted, depending on the version you are using. For example, on the Commodore 64, we see Commodore 64 BASIC V2, a version of Microsoft BASIC, which has a limited number of keywords.</p><h2 id="the-project-goal-to-make-a-simple-game">The Project Goal: To Make A Simple Game</h2><p>Learning BASIC, or any coding language, really, is best done by creating a project. I could sit here and teach you about core programming concepts, or we could have some fun and make a simple game. The game in question is inspired by Usborne’s 1980s BASIC coding books, specifically Computer Space Games, which I adored as a child.</p><p>The game is “Escape from planet LXF329,” and the goal of the game is to take off and escape a group of aliens who are trying to capture the spaceship. Essentially, this is a number-guessing game, but with a sci-fi theme. </p><ul><li>Learn the BASIC syntax</li><li>Learn how to display images</li><li>Use conditional statements</li><li>Create variables for integers and strings</li><li>Get user input</li></ul><p>You may have spotted “Learn how to display images,” and yes, I will show you how to display a static image on the screen using QB64 PE. In the interest of full disclosure, the images used in the game were generated using Adobe Firefly, an AI service. Why? I could’ve used stock images or spent some time in GIMP and Inkscape, but I didn’t have the time, nor the talent, so Adobe Firefly did the work for me. </p><p>We’ll start by creating the starting screen, an image that advertises the game and sets the scene.</p><p><strong>1. Create a new blank document and click on File >> Save and save the project as space.bas.</strong> Remember to save often.</p><p>2. Create a new screen object, setting the screen to 1024 x 1024 pixels and 32-bit color, then set the window title to ESCAPE FROM PLANET LXF329”.</p><pre class="line-numbers language-basic" language="basic" ><code>Screen _NewImage(1024, 1024, 32)_Title "ESCAPE FROM PLANET LXF329"</code></pre><p><strong>3. Create a variable, myImage& and store your image.</strong></p><pre class="line-numbers language-basic" language="basic" ><code>myImage& = _LoadImage("title.png")</code></pre><p><strong>4. Create an error handler to check that the image has been loaded correctly.</strong> This is basically a conditional check that checks for the loaded file in the variable. If there is nothing there, 0, then it will print an error message.</p><pre class="line-numbers language-basic" language="basic" ><code>If myImage& = 0 Then    Print "Error loading image!"    EndEnd If</code></pre><p><strong>5. Put the image onto the screen at position 0,0 (top left) then pause the code, waiting for the user to press a key.</strong></p><pre class="line-numbers language-basic" language="basic" ><code>_PutImage (0, 0), myImage&Sleep</code></pre><p><strong>6. Save the code, and click on Run >> run Only (no EXE) to start the code. Click OK in the dialog to start.</strong> You should see the image appear on the screen. <strong>Press any key to close the window.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1279px;"><p class="vanilla-image-block" style="padding-top:109.30%;"><img id="pRxWSaRuacNynXdW5qY73T" name="qb5" alt="BASIC 2025" src="https://cdn.mos.cms.futurecdn.net/pRxWSaRuacNynXdW5qY73T.jpg" mos="" align="middle" fullscreen="" width="1279" height="1398" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>7. Create a label, START: </strong>Labels enable us to write code that can jump around to different sections by using a Go To command. You may be familiar with using numbers and jumping to a numbered line. Here ,we are not using numbers, so labels will do the same job.</p><pre class="line-numbers language-basic" language="basic" ><code>START:</code></pre><p><strong>8. To begin the game code, clear the screen (CLS) and then use a series of print statements to print a narrative</strong> to get the reader up to speed on the game mechanics and story.</p><pre class="line-numbers language-basic" language="basic" ><code>ClsPrint "ESCAPE FROM PLANET LXF329"Print "Your vessel, the USS TOMSHARDWARE has landed on LXF329"Print "on a routine survey mission"PrintPrint "But the evil aliens, led by HOAL are after your blood!"PrintPrint "Calculate the thrust necessary to take-off and escape"Print "the planet's gravity!"PrintPrint "You only have ten seconds until the aliens burst into"Print "the starship and lay waste to your crew!"</code></pre><p><strong>9. Ensure that the game uses pseudo-random numbers.</strong> If we don’t do this then the game will pick the same numbers each time. </p><pre class="line-numbers language-basic" language="basic" ><code>Randomize Timer</code></pre><p><strong>10. Create two variables</strong>, g (gravity) and w (weight), which are random integers, multiplied by 20 and 40, respectively. BASIC uses LET to create variables.</p><pre class="line-numbers language-basic" language="basic" ><code>Let g = Int(Rnd * 20)Let w = Int(Rnd * 40)</code></pre><p><strong>11. Create a third variable to store the correct thrust to leave the planet.</strong></p><pre class="line-numbers language-basic" language="basic" ><code>Let r = g * w</code></pre><p><strong>12. For debug purposes, print the answer to the screen. </strong>Later, comment this out using the REM (remark) keyword.</p><pre class="line-numbers language-basic" language="basic" ><code>Print r</code></pre><p>Change to this for the final game</p><pre class="line-numbers language-basic" language="basic" ><code>REM Print r</code></pre><p><strong>13. Print the planet’s gravity and then ask the user to make their thrust calculation.</strong></p><pre class="line-numbers language-basic" language="basic" ><code>Print "Planet Gravity = "; gPrint "Type in thrust to escape: "</code></pre><p><strong>14. Using a for loop, we give the player ten guesses before the aliens enter the ship.</strong></p><pre class="line-numbers language-basic" language="basic" ><code>For c = 1 To 10</code></pre><p><strong>15. Stored the player’s guess in a variable, f.</strong> That value is compared to the answer, r. If the thrust is too high or low, the for loop repeats until the player runs out of guesses. If the guess is correct, then the game goes to the ENDGAME label.</p><pre class="line-numbers language-basic" language="basic" ><code>For c = 1 To 10    Input f    If f > r Then Print "Thrust too high";    If f < r Then Print "Thrust too low";    If f = r Then GoTo ENDGAMENext c</code></pre><p><strong>16. Print “the bad ending” to the screen. </strong>This section runs if the player fails to make the correct calculations, and then the for loop ends, throwing the user into this nightmare scenario.</p><pre class="line-numbers language-basic" language="basic" ><code>PrintPrint "The aliens have entered the starship and you and your"Print "crew are now their prisoners!"Print</code></pre><p><strong>17. Add a graphic to show your ship losing against the alien onslaught.</strong> You will need to create a PNG file, stored in the same directory as the game file. This is the same code as used for the start screen. Sleeping for 5 is important; otherwise, there is a bug where the screen automatically closes and ends the game.</p><pre class="line-numbers language-basic" language="basic" ><code>Screen _NewImage(1024, 1024, 32)_Title "YOU DIED!"myImage& = _LoadImage("die.png")If myImage& = 0 Then    Print "Error loading image!"    EndEnd If_PutImage (0, 0), myImage&Sleep 5</code></pre><p><strong>18. Using a GoTo, send the player to the REPLAY section of code.</strong></p><pre class="line-numbers language-basic" language="basic" ><code>GoTo REPLAY</code></pre><p><strong>19. Print a message to the user to say that they have won. Then show an image on the screen.</strong> The ENDGAME label is where the successful player is sent.<strong> </strong>They are rewarded with a message and an escape image showing them blasting off into space!</p><pre class="line-numbers language-basic" language="basic" ><code>Print "You have successfully taken off!"Print "The aliens burn in the wake of your engines"Screen _NewImage(1024, 1024, 32)_Title "YOU WON!"myImage& = _LoadImage("escape.png")If myImage& = 0 Then    Print "Error loading image!"    EndEnd If_PutImage (0, 0), myImage&Sleep 5</code></pre><p><strong>20. Create a means to ask the player if they would like to try again.</strong> The player’s input is stored as a variable, a. But note that the variable contains a string ($) which can be y or n. If it is y, the game goes back to the START label. Otherwise, the game stops. We use the REPLAY label to identify what the code is for and to direct the player through the game.</p><pre class="line-numbers language-basic" language="basic" ><code>REPLAY:Print "Would you like to try again? Press y or n"Input a$If a$ = "y" Then    GoTo STARTElse    StopEnd If</code></pre><p><strong>21. Save the code, and click on Run >> run Only (no EXE) to start the code. Click OK in the dialog to start.</strong></p><p><strong>22. Run the game a few times, win and lose.</strong> Remember that the answer is printed to the screen, so make sure to comment that out when letting your friends have a go.</p><h2 id="complete-code-listing">Complete Code Listing</h2><pre class="line-numbers language-basic" language="basic" ><code>Screen _NewImage(1024, 1024, 32)_Title "ESCAPE FROM PLANET LXF329"myImage& = _LoadImage("title.png")If myImage& = 0 Then    Print "Error loading image!"    EndEnd If_PutImage (0, 0), myImage&SleepSTART:ClsPrint "ESCAPE FROM PLANET LXF329"Print "Your vessel, the USS TOMSHARDWARE has landed on LXF329"Print "on a routine survey mission"PrintPrint "But the evil aliens, led by HOAL are after your blood!"PrintPrint "Calculate the thrust necessary to take-off and escape"Print "the planet's gravity!"PrintPrint "You only have ten seconds until the aliens burst into"Print "the starship and lay waste to your crew!"Randomize TimerLet g = Int(Rnd * 20)Let w = Int(Rnd * 40)Let r = g * wPrint rPrint "Planet Gravity = "; gPrint "Type in thrust to escape: "For c = 1 To 10    Input f    If f > r Then Print "Thrust too high";    If f < r Then Print "Thrust too low";    If f = r Then GoTo ENDGAMENext cPrintPrint "The aliens have entered the starship and you and your"Print "crew are now their prisoners!"PrintScreen _NewImage(1024, 1024, 32)_Title "YOU WON!"myImage& = _LoadImage("die.png")If myImage& = 0 Then    Print "Error loading image!"    EndEnd If_PutImage (0, 0), myImage&Sleep 5GoTo REPLAYENDGAME:Print "You have successfully taken off!"Print "The aliens burn in the wake of your engines"Screen _NewImage(1024, 1024, 32)_Title "YOU WON!"myImage& = _LoadImage("escape.png")If myImage& = 0 Then    Print "Error loading image!"    EndEnd If_PutImage (0, 0), myImage&Sleep 5REPLAY:Print "Would you like to try again? Press y or n"Input a$If a$ = "y" Then    GoTo STARTElse    StopEnd If</code></pre><h2 id="sharing-your-work">Sharing your work!</h2><p>If you want to share the game with your friends, then you can! Just bear in mind that the resulting executable is bound to the OS it was created with. Additionally, as QB64 PE notes, your executable may be flagged as a false positive by your antivirus.</p><p><strong>1. Click on Run >> Make EXE Only. You can also click on Run >> Start to compile and run the code. This way you get both the executable, and the code will run in the editor.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:548px;"><p class="vanilla-image-block" style="padding-top:49.82%;"><img id="imjPFBbd2XWxRMRbZSSCpS" name="exe1" alt="BASIC 2025" src="https://cdn.mos.cms.futurecdn.net/imjPFBbd2XWxRMRbZSSCpS.jpg" mos="" align="middle" fullscreen="" width="548" height="273" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. Click OK to compile the executable into the qb64pe folder</strong>, the same folder where QB64 PE is being run.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:585px;"><p class="vanilla-image-block" style="padding-top:32.48%;"><img id="JYqzN67e9BnXw6tBYv99nS" name="exe2" alt="BASIC 2025" src="https://cdn.mos.cms.futurecdn.net/JYqzN67e9BnXw6tBYv99nS.jpg" mos="" align="middle" fullscreen="" width="585" height="190" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>3. Wait for the code to compile. Check the status bar at the bottom of the screen to monitor the progress.</strong> On modern systems this will take seconds.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1270px;"><p class="vanilla-image-block" style="padding-top:16.77%;"><img id="yWBBvsYVU3j8v8nNtomHpS" name="exe3" alt="BASIC 2025" src="https://cdn.mos.cms.futurecdn.net/yWBBvsYVU3j8v8nNtomHpS.jpg" mos="" align="middle" fullscreen="" width="1270" height="213" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>4. Navigate to the folder with the compiled game code.</strong> I scanned my compiled code using Microsoft Defender and Malwarebytes, and nothing nasty was found.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1024px;"><p class="vanilla-image-block" style="padding-top:70.31%;"><img id="u7sLFfo7sJMiPr6vg2KXpS" name="exe4.JPG" alt="BASIC 2025" src="https://cdn.mos.cms.futurecdn.net/u7sLFfo7sJMiPr6vg2KXpS.jpg" mos="" align="middle" fullscreen="" width="1024" height="720" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>5. Double click on the executable to run the game.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1272px;"><p class="vanilla-image-block" style="padding-top:54.01%;"><img id="VLUzeJjeHe6GTGmqGwMVFT" name="game-small" alt="BASIC 2025" src="https://cdn.mos.cms.futurecdn.net/VLUzeJjeHe6GTGmqGwMVFT.gif" mos="" align="middle" fullscreen="" width="1272" height="687" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="caption-text">The images used in the game are AI generated using Adobe Firefly </span><span class="credit" itemprop="copyrightHolder">(Image credit: The images used in the game are AI generated using Adobe Firefly)</span></figcaption></figure>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ DOOM multiplayer tribute gets coded in 'pure SQL' and runs at 30FPS — made from just 150 lines of code in less than a month ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/video-games/retro-gaming/doom-multiplayer-tribute-gets-coded-in-pure-sql-and-runs-at-30fps-made-from-just-150-lines-of-code-in-less-than-a-month</link>
                                                                            <description>
                            <![CDATA[ A computer scientist used only 'pure SQL' to construct a multiplayer DOOM-like game that runs at 30 FPS. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">U3VsavE2izDthFCSenKoYU</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/ApDtixEfKVx9xzQNyTMifE-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Thu, 11 Sep 2025 15:44:44 +0000</pubDate>                                                                                                                                                                                                                                <category><![CDATA[Retro Gaming]]></category>
                                                    <category><![CDATA[Video Games]]></category>
                                                                                                                    <dc:creator><![CDATA[ Mark Tyson ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/56vqMYLDaKRHPhHZgbADFR.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Mark&#039;s enthusiasm for computers dampened at an early age by the rubber-keyed Sinclair Spectrum 48K and feelings of Commodore 64 envy. However, in the mid-80s, hope in a digital future was rekindled by the purchase of an Atari 520 STe. Since that time Mark has used a multitude of computers for fun and professional endeavors. He often owned both Macs and PCs but went cold on the former after OS9 was killed off, and warmed to the latter with the introduction of Windows XP.&lt;br&gt;
&lt;br&gt;
Early work years were spent in artwork and reprographics but in the late noughties, Mark started to blog about computers, Taiwanese food culture, and guitar design. This activity led to a full-time position writing about breaking PC tech news for HEXUS, for the best part of a decade. When HEXUS was abruptly closed, Mark helped with the foundation of Club386, before finding a new home at Tom&#039;s Hardware.&lt;br&gt;
&lt;br&gt;
When not wearing through the keycap legends on his PC keyboards, Mark can be found wandering the computer malls of Taiwan&#039;s neon-lit conurbations and enjoying local and international cuisine.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/ApDtixEfKVx9xzQNyTMifE-1280-80.jpg">
                                                            <media:credit><![CDATA[Lukas Vogel]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[DOOMQL ]]></media:description>                                                            <media:text><![CDATA[DOOMQL ]]></media:text>
                                <media:title type="plain"><![CDATA[DOOMQL ]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/ApDtixEfKVx9xzQNyTMifE-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>A computer scientist used only “pure SQL” to construct a multiplayer DOOM-like game. The resulting first-person shooter game, cobbled from a mere ~150 lines of Python code, is dubbed <a href="https://cedardb.com/blog/doomql/">DOOMQL</a>. Despite the self-imposed software architecture restrictions, Lukas Vogel, co-founder of database performance outfit CedarDB, says DOOMQL plays at “a breezy ~30 FPS.” It isn’t the most graphically splendid DOOM-inspired game, though.</p><p>Vogel’s SQL-powered DOOM dreams were precipitated by Patrick Trainer’s <a href="https://github.com/patricktrainer/duckdb-doom">DuckDB-DOOM</a>. This earlier experiment in code also sought to create a DOOM-like first-person shooter in SQL. However, Trainer's code, which runs in a single web page in a browser using WebAssembly, also uses JavaScript for rendering and inputs.</p><p>Other key differences in DOOMQL and the DuckDB-DOOM clone are that the former is a multiplayer effort, with SQL used for both rendering and input, achieving ~30 FPS at 128 x 64 pixels resolution. Vogel says, without a hint of scorn regarding Trainer’s efforts, that “having parts of the rendering pipeline in JavaScript felt like cheating.” Despite the ‘cheating,’ the DuckDB-DOOM clone only runs at around 8 FPS, and it uses a lower resolution. Making Vogel’s feat all the more impressive is the claim that he coded DOOMQL during a single month while on parental leave. </p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1920px;"><p class="vanilla-image-block" style="padding-top:56.25%;"><img id="jyZ6qemREyRCbtztwSdxfE" name="DOOMQL-2" alt="DOOMQL" src="https://cdn.mos.cms.futurecdn.net/jyZ6qemREyRCbtztwSdxfE.jpg" mos="" align="middle" fullscreen="1" width="1920" height="1080" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/jyZ6qemREyRCbtztwSdxfE.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="caption-text">“WASD to move, X to shoot, Q to quit”  </span><span class="credit" itemprop="copyrightHolder">(Image credit: <a href="https://cedardb.com/blog/doomql/" target="_blank">Lukas Vogel</a>)</span></figcaption></figure><p>You can deep dive into Vogel’s SQL-powered DOOM via the linked blog post, and check out the code on GitHub. For a brief overview of the game architecture, though, it can be surmised at the high-level by the following quartet of bullet-points:</p><ul><li>State lives in tables (map, players, mobs, inputs, configs, sprites, …)</li><li>Rendering is a stack of SQL views that implement raycasting and sprite projection.</li><li>The game loop is a tiny shell script that executes a SQL file ~ 30 times per second.</li><li>The client is ~ 150 lines of Python: It polls for input and queries the database for your 3D view.</li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How to make graphical Python apps the EasyGUI way ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/software/python/how-to-make-graphical-python-apps-the-easygui-way</link>
                                                                            <description>
                            <![CDATA[ Amidst a forest of GUI framework choices, EasyGUI takes its name to heart and provides an exceptionally straightforward means to create your own graphical Python applications. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">KSmEpkQj7osvhvUaN9X9Dg</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/J6QDDUzXJ2n3yeKAPUcVLn-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Wed, 10 Sep 2025 11:00:00 +0000</pubDate>                                                                                                                                                                                                                                <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/J6QDDUzXJ2n3yeKAPUcVLn-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Easygui]]></media:description>                                                            <media:text><![CDATA[Easygui]]></media:text>
                                <media:title type="plain"><![CDATA[Easygui]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/J6QDDUzXJ2n3yeKAPUcVLn-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>When it comes to making GUI (Graphical User Interface) applications with Python, we are truly spoilt for choice. We have Tkinter, PyGame, GUIZero, and my personal favourite, <a href="https://pypi.org/project/easygui/"><u>EasyGUI</u></a>.</p><p>EasyGUI is old; I was using it to teach Python back in 2015! But, as the name suggests, it's easy to use, and that is why I am still using it over a decade later. It just works across multiple operating systems, and I don’t need to get bogged down in the details of specifying the size and position of a dialog. I just tell EasyGUI that I want a specific type of dialog, and it creates it using the title, message, and interface that I specify. You may be heading to the comments to tell me that PyGame, GUIZero, or some other GUI toolkit is better. If so, please do share your knowledge. We learn by sharing, and I would love to hear your preference.</p><p>I also like it because it has a lot of different dialog options, many of which are common across the many applications that we take for granted!</p><p>I’ve taken a few screenshots to illustrate.</p><figure role="gallery"><figure><img src="https://cdn.mos.cms.futurecdn.net/cVuXqe4nVvGnijBhDzcPym.jpg" alt="Easygui" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/GX9ee7it6h43aQctefA7vm.jpg" alt="Easygui" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/zUdrWV8kAvGVYz7zBhyHxm.jpg" alt="Easygui" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/bL87tHSk3jRn5Qh6R67Gym.jpg" alt="Easygui" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/eaMqJxLshGhQz6GKwGMbym.jpg" alt="Easygui" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/Q96eJ2QbdYus4GyTpfVLxm.jpg" alt="Easygui" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure></figure><p>To see all of the options, we first need to install EasyGUI. For this how to you will need Python installed on your computer. We’ve got a <a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11"><u>guide for Windows machines</u></a>, but Linux users should already have it installed.</p><p>1. <strong>Open a Command Prompt / Terminal.</strong> Windows users can find this via the Start menu.</p><p>2. <strong>Use pip to install EasyGUI. </strong>Pip is Python’s built-in package manager.</p><pre class="line-numbers language-bash" language="bash" ><code>pip.exe install easygui</code></pre><p>3. <strong>Start the Python interpreter.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>python -i</code></pre><p>4. <strong>Import the EasyGUI module.</strong> I shortened the name of EasyGUI to eg when I imported the module. It makes it easier to use.</p><pre class="line-numbers language-bash" language="bash" ><code>import easygui as eg</code></pre><p>5. <strong>Call the demo function to see all of the different dialog options. Close the dialog window to end the demo.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>eg.egdemo()</code></pre><p>To create a dialog, first specify the type of dialog, then pass the parameters. Take, for example, this simple button box which has a title, msg, and choice. The title refers to the dialog’s title, the msg is the message to the user, and the choices are a Python list of options, which become buttons. Clicking on a choice will print the choice to the Python shell, or we can save it to a variable for later use.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1270px;"><p class="vanilla-image-block" style="padding-top:47.40%;"><img id="XKjSsEhFAnjoAKoKFwQohh" name="choices" alt="Easygui" src="https://cdn.mos.cms.futurecdn.net/XKjSsEhFAnjoAKoKFwQohh.gif" mos="" align="middle" fullscreen="" width="1270" height="602" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="the-project-a-to-do-list-in-python">The Project: A To-Do list in Python</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:676px;"><p class="vanilla-image-block" style="padding-top:52.37%;"><img id="qDMxjJS9aFRDeuwZYjpLym" name="to-do-menu.JPG" alt="Easygui" src="https://cdn.mos.cms.futurecdn.net/qDMxjJS9aFRDeuwZYjpLym.jpg" mos="" align="middle" fullscreen="" width="676" height="354" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>Our goal is simple: create a to-do app that will keep us on track. The app will be written in Python, and use a GUI to make it easier for the end user. The to-do list will be saved to an external file using JSON. Python can easily work with JSON, thanks to the JSON module.</p><figure role="gallery"><figure><img src="https://cdn.mos.cms.futurecdn.net/pWX6heP3GZ9NZRXVPpqLxm.jpg" alt="Easygui" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/sM3VdgabcXkFDGg3WFEAvm.jpg" alt="Easygui" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/G2MTe6NxhaPjRvwp54nHym.jpg" alt="Easygui" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure></figure><h2 id="so-what-are-we-going-to-do">So what are we going to do?</h2><ul><li>Download and install the EasyGUI Python module.</li><li>Write Python code in a text editor.</li><li>Import the EasyGUI Python module, along with modules to write the tasks to a file using JSON format.</li><li>Create functions to handle viewing, creating and deleting tasks.</li><li>Test that the app works.</li></ul><p>I’m going to assume that you have Python and the EasyGUI module installed, so let's open a text editor and start writing code. I’ll be using Notepad++ on my Windows 10 PC.</p><p>1. <strong>Open a text editor and create a new blank file. Save the file as </strong><a href="http://to-do.py"><u><strong>to-do.py</strong></u></a><strong> and remember to save often. I’m using Notepad++, but any text editor will do the job.</strong></p><p>2. <strong>Import the easygui module and then the modules for using JSON and working with the underlying OS.</strong> Remember to rename EasyGUI as you import it for an easier means of calling the module.</p><pre class="line-numbers language-bash" language="bash" ><code>import easygui as egimport jsonimport os</code></pre><p>3. <strong>Create a variable called “filename” to store the name of the JSON file that contains the to-do list.</strong> This can be a file anywhere on your system, but in this case it is a file in the same directory as the <a href="http://to-do.py"><u>to-do.py</u></a> file.</p><pre class="line-numbers language-bash" language="bash" ><code>filename = "todo_list.json"</code></pre><p>4. <strong>Create a function to load the to-do tasks saved in the JSON file.</strong> If the file exists (os.path.exists), then the function will return the contents. If there is no file, then it will return a blank list ( [ ] ).</p><pre class="line-numbers language-bash" language="bash" ><code>def load_tasks():    if os.path.exists(filename):        with open(filename, "r") as f:            return json.load(f)    else:        return []</code></pre><p>5. <strong>Create a function to save the to-do tasks into the JSON file. </strong>We open the file and overwrite the existing contents with the new list, which is formatted into a JSON structure.</p><pre class="line-numbers language-bash" language="bash" ><code>def save_tasks(tasks):    with open(filename, "w") as f:        json.dump(tasks, f)</code></pre><p>6. <strong>Call the load_tasks function and store the output (what the Python function returns) into a variable called tasks. </strong>The load_tasks function will either return the existing to-dos stored in the JSON file, or create a blank Python list.</p><pre class="line-numbers language-bash" language="bash" ><code>tasks = load_tasks()</code></pre><p>7. <strong>Create a while True loop to run the code until the user exits.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>while True:</code></pre><p>8. <strong>Using EasyGUI, create a variable called “choice” and in there we store the user’s response to a button box.</strong> The first line is the text that is displayed to the user, note the \n which is Python for new line. The second line is the title of the dialog box. Image can be any GIF image that you choose. Finally, the choices are stored in a Python list, and they become clickable buttons that return the chosen value, stored in the variable “choice.”</p><pre class="line-numbers language-bash" language="bash" ><code>  choice = eg.buttonbox(        msg="What would you like to do?\nSelect an option below",        title="To-Do List",        image="clipboard.gif",        choices=["View Tasks", "Add Task", "Remove Task", "Exit"]    )</code></pre><p>9. <strong>Create a conditional test, based on the user’s response to the button box.</strong> If their choice was to view the current tasks and there are tasks in the JSON file, display them using an EasyGUI textbox. Else, tell the user that there are no tasks to display, again using a textbox.</p><pre class="line-numbers language-bash" language="bash" ><code>    if choice == "View Tasks":        if tasks:            eg.textbox("Your Tasks:", "To-Do List", "\n".join(tasks))        else:            eg.msgbox("No tasks yet!", "To-Do List")</code></pre><p>10. <strong>Create the second choice in the conditional test which activates if the user selects “Add Task” from the button box.</strong> This creates a variable, task, that stores the user’s input via an EasyGUI enterbox. Then it appends the tasks object (a list) and calls the save_tasks functions to write the list into the JSON file. Finally, a message box confirms that the tasks have been added.</p><pre class="line-numbers language-bash" language="bash" ><code>   elif choice == "Add Task":        task = eg.enterbox("Enter a new task:", "Add Task")        if task:            tasks.append(task)            save_tasks(tasks)            eg.msgbox("Task added!", "To-Do List")</code></pre><p>11. <strong>Create the next choice, which activates when a user selects to “Remove Task”.</strong> If there are tasks to remove, an EasyGUI choicebox will advise the user to select a task for removal. Then a nested if condition will remove the task from the task list (a Python list of the tasks), and then tell the user that the task has been removed. If there are no tasks to remove, then an EasyGUI message box will tell the user. </p><pre class="line-numbers language-bash" language="bash" ><code>   elif choice == "Add Task":        task = eg.enterbox("Enter a new task:", "Add Task")        if task:            tasks.append(task)            save_tasks(tasks)            eg.msgbox("Task added!", "To-Do List")</code></pre><p>12. <strong>Using an else condition, create a break in the code to exit the app.</strong> This is effectively our quit / exit button.</p><pre class="line-numbers language-bash" language="bash" ><code>   else:        break</code></pre><p>13. <strong>Save the code.</strong></p><p>14. <strong>Open a Command Prompt window and navigate to the location of the to-do app.</strong></p><p>15. <strong>Run the to-do app using Python and test out the functions of the app. You’ve just built a graphical application using EasyGUI and Python.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>python to-do.py</code></pre><p>If you want to make a true GUI application, one that has its own icon and doesn’t need the Command Prompt to run, then <a href="https://www.tomshardware.com/how-to/create-python-executable-applications"><u>follow this guide</u></a> and use your <a href="http://to-do.py"><u>to-do.py</u></a> file instead of the example code.</p><h2 id="complete-code-listing-2">Complete Code Listing</h2><pre class="line-numbers language-bash" language="bash" ><code>import easygui as egimport jsonimport osfilename = "todo_list.json"def load_tasks():    if os.path.exists(filename):        with open(filename, "r") as f:            return json.load(f)    else:        return []def save_tasks(tasks):    with open(filename, "w") as f:        json.dump(tasks, f)tasks = load_tasks()while True:    choice = eg.buttonbox(        msg="What would you like to do?\nSelect an option below",        title="To-Do List",        image="clipboard.gif",        choices=["View Tasks", "Add Task", "Remove Task", "Exit"]    )    if choice == "View Tasks":        if tasks:            print(tasks)            eg.textbox("Your Tasks:", "To-Do List", "\n".join(tasks))        else:            eg.msgbox("No tasks yet!", "To-Do List")    elif choice == "Add Task":        task = eg.enterbox("Enter a new task:", "Add Task")        if task:            tasks.append(task)            save_tasks(tasks)            eg.msgbox("Task added!", "To-Do List")    elif choice == "Remove Task":        if tasks:            task_to_remove = eg.choicebox(                "Select a task to remove:",                "Remove Task",                tasks            )            if task_to_remove:                tasks.remove(task_to_remove)                save_tasks(tasks)                eg.msgbox("Task removed!", "To-Do List")        else:            eg.msgbox("No tasks to remove!", "To-Do List")    else:        break</code></pre>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ JavaScript packages with billions of downloads were injected with malicious code in world's largest supply chain hack, geared to steal crypto — a phishing email is all it took to undermine npm packages ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/tech-industry/cyber-security/javascript-packages-with-billions-of-downloads-were-injected-with-malicious-code-in-worlds-largest-supply-chain-hack-geared-to-steal-crypto-a-phishing-email-is-all-it-took-to-undermine-npm-packages</link>
                                                                            <description>
                            <![CDATA[ JavaScript packages with billions of downloads were compromised by an unknown threat actor looking to steal cryptocurrency. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">VKCrqxojWmdJCJH6jUxLnS</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/wtxYoWaQRG3RnuMspcogx7-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Tue, 09 Sep 2025 14:49:29 +0000</pubDate>                                                                                                                                <updated>Tue, 09 Sep 2025 15:43:50 +0000</updated>
                                                                                                                                            <category><![CDATA[Cyber Security]]></category>
                                                    <category><![CDATA[Tech Industry]]></category>
                                                                                                                    <dc:creator><![CDATA[ Nathaniel Mott ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/hEFeUwJHtzVDWEZTcjDqt9.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Nathaniel has been writing about various aspects of the technology industry, from startups and cybersecurity to social media and enthusiast hardware, since 2011. Lately, he spends his time writing and spending time with his family.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/wtxYoWaQRG3RnuMspcogx7-1280-80.jpg">
                                                            <media:credit><![CDATA[Shutterstock]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[shutterstock_2210295717]]></media:description>                                                            <media:text><![CDATA[shutterstock_2210295717]]></media:text>
                                <media:title type="plain"><![CDATA[shutterstock_2210295717]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/wtxYoWaQRG3RnuMspcogx7-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>A total of 18 JavaScript packages that have over 2 billion weekly downloads have been injected with malicious code in what is billed as the largest supply chain hack in history. The compromised code was designed to steal cryptocurrency.</p><p>Picture this: Thanos, a Death-obsessed maniac retconned within the Marvel Cinematic Universe to be the most radical environmental activist in history, has assembled the Infinity Gauntlet. With it, he could wipe out half the universe's population. He raises his hand, snaps his fingers, and... steals a bunch of cryptocurrency instead. The Infinity Gauntlet would still be a problem, sure, but wouldn't that first snap come as a relief?</p><p>That's kind of how the recent compromise of JavaScript packages that have been downloaded billions of times feels. Does the ease with which an unknown threat actor was able to compromise the maintainer of these packages, modify the software, and distribute it highlight the disastrous state of modern software development? Absolutely. But we're lucky—they prioritized getting rich over wreaking havoc.</p><p>Here's what happened. Aikido <a href="https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised" target="_blank">said</a> yesterday that 18 packages "were updated to contain a piece of code that would be executed on the client of a website, which silently intercepts crypto and web3 activity in the browser, manipulates wallet interactions, and rewrites payment destinations so that funds and approvals are redirected to attacker-controlled accounts without any obvious signs to the user."</p><p>The packages in question are distributed via npm, GitHub's package manager and registry for the Node.js ecosystem, and they are collectively downloaded approximately 2 billion times per week. In theory, the hacker could have used the ability to modify these packages to do anything; Aikido said they opted to attempt to steal "Ethereum, Bitcoin, Solana, Tron, Litecoin, and Bitcoin Cash."</p><p>We don't know how far these malicious packages spread. The packages themselves are downloaded billions of times a week, but that's at least partly a byproduct of software build systems constantly fetching and re-fetching a project's dependencies. There's no denying these packages are popular, though, and organizations whose software depends on them should make sure they aren't using the malicious releases.</p><p>But was this at least the result of a sophisticated attack? No. The maintainer of these packages (who, it should be noted, uses the handle "bad-at-computer" on Bluesky) <a href="https://bsky.app/profile/bad-at-computer.bsky.social/post/3lydje4zqis2y" target="_blank">said</a> they received a two-factor authentication reset email that "looked very legitimate" from "support@npmjs.help" and thought it was benign. It wasn't. All it took to pull off a hack of this scale was a domain name, an email, and the willingness to try.</p><p>This isn't a new problem, nor is it exclusive to npm. I <a href="https://readme.synack.com/the-internet-is-hooked-on-packages.-hackers-have-noticed" target="_blank">reported</a> in 2021 that hackers were targeting maintainers of packages used by JavaScript, Python, Ruby, and Java developers in their own software, and even then, the problem had been known for years. The infamous <a href="https://en.wikipedia.org/wiki/Npm_left-pad_incident" target="_blank">left-pad incident</a>—wherein the deletion of 11 lines of code "broke the internet" because so much software depended on it—happened in 2016.</p><p>The industry has been attempting to address this problem by encouraging the use of software bills of materials (SBOMs), requiring maintainers of widely used packages to secure their accounts with two-factor authentication, etc. Yet this incident proves that these measures are not enough. Until the commonly accepted processes of developing, maintaining, and releasing software change, these problems will persist.</p><p>This time, the Infinity Gauntlet was used to steal cryptocurrency. Will the next Thanos snap their fingers with the same intention? And which is going to come first, the snap that causes far more damage than a crypto thief, or the arrival of something that can finally stop that snapping altogether? Thanos claimed that he's inevitable; are we really just consigning ourselves to hoping that was only true on the silver screen?</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Apple MacBooks have a sensor that measures the angle of the screen —Engineer taps into hidden ‘LidAngleSensor’ API to create a creaky door simulator ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/software/developer-tools/engineer-taps-into-apples-hidden-lidanglesensor-api-to-create-a-creaky-door-simulator</link>
                                                                            <description>
                            <![CDATA[ An engineer has tapped into Apple’s LidAngleSensor MacBook API, adding a creaky door sound effect to his lid angle measurement app. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">YuWpPTkhFT8LEFqHmFpybG</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/tQYbdtJSZRcmKQryzsEaQn-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Mon, 08 Sep 2025 10:57:41 +0000</pubDate>                                                                                                                                <updated>Mon, 08 Sep 2025 12:59:17 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Mark Tyson ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/56vqMYLDaKRHPhHZgbADFR.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Mark&#039;s enthusiasm for computers dampened at an early age by the rubber-keyed Sinclair Spectrum 48K and feelings of Commodore 64 envy. However, in the mid-80s, hope in a digital future was rekindled by the purchase of an Atari 520 STe. Since that time Mark has used a multitude of computers for fun and professional endeavors. He often owned both Macs and PCs but went cold on the former after OS9 was killed off, and warmed to the latter with the introduction of Windows XP.&lt;br&gt;
&lt;br&gt;
Early work years were spent in artwork and reprographics but in the late noughties, Mark started to blog about computers, Taiwanese food culture, and guitar design. This activity led to a full-time position writing about breaking PC tech news for HEXUS, for the best part of a decade. When HEXUS was abruptly closed, Mark helped with the foundation of Club386, before finding a new home at Tom&#039;s Hardware.&lt;br&gt;
&lt;br&gt;
When not wearing through the keycap legends on his PC keyboards, Mark can be found wandering the computer malls of Taiwan&#039;s neon-lit conurbations and enjoying local and international cuisine.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/tQYbdtJSZRcmKQryzsEaQn-1280-80.jpg">
                                                            <media:credit><![CDATA[Sam Gold]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[LidAngleSensor.app in action]]></media:description>                                                            <media:text><![CDATA[LidAngleSensor.app in action]]></media:text>
                                <media:title type="plain"><![CDATA[LidAngleSensor.app in action]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/tQYbdtJSZRcmKQryzsEaQn-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>An engineer has tapped into Apple’s LidAngleSensor MacBook API to create an app which displays the angle read from the sensor on the screen. Though a cool and worthy tool in its own right, Sam Gold’s app is elevated to a higher plane as it also includes an audio feedback option to “play a wooden door creaking sound if you adjust it reeaaaaaal slowly.” A video demonstration is embedded below,</p><div class="see-more see-more--clipped"><blockquote class="twitter-tweet hawk-ignore" data-lang="en"><p lang="en" dir="ltr">Did you know your MacBook has a sensor that knows the exact angle of the screen hinge?It’s not exposed as a public API, but I figured out a way to read it and make it sound like an old wooden door. pic.twitter.com/qysTbr9TV4<a href="https://twitter.com/cantworkitout/status/1964428927159382261">September 6, 2025</a></p></blockquote><div class="see-more__filter"></div></div><p>Product designer and engineer, Gold, explained to their X followers that the LidAngleSensor API isn’t exposed to the public, but he still managed to figure out how to read it. A more technical explanation of the API, what devices use it, as well as downloads of the code and a ready-compiled app can be found <a href="https://github.com/samhenrigold/LidAngleSensor">on Github</a>.</p><p>Since the LidAngleSensor.app was announced at the weekend, Gold has fielded many queries and requests via social media. A pretty common question was why he had created this app. The answer seems to be that Gold currently has a lot of free time, but is eager to start something more meaningful and full-time “in NYC or remote.” So, perhaps this quirky project could precipitate a great job for this imaginative fellow.</p><p>Gold also tried to address various MacBook model incompatibilities, but he doesn’t have access to every modern Apple laptop. The creaky door sound source was revealed in a FAQ to be poached from <em>LEGO Batman 3: Beyond Gotham</em>.</p><h2 id="theremin-mode-delivered">Theremin mode delivered </h2><p>There have been lots of fun suggestions for adapting the LidAngleSensor.app for new sounds and purposes. These range from the practical, like a protractor mode for a wood shop, to the hilarious, like a <a href="https://www.tomshardware.com/news/nvidia-pac-man-gamegan-ai-machine-learning">Pac-Man</a> controller “where you have to open and close the laptop to move,” suggested by Gold.</p><p>However, Gold was emboldened and inspired enough by his own brainwave idea of creating a theremin mode to actually implement this elegant and ghostly electronic instrument in the app. </p><div class="see-more see-more--clipped"><blockquote class="twitter-tweet hawk-ignore" data-lang="en"><p lang="en" dir="ltr">you know what? screw it. theremin mode. https://t.co/LAYXtYszvW pic.twitter.com/XHWNLToc8u<a href="https://twitter.com/cantworkitout/status/1964464940049453153">September 6, 2025</a></p></blockquote><div class="see-more__filter"></div></div>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ The first AI-powered ransomware has been discovered — "PromptLock" uses local AI to foil heuristic detection and evade API tracking [Updated] ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/tech-industry/cyber-security/the-first-ai-powered-ransomware-has-been-discovered-promptlock-uses-local-ai-to-foil-heuristic-detection-and-evade-api-tracking</link>
                                                                            <description>
                            <![CDATA[ Security firm ESET has discovered a new type of ransomware that uses a local AI model to generate malicious scripts and perform other illicit activities. Because of the variance of LLM output, this malware is harder to track than traditional attacks. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">qMEqX9t9Ny8fo2kmqXuthM</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/Gj7XP9GzWNL2hf6fkRdHS3-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Tue, 26 Aug 2025 19:10:21 +0000</pubDate>                                                                                                                                <updated>Fri, 05 Sep 2025 16:00:00 +0000</updated>
                                                                                                                                            <category><![CDATA[Cyber Security]]></category>
                                                    <category><![CDATA[Tech Industry]]></category>
                                                                                                                    <dc:creator><![CDATA[ Nathaniel Mott ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/hEFeUwJHtzVDWEZTcjDqt9.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Nathaniel has been writing about various aspects of the technology industry, from startups and cybersecurity to social media and enthusiast hardware, since 2011. Lately, he spends his time writing and spending time with his family.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/Gj7XP9GzWNL2hf6fkRdHS3-1280-80.jpg">
                                                            <media:credit><![CDATA[Shutterstock]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[AI hacking]]></media:description>                                                            <media:text><![CDATA[AI hacking]]></media:text>
                                <media:title type="plain"><![CDATA[AI hacking]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/Gj7XP9GzWNL2hf6fkRdHS3-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p><em><strong>Edit 9/5/2025 9 am ET:  </strong></em>A representative from NYU's Tandon School of Engineering contacted Tom's Hardware to claim responsibility for the malware referenced in the below article — this malware, found by ESET, was in fact a research project from the school. We have issued a follow-up article covering the situation, which you can read here: <a href="https://www.tomshardware.com/tech-industry/cyber-security/ai-powered-promptlocker-ransomware-is-just-an-nyu-research-project-the-code-worked-as-a-typical-ransomware-selecting-targets-exfiltrating-selected-data-and-encrypting-volumes">AI-powered PromptLocker ransomware is just an NYU research project — the code worked as a typical ransomware, selecting targets, exfiltrating selected data, and encrypting volumes</a></p><p><em><strong>Original article follows:</strong></em><br><br>ESET today announced the discovery of "the first known AI-powered ransomware." The ransomware in question has been dubbed PromptLock, presumably because seemingly everything related to generative AI has to be prefixed with "prompt." </p><p>ESET said that this malware uses an open-weight large language model developed by OpenAI to generate scripts that can perform a variety of functions on Windows, macOS, and Linux systems while confounding defensive tools by exhibiting slightly different behavior each time.</p><p>"PromptLock leverages Lua scripts generated from hard-coded prompts to enumerate the local filesystem, inspect target files, exfiltrate selected data, and perform encryption," ESET <a href="https://infosec.exchange/@ESETresearch/115095803130379945" target="_blank">said</a> in a Mastodon post about the malware. "Based on the detected user files, the malware may exfiltrate data, encrypt it, or potentially destroy it. Although the destruction functionality appears to be not yet implemented."</p><p>Lua might seem like an odd choice of programming language for ransomware; it's mostly known for being used to develop games within Roblox or plugins for the NeoVim text editor. But it's actually a general-purpose language that offers a variety of advantages to the ransomware operators—including good performance, cross-platform support, and a focus on simplicity that makes it well-suited to "<a href="https://en.wikipedia.org/wiki/Vibe_coding" target="_blank">vibe coding</a>."</p><p>It's important to remember that LLMs are non-deterministic; their output will change even if you provide the same input with the same prompt to the same model on the same device. That's maddening if you expect them to exhibit the exact same behavior over time, but ransomware operators don't necessarily want that, because it makes it easier for defensive tooling to associate patterns of behavior with known malware.</p><p>PromptLock "uses the gpt-oss:20b model from OpenAI locally via the Ollama API to generate malicious Lua scripts on the fly," which helps it to evade detection. The fact that the model runs locally also makes it so OpenAI can't snitch on the ransomware operators—if they had to call an API on its servers every time they generate one of these scripts, the jig would be up. The pitfalls of vibe coding don't really apply, either, since the scripts are running on someone else's system.</p><p>Maybe this will make for a decent consolation prize for AI companies. Yeah, they're <a href="https://www.yahoo.com/news/articles/ai-industry-warns-lawsuit-could-221033688.html" target="_blank">facing massive lawsuits</a>. Sure, basically <a href="https://fortune.com/2025/08/18/mit-report-95-percent-generative-ai-pilots-at-companies-failing-cfo/" target="_blank">nobody has seen</a> any benefits from adopting their services. Okay, so <a href="https://www.cnbc.com/2025/08/21/meta-brakes-massive-ai-talent-recruitment-spending-spree-mark-zuckerberg-tbd-superintelligence-lab.html" target="_blank">even Meta's cutting back</a> on its AI-related spending spree. But nobody can say that AI is useless—it's convinced at least some ransomware operators to use local models in their warez! That counts for something, right?</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ GitHub folds into Microsoft following CEO resignation — once independent programming site now part of 'CoreAI' team ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/software/programming/github-folds-into-microsoft-following-ceo-resignation-once-independent-programming-site-now-part-of-coreai-team</link>
                                                                            <description>
                            <![CDATA[ GitHub, one of the most used code repositories in the world, is being folded into Microsoft following the departure of longtime CEO Thomas Dohmke. GitHub was acquired by Microsoft in 2018 but remained largely independent until today. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">Y5A2grTvUNk6gEEfFAxoBd</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/W5LnBksnN2E3PTCdgDF9g3-1280-80.png" type="image/png" length="0"></enclosure>
                                                                        <pubDate>Mon, 11 Aug 2025 18:27:21 +0000</pubDate>                                                                                                                                <updated>Mon, 11 Aug 2025 21:15:08 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Sunny Grimm ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/TMvJDaYy3nyZ8kYLJ2rggY.png ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Sunny&#039;s tech journey began in 2017, when he spotted the shiny new GTX 1080 on the shelf of one Jarred Walton, Tom&#039;s Hardware&#039;s resident GPU expert. Babysitting for Jarred, Sunny was paid in a 1050 Ti, which killed his computer the second he tried to install it. One week of headscratching troubleshooting later, Sunny was brought into this new life of tinkering and trying to squeeze every frame of performance out of their hardware. First writing for PC Gamer, Sunny made the trek over to Tom&#039;s Hardware to tackle the morning&#039;s breaking tech news. Perpetually one generation behind the bleeding edge, Sunny is currently studying at a university in Utah. When they&#039;re not writing about the US-China trade war, Sunny is either writing new music, getting in rounds of &lt;em&gt;Magic: the Gathering&lt;/em&gt;, or advocating for minority rights.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/png" url="https://cdn.mos.cms.futurecdn.net/W5LnBksnN2E3PTCdgDF9g3-1280-80.png">
                                                            <media:credit><![CDATA[GitHub]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[GitHub corporate logo]]></media:description>                                                            <media:text><![CDATA[GitHub corporate logo]]></media:text>
                                <media:title type="plain"><![CDATA[GitHub corporate logo]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/W5LnBksnN2E3PTCdgDF9g3-1280-80.png" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>GitHub has become one with Microsoft today, marking the end of the website's independence. Former CEO Thomas Dohmke announced he would <a href="https://github.blog/news-insights/company-news/goodbye-github/">step down from his role at GitHub</a> today, leaving Microsoft to take control of the company. GitHub will now become part of Microsoft's CoreAI team, with no successor yet announced for Dohmke.</p><p>Dohmke shared in a GitHub blog post that his departure is due to a desire to found a new tech startup. Dohmke will stay on at GitHub through the end of the year to assist in the transition of folding GitHub fully into Microsoft, leaving his founder dreams on hold until then. In his personal X (formerly Twitter) post announcing his resignation, Dohmke teased that future projects may include a new GitHub successor. </p><div class="see-more see-more--clipped"><blockquote class="twitter-tweet hawk-ignore" data-lang="en"><p lang="en" dir="ltr">😉<a href="https://twitter.com/cantworkitout/status/1954933929628307730">August 11, 2025</a></p></blockquote><div class="see-more__filter"></div></div><p>GitHub is one of the largest code repositories in the world, having become an essential tool for spreading and collaborating on code projects. It was built based on Git, a distributed version control system for developers created by <a href="https://www.tomshardware.com/peripherals/mechanical-keyboards/linus-torvalds-returns-to-clackety-clack-cherry-mx-blues-the-low-profile-quiet-keyboard-lifestyle-wasnt-for-him">Linus Torvalds</a> in 2005 to support the development of the Linux kernel. GitHub recently saw its <a href="https://www.tomshardware.com/software/milestone-one-billionth-github-repo-is-just-the-word-sh-t">one billionth repo</a> hit the site, which was simply the word "sh*t".    </p><p>Dohmke has been a key part of GitHub in the Microsoft era, joining the company following Microsoft's $7.5 billion acquisition of the site in 2018 and becoming CEO in 2021. GitHub reached 150 million users and 1 billion repos under Dohmke and became the first landing place for Copilot AI. Microsoft's original acquisition of GitHub allowed the site to continue operating independently from Microsoft. However, that independence will soon end as GitHub, a currently remote-first workplace, becomes further wrapped into Microsoft's control.</p><p>Microsoft's decision to wrap GitHub into its CoreAI teams likely indicates an intent to double down on GitHub's AI projects. GitHub Copilot, the first iteration of Copilot to make it to commercial launch in the Windows ecosystem, has become a successful AI coding assistant and a key part of GitHub's public focus, recently receiving a <a href="https://www.tomsguide.com/ai/microsoft-just-made-github-copilot-free-heres-why-its-a-big-deal">free version for all users.</a> The focus on AI-assisted coding is a well-debated topic in the programming world, with even AI coding assistants hallucinating and telling users to <a href="https://www.tomshardware.com/tech-industry/artificial-intelligence/ai-tool-tells-user-to-learn-coding-instead-of-asking-it-generate-the-code">stop using it and learn to code themselves</a>.   </p><p>Some internet speculators have become wary of the future of GitHub now that it is becoming fully wrapped into Microsoft. Past acquisitions, such as those of Skype and Xamarin, serve as examples of companies and programs that Microsoft has since discontinued. Some fear GitHub may face a similar fate if it is not rebranded and Teams-ified instead. The future of GitHub is uncertain, but Microsoft is highly unlikely to discontinue the operations of the cornerstone of modern coding. </p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ 27-year-old Easter egg found in the Apple Power Mac G3's ROM— creating a RAM disk with the name 'secret ROM image' unveils a hidden file ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/software/macos/27-year-old-easter-egg-found-in-the-apple-power-mac-g3s-rom-creating-a-ram-disk-with-the-name-secret-rom-image-unveils-a-hidden-file</link>
                                                                            <description>
                            <![CDATA[ The activation method for an Easter egg, hidden deep within the ROMs of ancient beige Apple Power Mac G3 computers, has been uncovered. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">mhLi9HhyTupDoirk8cUeRM</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/V9rJUbXimfctJ4dzMtyMZ5-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Wed, 25 Jun 2025 10:25:07 +0000</pubDate>                                                                                                                                <updated>Wed, 25 Jun 2025 10:32:01 +0000</updated>
                                                                                                                                            <category><![CDATA[MacOS]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                    <category><![CDATA[Operating Systems]]></category>
                                                                                                                    <dc:creator><![CDATA[ Mark Tyson ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/56vqMYLDaKRHPhHZgbADFR.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Mark&#039;s enthusiasm for computers dampened at an early age by the rubber-keyed Sinclair Spectrum 48K and feelings of Commodore 64 envy. However, in the mid-80s, hope in a digital future was rekindled by the purchase of an Atari 520 STe. Since that time Mark has used a multitude of computers for fun and professional endeavors. He often owned both Macs and PCs but went cold on the former after OS9 was killed off, and warmed to the latter with the introduction of Windows XP.&lt;br&gt;
&lt;br&gt;
Early work years were spent in artwork and reprographics but in the late noughties, Mark started to blog about computers, Taiwanese food culture, and guitar design. This activity led to a full-time position writing about breaking PC tech news for HEXUS, for the best part of a decade. When HEXUS was abruptly closed, Mark helped with the foundation of Club386, before finding a new home at Tom&#039;s Hardware.&lt;br&gt;
&lt;br&gt;
When not wearing through the keycap legends on his PC keyboards, Mark can be found wandering the computer malls of Taiwan&#039;s neon-lit conurbations and enjoying local and international cuisine.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/V9rJUbXimfctJ4dzMtyMZ5-1280-80.jpg">
                                                            <media:credit><![CDATA[Apple, Doug Brown]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[The Team]]></media:description>                                                            <media:text><![CDATA[The Team]]></media:text>
                                <media:title type="plain"><![CDATA[The Team]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/V9rJUbXimfctJ4dzMtyMZ5-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>The activation method for a rather ancient Easter egg, hidden deep within the ROMs of beige Apple Power Mac G3 computers, has been uncovered. Self-confessed "combined Apple/Linux/Windows geek" <a href="https://www.downtowndougbrown.com/2025/06/finding-a-27-year-old-easter-egg-in-the-power-mac-g3-rom/">Doug Brown</a> published a blog on Tuesday, discussing how he rediscovered the 'hidden dev team' Easter egg on a lazy Sunday. There was no known documented way of displaying this Easter egg in the Finder (Apple desktop). However, thanks to deeper detective work, some programming knowledge, and the help of friends, Brown eventually found and shared the method of activating this significant Easter egg. It is pretty easy, when you know how.</p><p>The PowerMac G3 computers were the mainstay of Apple computer-reliant businesses in the late 90s – until everything went pastel translucent with the introduction of the iMac line. As a reprographics worker at the time, I owned a couple of beige G3 machines for home use, and remember them fondly, moving up from Mac OS 7.5.3 through to 9.x. I also remember lots of software having fun Easter eggs that could be activated. That was quite high-octane Mac computing fun at the time, and this would be at least five years ahead of YouTube being a thing, for example. The Easter eggs I remember most clearly were conjured up by holding various modifier keys while selecting various menu items.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:818px;"><p class="vanilla-image-block" style="padding-top:56.23%;"><img id="nU5adyWSV7kr5kEe2j4BZ5" name="my-old-mac" alt="Old Apple Macs" src="https://cdn.mos.cms.futurecdn.net/nU5adyWSV7kr5kEe2j4BZ5.jpg" mos="" align="middle" fullscreen="" width="818" height="460" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="caption-text">An image I found of one of my old beige Power PCs </span><span class="credit" itemprop="copyrightHolder">(Image credit: Future)</span></figcaption></figure><p>Brown found that the existence of the image was already known and documented from previous ROM hacking adventures. However, no one knew how a casual Mac user might see the image pop up as a ‘surprise’ on their system. </p><p>Intrigued and warming to the potential challenge, Brown looked more closely at text strings in similar locations to the image (a JPG). Working using various tools, including Ghidra, a software reverse engineering (SRE) framework, he eventually narrowed down the RAM disk driver as the prime suspect. </p><p>After Ghidra decompiled the code, it was determined that a process associated with the RAM disk would check for a string that was equal to ‘secret ROM image’ before it would create and write a file named ‘The Team.’ This was enough information to start to try and hunt the Easter egg in the ‘real world’ of the classic Mac OS, or so Brown thought...</p><p>Help came from fellow InfoSec Exchange user Alex, who managed to <a href="https://infosec.exchange/@atax1a/114729277160021527">trigger the Easter egg</a> as follows: “with hints from (Downtown) Doug Brown, we just discovered the trigger for the beige PowerMac G3's secret ROM image: go to the Memory control panel, set up a RAM disk, reboot to mount it, go Special → Erase Disk and name the volume secret ROM image — you'll get a file The Team at its root, type JPEG, creator ttxt. enjoy!” </p><p>This file will open in the Mac’s basic built-in editor, SimpleText, which is just advanced enough to be able to render JPG images. Just double-click 'The Team' file, and you will see the 26-strong team in the photo, reproduced top.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1025px;"><p class="vanilla-image-block" style="padding-top:80.49%;"><img id="szRjHyvYcVtiYmpgSvwBZ5" name="RAM-disk" alt="Old Apple Macs" src="https://cdn.mos.cms.futurecdn.net/szRjHyvYcVtiYmpgSvwBZ5.jpg" mos="" align="middle" fullscreen="1" width="1025" height="825" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/szRjHyvYcVtiYmpgSvwBZ5.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Future)</span></figcaption></figure><h2 id="enjoy-this-easter-egg-via-the-magic-of-emulation">Enjoy this Easter egg via the magic of emulation</h2>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Somebody turned a Nintendo Switch into the world's slowest iPhone, and the results were a disaster — boasts 20-minute boot times, kernel panics, and no working apps ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/video-games/nintendo/somebody-turned-a-nintendo-switch-into-the-worlds-slowest-iphone-and-the-results-were-a-disaster-boasts-20-minute-boot-times-kernel-panics-and-no-working-apps</link>
                                                                            <description>
                            <![CDATA[ A tinkerer managed to boot Apple iOS on the Nintendo Switch ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">QTZn8Sv4dT7Crc8o32CxG7</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/JGoMeZnYfmurLQmr3HXLS5-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Thu, 19 Jun 2025 12:45:41 +0000</pubDate>                                                                                                                                                                                                                                <category><![CDATA[Nintendo]]></category>
                                                    <category><![CDATA[Video Games]]></category>
                                                    <category><![CDATA[Console Gaming]]></category>
                                                                                                                    <dc:creator><![CDATA[ Mark Tyson ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/56vqMYLDaKRHPhHZgbADFR.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Mark&#039;s enthusiasm for computers dampened at an early age by the rubber-keyed Sinclair Spectrum 48K and feelings of Commodore 64 envy. However, in the mid-80s, hope in a digital future was rekindled by the purchase of an Atari 520 STe. Since that time Mark has used a multitude of computers for fun and professional endeavors. He often owned both Macs and PCs but went cold on the former after OS9 was killed off, and warmed to the latter with the introduction of Windows XP.&lt;br&gt;
&lt;br&gt;
Early work years were spent in artwork and reprographics but in the late noughties, Mark started to blog about computers, Taiwanese food culture, and guitar design. This activity led to a full-time position writing about breaking PC tech news for HEXUS, for the best part of a decade. When HEXUS was abruptly closed, Mark helped with the foundation of Club386, before finding a new home at Tom&#039;s Hardware.&lt;br&gt;
&lt;br&gt;
When not wearing through the keycap legends on his PC keyboards, Mark can be found wandering the computer malls of Taiwan&#039;s neon-lit conurbations and enjoying local and international cuisine.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/JGoMeZnYfmurLQmr3HXLS5-1280-80.jpg">
                                                            <media:credit><![CDATA[@patrosi73]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Nintendo Switch iPhone]]></media:description>                                                            <media:text><![CDATA[Nintendo Switch iPhone]]></media:text>
                                <media:title type="plain"><![CDATA[Nintendo Switch iPhone]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/JGoMeZnYfmurLQmr3HXLS5-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>A high-tech tinkerer has managed to get Apple’s iOS to run on the Nintendo Switch. Don’t get too excited, though, as <a href="https://x.com/Patrosi73/status/1935028115459424262" target="_blank">PatRyk on X</a> wryly admits they have created “the world’s slowest ‘iPhone’.” Booting this Nintendo ‘iPhone’ currently takes 20 minutes, and all the apps they tried crash – but it’s a start. </p><h2 id="baby-steps">Baby steps</h2><p>While the gaming tech world is all a flutter with the recently launched <a href="https://www.tomshardware.com/video-games/nintendo/nintendo-switch-2-tested-new-internals-are-a-major-power-up">Switch 2</a>, PatRyk spent two days attempting to shoehorn Apple’s mobile OS onto the best-selling hybrid console. This enthusiast’s modesty seems to be matched by their patience, as the new Nintendo ‘iPhone’ takes 20 minutes to boot. We wonder how many times they waited that length of time, or even longer, for the boot process to hang or otherwise fail?</p><p>Using the mobile OS also sounds like an incredible life-sapping chore, with this ‘iPhone’ in its current state. PatRyk says that the system “kernel panics every 2nd thing you do, can’t open any apps (they all time out and crash).”</p><div class="see-more see-more--clipped"><blockquote class="twitter-tweet hawk-ignore" data-lang="en"><p lang="en" dir="ltr">I’ve lost my mind (and 2 days of my life to install this)Behold: the world’s slowest “iPhone” 🎉🎉Takes over 20 minutes to boot, kernel panics every 2nd thing you do, can’t open any apps (they all time out and crash) 🚀🚀 pic.twitter.com/r3B3JPDUDV<a href="https://twitter.com/cantworkitout/status/1935028115459424262">June 17, 2025</a></p></blockquote><div class="see-more__filter"></div></div><p>At this stage, the project might sound dire, but it shows that running iOS on the original Switch is possible – it just needs optimization. But you aren’t going to be ditching your real Apple iPhone for a Switch any time soon.</p><h2 id="underlying-technology-the-versatile-qemu">Underlying technology - the versatile QEMU</h2>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ AI taught to analyze Windows crash dumps, released to open source — 'like going from hunting with a stone spear to using a guided missile' ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/tech-industry/artificial-intelligence/software-engineer-taught-microsoft-copilot-to-analyze-windows-crash-dumps</link>
                                                                            <description>
                            <![CDATA[ Brings crash dump analysis into the AI era by integrating GitHub Copilot with WinDBG. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">Xbrjb4Qu8Z5WW859ETx7zg</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/YfRZPFqkGyjfeMVHryCZ4g-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Wed, 07 May 2025 10:00:00 +0000</pubDate>                                                                                                                                <updated>Thu, 21 Aug 2025 12:54:03 +0000</updated>
                                                                                                                                            <category><![CDATA[Artificial Intelligence]]></category>
                                                    <category><![CDATA[Tech Industry]]></category>
                                                                                                                    <dc:creator><![CDATA[ Mark Tyson ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/56vqMYLDaKRHPhHZgbADFR.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Mark&#039;s enthusiasm for computers dampened at an early age by the rubber-keyed Sinclair Spectrum 48K and feelings of Commodore 64 envy. However, in the mid-80s, hope in a digital future was rekindled by the purchase of an Atari 520 STe. Since that time Mark has used a multitude of computers for fun and professional endeavors. He often owned both Macs and PCs but went cold on the former after OS9 was killed off, and warmed to the latter with the introduction of Windows XP.&lt;br&gt;
&lt;br&gt;
Early work years were spent in artwork and reprographics but in the late noughties, Mark started to blog about computers, Taiwanese food culture, and guitar design. This activity led to a full-time position writing about breaking PC tech news for HEXUS, for the best part of a decade. When HEXUS was abruptly closed, Mark helped with the foundation of Club386, before finding a new home at Tom&#039;s Hardware.&lt;br&gt;
&lt;br&gt;
When not wearing through the keycap legends on his PC keyboards, Mark can be found wandering the computer malls of Taiwan&#039;s neon-lit conurbations and enjoying local and international cuisine.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/YfRZPFqkGyjfeMVHryCZ4g-1280-80.jpg">
                                                            <media:credit><![CDATA[Microsoft]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[MS WinDBG]]></media:description>                                                            <media:text><![CDATA[MS WinDBG]]></media:text>
                                <media:title type="plain"><![CDATA[MS WinDBG]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/YfRZPFqkGyjfeMVHryCZ4g-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Software engineer Sven Scharmentke (AKA Svnscha) has shared a project that they say "might change crash dump analysis forever." The new contextual natural language conversational tool contrasts sharply with manually typing arcane commands into a terminal to analyze crash data, which is the established modus operandi of a professional software engineer, even in 2025. Svnscha goes on to assert that the new open-source tool, available as <a href="https://github.com/svnscha/mcp-windbg">mcp-windbg</a> on GitHub, can go deep. The AI runs a "simply amazing" array of WinDBG/CDB commands, boosting productivity and eradicating a once tedious task.</p><iframe allow="" height="551" width="504" data-lazy-priority="low" data-lazy-src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:7324558897141223424?collapsed=1"></iframe><p>AI peddlers have developed large language models that initially <a href="https://www.tomshardware.com/news/google-ai-help-me-write-takes-over-for-you">targeted creative writing</a> and have since moved to visual arts – graduating from hand-drawn style art and photorealistic creations <a href="https://www.tomshardware.com/tech-industry/artificial-intelligence/open-sora-can-create-ai-generated-videos-on-an-rtx-3090-gpu-but-memory-capacity-limits-it-to-4-second-240p-clips">to videos</a> in recent times. AI has also made significant inroads into <a href="https://www.tomshardware.com/tech-industry/artificial-intelligence/jensen-huang-advises-against-learning-to-code-leave-it-up-to-ai">computer programming</a>. However, most people want AI to leave the fun, creative stuff to humans and take the sting out of dull, soul-crushing, repetitive tasks. This seems to be where Svnscha's mcp-windbg might actually succeed.</p><p>In brief, the mcp-windbg tool enables AIs to interact with Microsoft's multipurpose debugger WinDBG. Its cunning skill is in giving LLMs the ability to execute debugger commands. And, even if you have swallowed the WinDBG manual, this AI will likely know debugger commands better than you. Copilot will probably also interpret assembly code, decode hexadecimal, traverse structures with symbols, and perform other tasks much better than you. You just have to ask the right questions.</p><h2 id="background-and-demos">Background and demos</h2><p>Svnscha goes into some detail about their prior frustration in debugging crashes, the lightbulb moment to involve AI, and how the mcp-windbg tool works, all in a <a href="https://svnscha.de/posts/ai-meets-windbg/">dedicated blog post</a>. The software engineer humbly admits the 'hard part" of this work was implementing the CDB (Microsoft's Command-Line Console Debugger) interaction layer, and this was done during a session "vibe-coding with two coffees on a Saturday morning." </p><p>However, the videos shared help encapsulate the leveraging of Copilot with CDB. There are two to watch on the linked blog, starting with a Crash Analysis and Automated Bugfix using Copilot, followed by an Automated Crash Dump Analysis of Multiple Crash Dump Files.    </p><p>What you first see shows Svnscha installing mcp-windbg, then running a Windows app that crashes. Next, GitHub Copilot is fired up and asked to find the crash dump and fix the underlying code issue. "The AI quickly identifies that the application crashed, explains which specific conditions led to the crash, and suggests a fix," says Svnscha.   </p><p>The second video is similar but shows the tool analyzing multiple files simultaneously.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:2560px;"><p class="vanilla-image-block" style="padding-top:56.25%;"><img id="M35DemntvfKEZdnVP7fL5g" name="crash-analysis-window" alt="MS Copilot taught to analyze Windows crash dumps" src="https://cdn.mos.cms.futurecdn.net/M35DemntvfKEZdnVP7fL5g.jpg" mos="" align="middle" fullscreen="1" width="2560" height="1440" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/M35DemntvfKEZdnVP7fL5g.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: <a href="https://svnscha.de/posts/ai-meets-windbg/" target="_blank">Sven Scharmentke</a>)</span></figcaption></figure><h2 id="simple-wrapper-lifts-crash-analysis-from-the-stone-age-to-the-rocket-age">'Simple wrapper' lifts crash analysis from the stone age to the rocket age </h2>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ New FPGA-powered 'laptop' is retro-inspired —  OneChipBook-12 dev kit with a built-in display and mechanical keyboard ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/software/programming/the-onechipbook-12-is-a-retro-inspired-fpga-dev-kit-with-a-built-in-display-and-mechanical-keyboard</link>
                                                                            <description>
                            <![CDATA[ The Cyclone EP1C12Q240 at the heart of the device should be capable of emulating vintage processors like the 40-year-old Z80 ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">q6aF58XbxP46kJSu8WxK4H</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/F9FjRRrUsPYkA5MMqxMptm-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Tue, 06 May 2025 18:16:44 +0000</pubDate>                                                                                                                                <updated>Tue, 06 May 2025 18:19:10 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                <author><![CDATA[ editors@tomshardware.com (Kunal Khullar) ]]></author>                    <dc:creator><![CDATA[ Kunal Khullar ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/NDK3ae3zDxAx2BJnMXxBJV.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Kunal Khullar is a contributor at Tom’s Hardware with extensive writing experience in computing. With a deep-seated passion for technology, Kunal has dedicated years to mastering the intricacies of computer hardware components and staying at the forefront of the latest software developments. His journey in the tech world began with hands-on experience in assembling and troubleshooting PCs and laptops as a kid in the 90s, a skill he has meticulously honed over the years. He has worked for various publications covering a range of topics including smartphones, laptops, audio devices, and PC hardware. Currently, he is engrossed with everything happening in the world of computing with a growing obsession for unique PC cases and RGB cooling fans. Through his articles Kunal strives to demystify complex concepts for a broad audience. Kunal is also a casual gamer as he loves to squad up with his friends in &lt;em&gt;Apex Legends&lt;/em&gt;, and claims to have a fairly good taste in music especially when it comes to heavy metal.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/F9FjRRrUsPYkA5MMqxMptm-1280-80.jpg">
                                                            <media:credit><![CDATA[Tindie]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[The OneChipBook-12 dev kit for FPGA development]]></media:description>                                                            <media:text><![CDATA[The OneChipBook-12 dev kit for FPGA development]]></media:text>
                                <media:title type="plain"><![CDATA[The OneChipBook-12 dev kit for FPGA development]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/F9FjRRrUsPYkA5MMqxMptm-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>The OneChipBook-12 from 8086YES! might look like a chunky netbook from years ago, but it is actually an FPGA development platform centered around the Cyclone EP1C12Q core. For those unfamiliar, an FPGA, or<a href="https://www.tomshardware.com/reviews/fpga-definition-explained-vs-asic,6068.html"> field-programmable gate array</a>, is a type of integrated circuit that can be reprogrammed after manufacturing. This flexibility means it can be configured thousands of times into a wide variety of digital circuits, making it an excellent learning tool for experimenting with hardware design.</p><p>The Altera Cyclone EP1C12Q240 chip on the OneChipBook-12 offers over 12,000 logic elements and 240kbits of RAM. It’s paired with 32MB of SDRAM and an SD card slot for storage (FAT16 supported), giving it just enough power and flexibility for retro computing projects or educational experimentation.</p><p>The unique aspect of the OneChipBook-12 is its self-contained design. Unlike most FPGA dev boards that require you to bring your own monitor, keyboard, and power supply, this one has everything built-in. It uses a 1024x768 LCD panel, salvaged from an old iPad 2, and a backlit mechanical PS/2 keyboard available in two layouts — a standard version, with function keys, and a version customized for MSX-style emulation, including KANA and GRAPH keys.</p><figure role="gallery"><figure><img src="https://cdn.mos.cms.futurecdn.net/kWBhBJPFfakFtqCSwDouRh.jpg" alt="The OneChipBook-12 FPGA dev kit " /><figcaption><small role="credit">Tindie</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/uWV4CNjqqjWdJMWDoQicMh.jpg" alt="The OneChipBook-12 FPGA dev kit " /><figcaption><small role="credit">Tindie</small></figcaption></figure></figure><p>For I/O it includes a PS/2 port, dual DB9 joystick ports, and USB Type-A, while video output options include VGA, S-Video, and composite video. The device also comes with built-in stereo speakers, a 3.5mm headphone jack, and a volume knob that adds to the retro appeal. A small expansion cartridge slot and DIP switch round out the customization options, while power comes from a USB Type-C port and an internal lithium battery, making it portable enough to carry around in a backpack.</p><p>You can purchase the OneChipBook-12 on <a href="https://www.tindie.com/products/cycle/onechipbook-12-a-fpga-development-platform/">Tindie</a> and <a href="https://www.ebay.com/itm/156685326770">Ebay</a> for $215 or around <a href="https://www.aliexpress.us/item/1005008469052067.html?gatewayAdapt=4itemAdapt">$235 on AliExpress</a>. It may not be for everyone, but if you’ve ever wanted a portable FPGA dev kit, this might be worth the money. </p><p>The OneChipBook-12 doesn’t ship with a firmware, but it does include a USB Blaster for loading your own FPGA cores. As pointed out by <a href="https://www.tindie.com/products/cycle/onechipbook-12-a-fpga-development-platform/">CNX-Software</a>, the provided PDF documentation offers hardware details along with general guidance on flashing firmware. However it lacks any instructions on how to install MSX firmware — likely due to legal concerns. </p><p>Some users have pointed out that the device was once marketed as the MSXBook, a name that has since been dropped to avoid infringing on the MSX trademark. The company behind the OneChipBook-12 reportedly offered support in the past, but no longer do so. However, if you are still interested, this <a href="https://qiita.com/krohigewagma/items/7e8bf974cb122b73425e">webpage</a> offers more detailed guidance on flashing firmware to the device (although it is in Japanese). </p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Microsoft developer demos .NET on the NES — delivers .NES ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/video-games/nintendo/microsoft-developer-demos-net-on-the-nes-delivers-nes</link>
                                                                            <description>
                            <![CDATA[ Gratuitous .NET backporting goes from the arguably-practical Windows 95 platform to the Mario-practical Nintendo Entertainment System. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">nht95ZAqzjPVBXZv7sJDCH</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/x4ATRtBd3aC4t8seL6BSwC-1280-80.png" type="image/png" length="0"></enclosure>
                                                                        <pubDate>Wed, 29 May 2024 11:43:41 +0000</pubDate>                                                                                                                                                                                                                                <category><![CDATA[Nintendo]]></category>
                                                    <category><![CDATA[Video Games]]></category>
                                                    <category><![CDATA[Console Gaming]]></category>
                                                                                                                    <dc:creator><![CDATA[ Christopher Harper ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/qS2hbWnXwNUSmgyAHBQqKB.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Christopher Harper has been a successful freelance tech writer specializing in PC hardware and gaming since 2015, and ghostwrote&amp;nbsp;for various B2B clients in High School before that. Outside of work, Christopher is best known to friends and rivals as an active competitive player in various eSports (particularly fighting games and arena shooters) and a purveyor of music ranging from Jimi Hendrix to Killer Mike to the&amp;nbsp;Sonic Adventure 2&amp;nbsp;soundtrack.&lt;br&gt;
&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/png" url="https://cdn.mos.cms.futurecdn.net/x4ATRtBd3aC4t8seL6BSwC-1280-80.png">
                                                            <media:credit><![CDATA[Microsoft Developer on YouTube]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[.NET for NES running in the anese NES emulator.]]></media:description>                                                            <media:text><![CDATA[.NET for NES running in the anese NES emulator.]]></media:text>
                                <media:title type="plain"><![CDATA[.NET for NES running in the anese NES emulator.]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/x4ATRtBd3aC4t8seL6BSwC-1280-80.png" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Ever wanted to see a Nintendo Entertainment System released in 1986 run the .NET Framework released for Windows platforms in 2000? If you&apos;re the same kind of techno-degenerate who enjoyed <a href="https://www.tomshardware.com/software/operating-systems/thousands-of-apps-ported-back-to-windows-95-twenty-eight-years-later-net-framework-port-enables-backward-compatibility-for-modern-software">.NET being backported to Windows 95</a>, you&apos;re most likely in the right place, though of course the NES isn&apos;t going to be nearly as capable as your average Windows 95 PC. </p><p>Before proceeding, let&apos;s take a moment to put the processing power of the mighty Nintendo Entertainment System in context — since it was powerful for its day, after all. The NES boasts an 8-bit CPU running at 1.78 MHz — that&apos;s right, MHz, not kHz!— and enjoys a generous 2 Kilobytes of RAM and of VRAM allocation. </p><p>It can also handle game cartridges with up to 512 Kilobytes of storage, which our needlessly determined .NET porter (Microsoft&apos;s Jon Peppers) noted would barely be enough for modern Android/iOS app icons. The most popular iOS/Android apps also tend to run the gamut from 55-206 MB, which is orders of magnitude higher than anything an NES could ever hope to comprehend.</p><div class="youtube-video" data-nosnippet ><div class="video-aspect-box"><iframe data-lazy-priority="low" data-lazy-src="https://www.youtube-nocookie.com/embed/ASTqqvQo0dM" allowfullscreen></iframe></div></div><p>So, why was this done? A wide assortment of reasons are provided in the original presentation. These include learning how to convert MSIL to <a href="https://www.tomshardware.com/news/pico-powered-6502-loderunner">6502</a> assembly, for API design and .NET development experience, and most importantly a simple "Nerd Flex". Although, for a "Nerd Flex", this one seems fairly limited in its uses compared to the last .NET Framework-related nerd flex that actually fundamentally improves <a href="https://www.tomshardware.com/news/windows_95_chatgpt_keys">Windows 95</a>. Right now, .NET on NES isn&apos;t even playing any games, it&apos;s mostly just running Hello World and other simple demos.</p><p>But it&apos;s still pretty cool, especially considering the fact it works at all. Several components of .NET were cut from this implementation to make it work on the NES&apos; limited hardware, including a lot of compatibility-related code, the debugger, and other optional components of .NET. Or, "optional" if you happen to be running it on an NES, I guess.</p><p>In the cruel absurdity of the universe at large, never forget that your old hardware can always be put to use as long as it still functions. Usually, that means something like playing old games, but sometimes it means <a href="https://www.tomshardware.com/video-games/the-n64-is-still-being-pushed-past-its-limits-28-years-later-homebrew-devs-wont-give-up-on-the-nintendo-64-compare-2024-mario-to-his-1996-ancestor">creating entirely new games and expansions</a> to keep old hardware alive. Other times, it&apos;s about fixing or <a href="https://www.tomshardware.com/laptops/macbooks/apples-1994-powerbook-520c-rises-from-the-grave-with-ipad-screen-and-2015-core-i5-macbook-pro-internals">fundamentally replacing old hardware</a> to keep the aesthetics alive without sacrificing <em>too much</em> functionality.</p><p>As the author? My personal favorite has still got to be <a href="https://www.tomshardware.com/video-games/the-n64-is-still-being-pushed-past-its-limits-28-years-later-homebrew-devs-wont-give-up-on-the-nintendo-64-compare-2024-mario-to-his-1996-ancestor">porting N64 games to PC</a> with ray-tracing and uncapped FPS, though that&apos;s keeping <em>software</em> alive rather than hardware.</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ BenQ RD Series monitors target software developers — 16:10 ratio for more verticality ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/monitors/benq-rd-series-monitors-target-software-developers-1610-ratio-for-more-verticality</link>
                                                                            <description>
                            <![CDATA[ BenQ has announced its new RD Programming Series of monitors. These coder-friendly screens offer features like a 16:10 ratio display, Advanced Coding Modes, Brightness Intelligence auto-dimming, anti-glare screen coatings, and ergonomic stands. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">a6VrjxgswrTBNKYZbogV3a</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/Ec92di7tWUytSEVBJLsfLc-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Thu, 09 May 2024 15:46:33 +0000</pubDate>                                                                                                                                <updated>Wed, 09 Apr 2025 12:57:48 +0000</updated>
                                                                                                                                            <category><![CDATA[Monitors]]></category>
                                                                                                                    <dc:creator><![CDATA[ Mark Tyson ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/56vqMYLDaKRHPhHZgbADFR.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Mark&#039;s enthusiasm for computers dampened at an early age by the rubber-keyed Sinclair Spectrum 48K and feelings of Commodore 64 envy. However, in the mid-80s, hope in a digital future was rekindled by the purchase of an Atari 520 STe. Since that time Mark has used a multitude of computers for fun and professional endeavors. He often owned both Macs and PCs but went cold on the former after OS9 was killed off, and warmed to the latter with the introduction of Windows XP.&lt;br&gt;
&lt;br&gt;
Early work years were spent in artwork and reprographics but in the late noughties, Mark started to blog about computers, Taiwanese food culture, and guitar design. This activity led to a full-time position writing about breaking PC tech news for HEXUS, for the best part of a decade. When HEXUS was abruptly closed, Mark helped with the foundation of Club386, before finding a new home at Tom&#039;s Hardware.&lt;br&gt;
&lt;br&gt;
When not wearing through the keycap legends on his PC keyboards, Mark can be found wandering the computer malls of Taiwan&#039;s neon-lit conurbations and enjoying local and international cuisine.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/Ec92di7tWUytSEVBJLsfLc-1280-80.jpg">
                                                            <media:credit><![CDATA[BenQ]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[BenQ RD240Q programming monitor]]></media:description>                                                            <media:text><![CDATA[BenQ RD240Q programming monitor]]></media:text>
                                <media:title type="plain"><![CDATA[BenQ RD240Q programming monitor]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/Ec92di7tWUytSEVBJLsfLc-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>BenQ has <a href="https://twitter.com/BenQEurope/status/1788132428864749665">announced</a> its new RD Programming Series of monitors. These coder-friendly screens offer standard features like a 16:10 ratio display, Advanced Coding Modes, eye care protection for working at night and "Brightness Intelligence" auto-dimming, anti-glare screen coatings, and ergonomic stands. </p><p>The first in the series is the new RD240Q, a 24.1-inch model with a 2,560 x 1,600 pixels <a href="https://www.tomshardware.com/reviews/ips-in-plane-switching-definition,5748.html">IPS panel</a>.</p><div class="youtube-video" data-nosnippet ><div class="video-aspect-box"><iframe data-lazy-priority="low" data-lazy-src="https://www.youtube-nocookie.com/embed/wOMQMnD9Oyg" allowfullscreen></iframe></div></div><p>The new RD Programming Series is the world’s first designed to cater to the specific needs of programmers, reckons BenQ. But before we pick over those special coder-friendly features, we shall look at the basic tech specs of the new RD240Q to see how it stands up on a hardware level.</p><p>Based on a 24.1-inch IPS screen, the BenQ RD240Q is pretty small by trending monitor sizes in 2024. However, it offers extra useful verticality by employing 2,560 x 1,600 pixels, and delivers a pixel density of 125ppi. Moreover, at least some of BenQ’s promo materials envision coders using two or three of these displays.</p><p>Benq’s RD240Q goes up to 300 nits of brightness, offers a typical 1000:1 contrast, and covers 95% of the <a href="https://www.tomshardware.com/reference/what-is-dci-p3-color-a-basic-definition">DCI-P3</a> gamut. In terms of performance, we are looking at a max refresh rate of 60 Hz and a response time of 5 ms. These specs are very ordinary. If this was a monitor aimed at casual PC users, only the resolution offered would stand out and we would expect it to be a <a href="https://www.tomshardware.com/best-picks/best-computer-monitors">value-targeted monitor</a>.</p><figure role="gallery"><figure><img src="https://cdn.mos.cms.futurecdn.net/YeHUZ3SoKcBVUjforbumvb.jpg" alt="BenQ RD240Q programming monitor" /><figcaption><small role="credit">BenQ</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/NtA5CkZtkdyG8vRBryZ89c.jpg" alt="BenQ RD240Q programming monitor" /><figcaption><small role="credit">BenQ</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/JxV7oY6oH4WB9ta83euBFc.jpg" alt="BenQ RD240Q programming monitor" /><figcaption><small role="credit">BenQ</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/SKLMfCeg7KiqbqesLNY53c.jpg" alt="BenQ RD240Q programming monitor" /><figcaption><small role="credit">BenQ</small></figcaption></figure></figure><p>So, what has BenQ done to make this a worthwhile choice for programmers? Much of the special coder sauce is in the firmware, offering modes like Coding - Dark Theme, Coding - Light Theme, ePaper, HDR, M-Book, and Cinema. Also, BenQ claims the coding modes offer “crystal clear fonts and improved code differentiation.” We would like to see these claims put to the test in a third-party review.</p><p>As part of its MoonHalo experience, BenQ says the RD240Q offers some eye-soothing features that are meant to limit your exposure to blue light and Brightness Intelligence Gen2 auto-dimming of the display to match your environment. A rear LED ring provides adjustable environmental lighting. Flicker-free technology is present too. The anti-glare and anti-reflective features here also sound appealing to for spending a long time concentrating on the screen.</p><p>BenQ provides a stand that offers tilt (-5 degrees - 20 degrees), swivel (15 degrees/ 15 degrees), pivot, and height (110 mm) adjustments. If you pivot the display it is smart enough to auto-rotate. If you don’t like or need the stand, the monitor comes with 100 x 100 <a href="https://www.tomshardware.com/how-to/install-desk-wall-mount-for-monitor">VESA mounting</a> holes. Display Pilot 2 software is also provided for display adjustments and management.</p><p>The port selection seems adequate. Users get one each of HDMI 2.0, DP 1.4, and <a href="https://www.tomshardware.com/news/usb-31-usb-type-c-refresher,29933.html">USB -C</a> (daisy chainable). As well as offering display connectivity the USB-C can provide power and data transfer. BenQ’s RD240Q can provide three USB-A outs and one USB-C out, offering hub functionality. There is a headphone jack and a pair of 2W built-in speakers.</p><p>We don’t have BenQ RD240Q pricing and retail availability details at the time of writing. Coming soon to the RD Programming Series will be a pair of larger screen options, specifically the 28-inch 4K+ RD280U/UA, and 31/5-inch 4K+ RD320U/UA.</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ The BASIC programming language turns 60 — Dartmouth BASIC started it all in 1964 ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/software/programming/the-basic-programming-language-turns-60-dartmouth-basic-started-it-all-in-1964</link>
                                                                            <description>
                            <![CDATA[ Dartmouth BASIC turns 60 years old since its May 1, 1964 debut. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">kCT9T5KWzxaJtdDzjvtuT5</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/NpoNieWfbkYo7UnnKxqYJk-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sun, 05 May 2024 16:54:31 +0000</pubDate>                                                                                                                                <updated>Thu, 21 Aug 2025 09:52:48 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Christopher Harper ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/qS2hbWnXwNUSmgyAHBQqKB.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Christopher Harper has been a successful freelance tech writer specializing in PC hardware and gaming since 2015, and ghostwrote&amp;nbsp;for various B2B clients in High School before that. Outside of work, Christopher is best known to friends and rivals as an active competitive player in various eSports (particularly fighting games and arena shooters) and a purveyor of music ranging from Jimi Hendrix to Killer Mike to the&amp;nbsp;Sonic Adventure 2&amp;nbsp;soundtrack.&lt;br&gt;
&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/NpoNieWfbkYo7UnnKxqYJk-1280-80.jpg">
                                                            <media:credit><![CDATA[General Electric]]></media:credit>
                                                                                                                                                                        <media:description><![CDATA[A vintage General Electric PC ad from BASIC&#039;s birth era, the 60s. This ad is for the cut-down GE-210 versus the colossal 2000 LB GE-225 used to create the BASIC programming language.]]></media:description>                                                            <media:text><![CDATA[A vintage General Electric PC ad from BASIC&#039;s birth era, the 60s. This ad is for the cut-down GE-210 versus the colossal 2000 LB GE-225 used to create the BASIC programming language.]]></media:text>
                                <media:title type="plain"><![CDATA[A vintage General Electric PC ad from BASIC&#039;s birth era, the 60s. This ad is for the cut-down GE-210 versus the colossal 2000 LB GE-225 used to create the BASIC programming language.]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/NpoNieWfbkYo7UnnKxqYJk-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>BASIC, the programming language best known today for having the most "dialects" of derived programming languages, turned 60 this month. The original version of BASIC (Beginner&apos;s All-Purpose Symbolic Instruction Code) is also referred to as "Dartmouth BASIC", since its origins are with <a href="https://www.dartmouth.edu/basicfifty/basic.html">Dartmouth</a>, a university based in New Hampshire. Naturally, it serves as the foundation point for dozens of later BASIC languages. </p><p>The original, Dartmouth BASIC launched in May 1964 and received updates and maintenance all the way up through 1979. In the times before BASIC and accessible programming languages like it, PCs were still machines that took up entire rooms and had to be programmed on a near case-by-case function to do much of anything. People say that BASIC "democratized" programming, and this is because besides being one of the first major programming languages, and it&apos;s actually one of the most accessible, too.</p><p>Dartmouth BASIC was developed alongside "a time-sharing system" to be used with a General Electric computer. In this context, time-sharing refers to a PC that is built to divide its resources among multiple terminals at the same time— and the first-ever test of BASIC was done with two BASIC applications simultaneously across two separate terminals connected to the same GE-225 machine.</p><p>So, just how influential is Dartmouth BASIC? To this day, <a href="https://en.wikipedia.org/wiki/List_of_BASIC_dialects">several dozens of BASIC dialects</a> tailored to specific use cases and devices have been seen in the past six decades. Early offshoots of BASIC include Atari BASIC, Microsoft BASIC, and even TI-BASIC* alongside Commodore BASIC. *That&apos;s Texas Instruments. </p><p>More recently, major dialects include Microsoft&apos;s Visual Basic and its offshoots. Coverage of the Dartmouth BASIC 60th anniversary by <a href="https://www.theregister.com/2024/05/03/basic_60th_birthday_releases/">The Register</a> also highlights closely-timed updates to Small Visual Basic 3.0, SE BASIC 4.2, and a custom QB64 QuickBasic, which is derived from Microsoft&apos;s QuickBasic.</p><p>Of course, those operating critical machines should be wary when building with or using applications that rely on older versions of BASIC. Did you know the U.S. government recommends against using programming languages like C++ due to them not being considered "<a href="https://www.tomshardware.com/software/security-software/white-house-urges-developers-to-avoid-c-and-c-use-memory-safe-programming-languages">memory-safe</a>"? </p><p>Of course, no one&apos;s going to stop a regular old hobbyists from programming whatever they like with whatever they like— and no one should. We highly recommend anyone who wants to start getting into BASIC programming or one of its many dialects do so, because it&apos;s basically the programming language that taught most newer ones how to be accessible.</p><p>All that said, it&apos;s worth noting that Dartmouth <a href="https://www.computer.org/publications/tech-news/insider-membership-news/timeline-of-programming-languages">BASIC isn&apos;t the <em>first</em> programming language</a>— that honor actually belongs to either Ada Lovelace&apos;s 1843 machine algorithm or Konrad Zuse&apos;s 1940 Plankalkul — and plenty of subsequent languages aren&apos;t based on it at all.</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How To Use Lists in Python ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/lists-in-python</link>
                                                                            <description>
                            <![CDATA[ Learn how to work with lists in Python by creating a real world project which has them at its heart. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">S5SUqVkFMxFzDzc7EjaM9k</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/pPnHVJy9adxSK4yewm2LJ9-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sat, 23 Sep 2023 14:59:44 +0000</pubDate>                                                                                                                                                                                                                                <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/pPnHVJy9adxSK4yewm2LJ9-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Lists in Python]]></media:description>                                                            <media:text><![CDATA[Lists in Python]]></media:text>
                                <media:title type="plain"><![CDATA[Lists in Python]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/pPnHVJy9adxSK4yewm2LJ9-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Lists are a common way to store multiple pieces of data in Python. By creating one list we can neatly store many different types of data within it. They work just like a shopping list. We give the list a name, then enter items under the list. </p><p>Lists are another data storage structure, just like <a href="https://www.tomshardware.com/how-to/use-dictionaries-in-python"><u>dictionaries</u></a>, tuples and sets. Lists are mutable objects, we can change the contents by updating, deleting and adding to a list. Objects stored in a list come under the broad term of “items” and each item has a position in the list, an index number. The first object in the list has the index number of zero, and as we get more items, it counts up.</p><p>We’re going to learn how to create lists and then update and delete the items within them. Then we will apply our knowledge to create a shopping list app which sends lists directly to our cell phone.</p><p>To demonstrate how to use lists in Python, we will use Thonny, a free, easy to use and cross platform Python editor. </p><p>Before you begin, <strong>install Thonny </strong>if you don’t have it already. Go to the Thonny site to <a href="https://thonny.org/"><u>download the release</u></a> for your system. <strong>Alternatively, install the official Python release </strong><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11"><u><strong>using this guide</strong></u></a><strong>.</strong> Note that this guide covers installation on Windows 10 and 11.</p><h2 id="how-to-create-a-list-in-python">How To Create a List in Python</h2><p>The most basic form of a list involves creating the list object and then placing items inside of it.</p><p>1. <strong>In a new blank document, create a list called “shopping” and in there store three items of shopping.</strong> Items in a list can be integers, floats, strings, even another list. Lists can also be created with no items, shopping = [] will create a blank list but we will need to append data to it. We cover updating lists later.</p><pre class="line-numbers language-bash" language="bash" ><code>shopping = ["Apples","Bananas","Milk"]</code></pre><p>2. <strong>Print the entire contents of the list. </strong>This shows the list contents, including the [ ] brackets.</p><pre class="line-numbers language-bash" language="bash" ><code>print(shopping)</code></pre><p>3. <strong>Save the code as shopping.py and click Run >> Run Current Script. </strong>The output looks something like [&apos;Apples&apos;, &apos;Bananas&apos;, &apos;Milk&apos;] which proves that the list works, but we can use it to generate content in sentences.</p><p>4. <strong>Add another print function to identify that we are printing a shopping list.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>print("The shopping list contains")</code></pre><p>5. <strong>Using a </strong><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python#:~:text=In%20programming%2C%20for%20loops%20are,a%20dictionary%2C%20list%20or%20tuple."><u><strong>for loop</strong></u></a><strong> with a range, we print each item from the list, using Python’s string formatting method to drop the item into the sentence as a string. </strong>How do we know the number of items in a list to create a range? Well right now it doesn’t matter as the len() function will calculate the length of the shopping list object and use that value as the range. Then the for loop will iterate through the items, updating the value of i each time the loop iterates.</p><pre class="line-numbers language-bash" language="bash" ><code>for i in range(len(shopping)):   print("I need to buy {:s}".format(shopping[i]))</code></pre><p>6. <strong>Save the code and click Run >> Run Current Script. </strong>We will see the full list printed, then our shopping list text is printed to the Python Shell.</p><h2 id="complete-code-listing-creating-a-list">Complete Code Listing: Creating a List</h2><pre class="line-numbers language-bash" language="bash" ><code>shopping = ["Apples","Bananas","Milk"]print(shopping)print("The shopping list contains")for i in range(len(shopping)):   print("I need to buy {:s}".format(shopping[i]))</code></pre><h2 id="updating-and-deleting-items-in-a-list">Updating and Deleting Items in a List</h2><p>Lists are mutable objects. This means we can create, update and delete entries from a list. In our current shopping list we have bananas, but we have looked in the fruit bowl and found that we have plenty of bananas, but we have no grapes! So lets swap the bananas for grapes.</p><p>1. On a new line outside of the previous for loop, <strong>print a message to say that we are updating the contents of the shopping list.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>print("Shopping list has changed")</code></pre><p>2. <strong>Change Bananas to Grapes by updating the value for that item in the list.</strong> We know that “Bananas” is the second item in the list, as Python counts from zero we know that the item&apos;s position in the list is 1.</p><pre class="line-numbers language-bash" language="bash" ><code>shopping[1] = "Grapes"</code></pre><p>3. <strong>Using a </strong><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python#:~:text=In%20programming%2C%20for%20loops%20are,a%20dictionary%2C%20list%20or%20tuple."><u><strong>for loop</strong></u></a><strong> with a range we print each item from the list. </strong>This will print out the old list, and then the updated list.</p><p>4. <strong>Save and run the code. </strong>The updated list, and the previous list are printed to the Python Shell.</p><p>We open the fridge door and realize that we need to add butter, eggs and cheese to our shopping list. We can append a single item to the end of the list or we can extend the list and pass it multiple items.</p><p>1. <strong>On a new line outside of the previous for loop and print a message to say that we are updating the contents of the shopping list, again.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>print("Shopping list has changed again")</code></pre><p>2. <strong>Append Cheese to the shopping list. </strong>Append will add the item to the end of the list.</p><pre class="line-numbers language-bash" language="bash" ><code>shopping.append("Cheese")</code></pre><p>3. <strong>Use extend to add multiple items to the shopping list.</strong> Extend requires us to wrap the items that we wish to add in parenthesis. These new items can be any iterable objects, in this case I have used a tuple to contain the items.</p><pre class="line-numbers language-bash" language="bash" ><code>shopping.extend(("Butter","Eggs"))</code></pre><p>4. <strong>Using a </strong><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python#:~:text=In%20programming%2C%20for%20loops%20are,a%20dictionary%2C%20list%20or%20tuple."><u><strong>for loop</strong></u></a><strong> with a range we print each item from the list. </strong>This will print out the old lists, and then the updated list.</p><p>5. <strong>Save and run the code. </strong>The updated list, and the previous lists are printed to the Python Shell.</p><p>We get to the store and realize that we don’t need eggs! So let&apos;s take them off our list.</p><p>1. <strong>On a new line outside of the previous for loop, print a message to say that we are removing the eggs.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>print("Removing the eggs")</code></pre><p>2. <strong>Remove the eggs from the shopping list.</strong> Note that the item value is case sensitive. “Eggs” is not the same as “eggs”.</p><pre class="line-numbers language-bash" language="bash" ><code>shopping.remove("Eggs")</code></pre><p>3. <strong>Use a conditional statement to check that Eggs are no longer on the shopping list. </strong>If there are eggs, it will tell us that we forgot to remove them. If there are no eggs, then the else condition will activate and print that they have been removed from the list.</p><pre class="line-numbers language-bash" language="bash" ><code>if "Eggs" in shopping:   print("I forgot to remove the eggs")else:   print("The eggs have been removed from the list")</code></pre><p>4. <strong>Save and run the code. </strong>If the eggs have been removed you will see a confirmation, if not, then you will see a reminder.</p><h2 id="complete-code-listing-updating-and-deleting-items-in-a-list">Complete Code Listing: Updating and Deleting Items in a List</h2><pre class="line-numbers language-bash" language="bash" ><code>print("Shopping list has changed")shopping[1] = "Grapes"for i in range(len(shopping)):    print("I need to buy {:s}".format(shopping[i]))print("Shopping list has changed again")shopping.append("Cheese")shopping.extend(("Butter","Eggs"))for i in range(len(shopping)):    print("I need to buy {:s}".format(shopping[i]))print("Removing the eggs")shopping.remove("Eggs")if "Eggs" in shopping:    print("I forgot to remove the eggs")else:    print("The eggs have been removed from the list")</code></pre><h2 id="using-a-for-loop-with-a-list">Using a For Loop With a List</h2><p>Earlier we used a for loop with a range to print the items in our shopping list using its position (index number). There is another way though, we can create a variable and using a for loop we can iterate over the items in the shopping list and print them out. All of this is accomplished without the need for an index number.</p><p>1. <strong>On a new line, print a message to say that we are using a for loop.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>print("Using a for loop to print our shopping list")</code></pre><p>2. <strong>Use a for loop to iterate over each item in the shopping list.</strong> The value of “item” will change each time the for loop iterates. When all of the items have been iterated through, the for loop will end.</p><pre class="line-numbers language-bash" language="bash" ><code>for item in shopping:</code></pre><p>3. <strong>Print the message to the Python Shell using string formatting. </strong>We only need to pass the item variable, not shopping(item) as we are working inside the list.</p><pre class="line-numbers language-bash" language="bash" ><code>   print("I need to buy {:s}".format(item))</code></pre><p>4. <strong>Save and run the code. </strong>The for loop will print out the contents of the shopping list.</p><h2 id="complete-code-listing-using-a-for-loop-with-a-list">Complete Code Listing: Using a For Loop With a List</h2><pre class="line-numbers language-bash" language="bash" ><code>print("Using a for loop to print our shopping list")for item in shopping:   print("I need to buy {:s}".format(item))</code></pre><h2 id="using-lists-in-a-real-world-project">Using Lists in a Real World Project</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1080px;"><p class="vanilla-image-block" style="padding-top:80.19%;"><img id="eMTh7H7CaWb7Ci5NaxT6i9" name="shopping_notif.png" alt="Lists in Python" src="https://cdn.mos.cms.futurecdn.net/eMTh7H7CaWb7Ci5NaxT6i9.png" mos="" align="middle" fullscreen="1" width="1080" height="866" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/eMTh7H7CaWb7Ci5NaxT6i9.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>A shopping list on our desktop computer isn’t much use really, but a shopping list on our cell phone, and the cellphones of other family members is. We’re going to use <a href="https://ntfy.sh/"><u>ntfy.sh</u></a>, a service to send notifications to Android and iOS devices. We used it in our <a href="https://www.tomshardware.com/how-to/use-dictionaries-in-python"><u>Dictionaries how to</u></a> as a service to send messages and images to devices.</p><p>1. <a href="https://ntfy.sh/"><u><strong>Install ntfy.sh</strong></u> </a>for your Android / iOS device.</p><p>2. <strong>Open the app and click on + </strong>to create a new subscription.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1080px;"><p class="vanilla-image-block" style="padding-top:200.00%;"><img id="3Ttm5gAmnNvXXFUGGRhwb9" name="ntfy1.png" alt="Lists in Python" src="https://cdn.mos.cms.futurecdn.net/3Ttm5gAmnNvXXFUGGRhwb9.png" mos="" align="middle" fullscreen="1" width="1080" height="2160" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/3Ttm5gAmnNvXXFUGGRhwb9.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>3. <strong>Create a new topic and click Subscribe. </strong>We chose to use th-shopping-list. Create a topic that is personal to you. Also note that topics may not be password protected, so do not send sensitive data.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1008px;"><p class="vanilla-image-block" style="padding-top:97.62%;"><img id="5egXTDqJi5CkYgChuSnou9" name="topic.png" alt="Lists in Python" src="https://cdn.mos.cms.futurecdn.net/5egXTDqJi5CkYgChuSnou9.png" mos="" align="middle" fullscreen="1" width="1008" height="984" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/5egXTDqJi5CkYgChuSnou9.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>4. <strong>Leave the app open </strong>on your device. </p><p>Now our attention turns to our PC running Thonny.</p><p>5. <strong>Create a blank file.</strong></p><p>6. <strong>Import the requests module. </strong>This is a module of pre-written Python code designed for sending and receiving network connections.</p><pre class="line-numbers language-bash" language="bash" ><code>import requests</code></pre><p>7. <strong>Create a blank list called shopping.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>shopping = []</code></pre><p>8. <strong>Create a variable, num_items and using an input function, capture the answer to the question and save it as an integer.</strong> The input function can take a prompt argument, with it we can create custom prompts.</p><pre class="line-numbers language-bash" language="bash" ><code>num_items = int(input("How many items do you want to add to your shopping list? "))</code></pre><p>9. <strong>Using a for loop, iterate through the required number of items, asking the user to enter the item name and append to the shopping list.</strong> Another input function is used to capture the users shopping items, the prompt has to be a string for we use f-string formatting to convert. What we convert is the value of i, the item. The value of i is linked to the index number, the item’s position in the list. In the list it starts from zero, but for the input prompt we add one to the value for something that is more understandable for most humans. This is purely cosmetic and does not impact the list index numbers.</p><pre class="line-numbers language-bash" language="bash" ><code>for i in range(num_items):   item = input(f"Enter item {i+1}: ")   shopping.append(item)</code></pre><p>10. <strong>Print a message and then use a for loop to print the contents of the shopping list. </strong>This is more for debugging, but useful to check that our list is correct.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>print("The shopping list is:")for item in shopping:   print(item)</code></pre><p>11. <strong>Create a new variable, shopping_list and in there store the entire contents of the shopping list, using commas to separate the values. </strong>This is a formatting step to ensure that the list is sent correctly via ntfy.sh.</p><pre class="line-numbers language-bash" language="bash" ><code>shopping_list = (", ".join(shopping))</code></pre><p>12. <strong>Send the shopping list to the correct ntfy.sh topic.</strong> The shopping_list object is the data that we wish to send, the header is a title to clearly identify what the data is.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>requests.post("https://ntfy.sh/th-shopping-list",   data=shopping_list,   headers={ "Title": "Shopping List" })</code></pre><p>13. <strong>Save the code as shopping-list.py and click Run.</strong> Enter the number of shopping list items, press Enter and type each item and press Enter. Once the final entry has been made, the final Enter key press will send the list to your cellphone / mobile device. Check your device for the notification.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1280px;"><p class="vanilla-image-block" style="padding-top:56.25%;"><img id="SjxKTM9AxBaY5ZEKSuqzR9" name="notif.jpg" alt="Lists in Python" src="https://cdn.mos.cms.futurecdn.net/SjxKTM9AxBaY5ZEKSuqzR9.jpg" mos="" align="middle" fullscreen="1" width="1280" height="720" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/SjxKTM9AxBaY5ZEKSuqzR9.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="complete-code-listing-real-world-project">Complete Code Listing: Real World Project</h2><pre class="line-numbers language-bash" language="bash" ><code>import requestsshopping = []num_items = int(input("How many items do you want to add to your shopping list? "))for i in range(num_items):   item = input(f"Enter item {i+1}: ")   shopping.append(item)print("The shopping list is:")for item in shopping:   print(item)shopping_list = (", ".join(shopping))requests.post("https://ntfy.sh/th-shopping-list",   data=shopping_list,   headers={ "Title": "Shopping List" })</code></pre><h2 id="more-python-tutorials">More Python Tutorials</h2><ul><li><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11">How To Install Python on Windows 10 and 11</a></li><li><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">How to use For Loops in Python</a></li><li><a href="https://www.tomshardware.com/how-to/enumerate-in-python">How to Enumerate in Python</a></li><li><a href="https://www.tomshardware.com/how-to/create-python-executable-applications">How to Create Executable Applications in Python</a></li><li><a href="https://www.tomshardware.com/how-to/python-remove-image-backgrounds">How To Remove Backgrounds From Images With Python</a></li><li><a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny">How to Create Web Apps with Python, HTML and Thonny</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-camera-module-3-python-picamera-2">How To Use Raspberry Pi Camera Module 3 with Python Code</a></li></ul><h2 id="python-how-tos">Python How Tos</h2><ul><li><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11">How To Install Python on Windows 10 and 11</a></li><li><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">How to use For Loops in Python</a></li><li><a href="https://www.tomshardware.com/how-to/enumerate-in-python">How to Enumerate in Python</a></li><li><a href="https://www.tomshardware.com/how-to/create-python-executable-applications">How to Create Executable Applications in Python</a></li><li><a href="https://www.tomshardware.com/how-to/python-remove-image-backgrounds">How To Remove Backgrounds From Images With Python</a></li><li><a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny">How to Create Web Apps with Python, HTML and Thonny</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-camera-module-3-python-picamera-2">How To Use Raspberry Pi Camera Module 3 with Python Code</a></li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How To Create and Use Python Functions ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/create-python-functions</link>
                                                                            <description>
                            <![CDATA[ Functions are powerful and useful. With functions we can run many lines of code just by calling their name. Automate processes and make our code a little easier to read. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">MbzKDRvRLnFXcWSNeA2M36</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/exrrXhTfsUy6bZ6ughpEza-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Mon, 11 Sep 2023 11:45:07 +0000</pubDate>                                                                                                                                <updated>Sat, 16 Sep 2023 15:36:56 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/exrrXhTfsUy6bZ6ughpEza-1280-80.jpg">
                                                            <media:credit><![CDATA[Pexels]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Python Functions]]></media:description>                                                            <media:text><![CDATA[Python Functions]]></media:text>
                                <media:title type="plain"><![CDATA[Python Functions]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/exrrXhTfsUy6bZ6ughpEza-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Functions are incredibly powerful. We use them every day of our lives. When our parents said “clean your room!” We knew what had to be done. Functions are blocks of code that are executed when we call their name. But they can do much more than that. Functions can have arguments (parameters) passed to them, so we could pass a function the latest temperature from a sensor and use the function to trigger a fan to turn on. We could use a function to read the contents of a <a href="https://www.tomshardware.com/how-to/use-dictionaries-in-python"><u>dictionary</u></a> and work on the data stored within it.</p><p>In this how to. we will introduce the concept of functions and a few of its most powerful features. We will also build a project to read the current status of our PC and provide the data to the Python Shell.</p><p>To demonstrate how to use functions in Python, we will use Thonny, a free, easy to use and cross platform Python editor. </p><p>Before you start, <strong>Install Thonny </strong>if you don’t have it already. You can <a href="https://thonny.org/"><u>download the release</u></a> for your system on the app’s official site.<br><br>Alternatively, <strong>you can install the official Python release </strong><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11"><u><strong>using this guide</strong></u></a><strong>.</strong> Note that this guide covers installation on Windows 10 and 11.</p><h2 id="how-to-create-a-function-in-python">How to Create a Function in Python</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:633px;"><p class="vanilla-image-block" style="padding-top:74.88%;"><img id="jE43nFjMhAg3ngVxCEScsb" name="hello1.jpg" alt="Python Functions" src="https://cdn.mos.cms.futurecdn.net/jE43nFjMhAg3ngVxCEScsb.jpg" mos="" align="middle" fullscreen="1" width="633" height="474" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/jE43nFjMhAg3ngVxCEScsb.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>Functions are “defined” using the “def” keyword. When the function name is called, the contents of the function are run and the output is sent to the Python Shell.</p><p>1. <strong>Create a function called hello.</strong> As is tradition in programming, we will use “Hello World” as a quick and simple demonstration of using a function.</p><pre class="line-numbers language-bash" language="bash" ><code>def hello():</code></pre><p>2. <strong>Add a for loop that will iterate (loop) ten times.</strong> <a href="https://www.tomshardware.com/how-to/use-for-loops-in-python"><u>For loops</u></a> are an easy way to repeat actions in any programming language. Here we are using a range to set the number of loops, but for loops can also iterate through objects in lists, <a href="https://www.tomshardware.com/how-to/use-dictionaries-in-python"><u>dictionaries</u></a> or tuples.</p><pre class="line-numbers language-bash" language="bash" ><code>   for i in range(10):</code></pre><p>3. <strong>Use print to output “Hello World!” to the Python Shell. </strong>Print is a <a href="https://docs.python.org/3/library/functions.html"><u>built-in function</u></a> for Python. Its role is to print objects. The message that we want to print is called an “argument” or “parameter” and we will cover this later in the how to.</p><pre class="line-numbers language-bash" language="bash" ><code>   print("Hello World!")</code></pre><p>4. <strong>Save the code as hello_world.py and click Run >> Run Current Script, or press the green run button. </strong>What happens? Here is where we make a mistake to reinforce how functions work. Our function has been created, but we have not called the function, so Python is waiting for a command.</p><p>5. <strong>On a new line, not inside the for loop or function, call the function by its name</strong>. Remember to include the parenthesis at the end of the function name.</p><pre class="line-numbers language-bash" language="bash" ><code>hello()</code></pre><p>6. <strong>Click Run >> Run Current Script, or press the green run button. </strong>The Python Shell will see “Hello World!” printed ten times.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1089px;"><p class="vanilla-image-block" style="padding-top:70.16%;"><img id="ebfhTEVjyvy5wkJqjnQ57c" name="hello2.jpg" alt="Python Functions" src="https://cdn.mos.cms.futurecdn.net/ebfhTEVjyvy5wkJqjnQ57c.jpg" mos="" align="middle" fullscreen="1" width="1089" height="764" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/ebfhTEVjyvy5wkJqjnQ57c.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="complete-code-listing-a-simple-function">Complete Code Listing: A Simple Function</h2><pre class="line-numbers language-bash" language="bash" ><code>def hello():    for i in range(10):        print("Hello World!")hello()</code></pre><h2 id="how-to-create-a-function-with-arguments">How to Create a Function With Arguments</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:616px;"><p class="vanilla-image-block" style="padding-top:104.22%;"><img id="cBXEtRcCMWYQ9Q54WWLHzb" name="hello3.jpg" alt="Python Functions" src="https://cdn.mos.cms.futurecdn.net/cBXEtRcCMWYQ9Q54WWLHzb.jpg" mos="" align="middle" fullscreen="1" width="616" height="642" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/cBXEtRcCMWYQ9Q54WWLHzb.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>Arguments, sometimes called parameters, are extra instructions to an object. Python’s functions can use arguments, we just need to add them into the parentheses. By default, Python will not look for an argument in a function, we need to set a template / expectation for the function. </p><p>In this section we will alter our “Hello World!” function to accept two arguments. The first is for the number of iterations in a for loop, the second will be for the phrase that we wish to repeat. When specifying arguments we need to ensure that we pass the correct number. If the function specifies two arguments, then we need to pass it two. Failure to do this will cause the function call to error.</p><p>1. <strong>Create a function called hello and pass it two arguments, x and phrase. </strong>We use x as a placeholder for the number of loops, “phrase” is used to represent the message that we want to print.</p><pre class="line-numbers language-bash" language="bash" ><code>def hello(x, phrase):</code></pre><p>2. <strong>Add a for loop that will iterate x times.</strong> The number of times that the loop will iterate is controlled using the x argument.</p><pre class="line-numbers language-bash" language="bash" ><code>   for i in range(x):</code></pre><p>3. <strong>Use print to output the “phrase” argument to the Python Shell. </strong>Remember, the phrase is set when we call the function.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>    print(phrase)</code></pre><p>4. <strong>On a new line, not inside the for loop or function, call the function by its name and pass the two arguments. </strong>The number of times to loop (x) and the message to print. We’ve chosen to loop five times and print Tom’s Hardware. It&apos;s not original, but it illustrates the goal of the project.</p><pre class="line-numbers language-bash" language="bash" ><code>hello(5, "Tom's Hardware")</code></pre><p>5. <strong>Save the code as hello_world.py and click Run >> Run Current Script, or press the green run button. </strong>The phrase will be printed to the Python Shell for the X number of times that you specified as an argument. </p><h2 id="complete-code-listing-functions-with-arguments-xa0">Complete Code Listing: Functions With Arguments </h2><pre class="line-numbers language-bash" language="bash" ><code>def hello(x, phrase):    for i in range(x):        print(phrase)hello(5, "Tom's Hardware")</code></pre><h2 id="how-to-create-a-function-with-default-and-keyword-arguments">How To Create a Function With Default and Keyword Arguments</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:665px;"><p class="vanilla-image-block" style="padding-top:72.78%;"><img id="eYTaUtGPsBmmRBZmf4BAWa" name="hello4.jpg" alt="Python Functions" src="https://cdn.mos.cms.futurecdn.net/eYTaUtGPsBmmRBZmf4BAWa.jpg" mos="" align="middle" fullscreen="1" width="665" height="484" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/eYTaUtGPsBmmRBZmf4BAWa.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>We’ve passed arguments to our functions, but we can also set a default argument. The default will be accepted and used if the function is passed without a user set argument. Here is a quick example which has a default argument of name. The default name is my own, and it is used in the function to greet the user. All we need to do is pass the name argument to create a new named greeting.</p><p>1. <strong>Create a function with a default argument of name.</strong> Obviously change the name to your choosing.</p><pre class="line-numbers language-bash" language="bash" ><code>def whoareyou(name = "Les"):</code></pre><p>2. <strong>Using the name argument, print a greeting to the user. </strong>Here we use Python’s string format method to insert the name argument as a string.</p><pre class="line-numbers language-bash" language="bash" ><code>   print("Hello {:s}!".format(name))</code></pre><p>3. <strong>Call the function with no argument.</strong> This should show that the default name is used.</p><pre class="line-numbers language-bash" language="bash" ><code>whoareyou()</code></pre><p>4. <strong>Call the function and pass a new name as an argument.</strong> Calling the function happens outside of the function itself.</p><pre class="line-numbers language-bash" language="bash" ><code>whoareyou("Dave")</code></pre><p>5. <strong>Save the code as name.py and click Run >> Run Current Script, or press the green run button. </strong>We can see that the code outputs two greetings. One for the default, the other for “Dave”.</p><h2 id="complete-code-listing-functions-with-default-argument">Complete Code Listing: Functions With Default Argument</h2><pre class="line-numbers language-bash" language="bash" ><code>def whoareyou(name = "Les"):    print("Hello {:s}!".format(name))whoareyou()whoareyou("Dave")</code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:968px;"><p class="vanilla-image-block" style="padding-top:62.60%;"><img id="jeyGqiAv7RrVpyicCf7Yfa" name="hello5.jpg" alt="Python Functions" src="https://cdn.mos.cms.futurecdn.net/jeyGqiAv7RrVpyicCf7Yfa.jpg" mos="" align="middle" fullscreen="1" width="968" height="606" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/jeyGqiAv7RrVpyicCf7Yfa.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>Keyword arguments are useful when we have multiple arguments to pass. In this example we use the classic Mad Libs structure to create a sentence with a noun, verb and thing. The order of the arguments doesn’t matter as we provide the key = value structure.</p><p>1. <strong>Create a function and configure it to accept three arguments.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>def madlibs(noun, verb, thing):</code></pre><p>2. <strong>Create a sentence that will print the noun, verb and thing to the Python shell. </strong>Again we use Python’s excellent string format method to drop the arguments into the sentence.</p><pre class="line-numbers language-bash" language="bash" ><code>   print("The {:s} {:s} over the {:s}.".format(noun, verb, thing))</code></pre><p>3. <strong>Save the code as madlibs.py and click Run </strong>>> Run Current Script, or press the green run button.</p><p>4. <strong>In the Python Shell, call the function and pass the three arguments. </strong>Remember to use the key, otherwise the order will be incorrect.<strong> Press Enter to run the code. </strong>You will see the sentence appear using your custom keywords.</p><pre class="line-numbers language-bash" language="bash" ><code>madlibs(noun = "rabbit",verb = "jumped",thing ="gate")</code></pre><h2 id="complete-code-listing-functions-with-multiple-arguments">Complete Code Listing: Functions With Multiple Arguments</h2><pre class="line-numbers language-bash" language="bash" ><code>def madlibs(noun, verb, thing):   print("The {:s} {:s} over the {:s}.".format(noun, verb, thing))</code></pre><h2 id="using-functions-to-get-pc-performance-data">Using Functions to Get PC Performance Data</h2><p>To illustrate how to use functions we are going to create a quick Python project that will get live CPU and RAM data using the psutil (process and system utilities) Python module.This module can get data on CPUs, RAM, disks, networks and other sensors, all using Python.</p><p>Before we can write any code, we need to install the psutil module.</p><p>1. <strong>In Thonny, click on Tools >> Manage Packages.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:377px;"><p class="vanilla-image-block" style="padding-top:56.76%;"><img id="hnDJKFJULFJfKQi5TUzY6b" name="install1.jpg" alt="Python Functions" src="https://cdn.mos.cms.futurecdn.net/hnDJKFJULFJfKQi5TUzY6b.jpg" mos="" align="middle" fullscreen="" width="377" height="214" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>2. <strong>Search for psutil and click Search on PyPi.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:636px;"><p class="vanilla-image-block" style="padding-top:71.86%;"><img id="UE4d8o3tUkWHYVXqnRJzBb" name="install2.jpg" alt="Python Functions" src="https://cdn.mos.cms.futurecdn.net/UE4d8o3tUkWHYVXqnRJzBb.jpg" mos="" align="middle" fullscreen="1" width="636" height="457" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/UE4d8o3tUkWHYVXqnRJzBb.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>3. <strong>Select psutil from the returned results.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:433px;"><p class="vanilla-image-block" style="padding-top:24.02%;"><img id="FSJN42Hq2Z6zh66vUJA4Gb" name="install3.jpg" alt="Python Functions" src="https://cdn.mos.cms.futurecdn.net/FSJN42Hq2Z6zh66vUJA4Gb.jpg" mos="" align="middle" fullscreen="1" width="433" height="104" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/FSJN42Hq2Z6zh66vUJA4Gb.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>4. <strong>Install psutil then close the dialog box when it is complete. </strong>We have already installed psutil so our dialog looks a little different.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:498px;"><p class="vanilla-image-block" style="padding-top:78.11%;"><img id="L5M9MqwW9DYgpEMDy7wvLb" name="install4.jpg" alt="Python Functions" src="https://cdn.mos.cms.futurecdn.net/L5M9MqwW9DYgpEMDy7wvLb.jpg" mos="" align="middle" fullscreen="1" width="498" height="389" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/L5M9MqwW9DYgpEMDy7wvLb.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>5. <strong>Create a new file in Thonny and import the psutil module.</strong></p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>import psutil</code></pre><p>6. <strong>Create a function, cpu(). </strong>This function will get the current CPU utilization and store it in a variable. We then print the value to the Python Shell using a string format.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>def cpu():   cpu = str(psutil.cpu_percent())   print("Current CPU usage is {:s}%".format(cpu))</code></pre><p>7. <strong>Create a new function, ram(). Use a print statement, along with some math to print a title with ten * either side.</strong>This function will handle all of the steps necessary to get the current amount of available memory.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>def ram():   print("*"*10,"RAM Stats","*"*10)</code></pre><p>8. <strong>Get the current memory stats and store them in a variable called “memory”.</strong></p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>   memory = psutil.virtual_memory()</code></pre><p>9. <strong>Extract the current amount of available RAM and store it in the variable.</strong> The memory object initially returns the total, available, percent, used and free memory. The returned object is a list, and we need the second value in the list, which is [1].</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>   memory = memory[1]</code></pre><p>10. <strong>Convert the amount of memory into Megabytes </strong>and <strong>round the value</strong> for ease of reading.</p><pre class="line-numbers language-bash" language="bash" ><code>   memory = round(memory / 1024 / 1024)</code></pre><p>11. <strong>Print the amount of available memory </strong>to the Python Shell.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>   print("There is {:n}MB of available RAM".format(memory))</code></pre><p>12. <strong>Create a function called cores(). </strong>This function will return the physical core count and the number of threads our CPU has.</p><pre class="line-numbers language-bash" language="bash" ><code>def cores():</code></pre><p>13. <strong>Create objects to store the physical number of CPU cores, and the number of threads.</strong> Setting the logical=False argument will force psutil to only return the physical cores.</p><pre class="line-numbers language-bash" language="bash" ><code>   physical = psutil.cpu_count(logical=False)   threads = psutil.cpu_count()</code></pre><p>14. <strong>Print the physical core count and thread to the Python Shell.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>   print("This CPU has {:n} cores and {:n} threads".format(physical, threads))</code></pre><p>15. <strong>Create a new function, cpuspeed(). Use a print statement, along with some math to print a title with ten * either side.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>def cpuspeed():   print("*"*10,"CPU Stats","*"*10)</code></pre><p>16. <strong>Store the current CPU speed data to an object called speed. Then extract the current speed and update the object.</strong> Initially we get a list which contains a tuple with three values, current speed, min, and max speed. So we need to get data from the first entry in the list [0], then get the first entry in the tuple [0].</p><pre class="line-numbers language-bash" language="bash" ><code>   speed = (speed[0][0])</code></pre><p>17. <strong>Print the speed to the Python Shell.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>   print("The CPU speed is {:n} MHz".format(speed))</code></pre><p>18. <strong>Create a function called all() and use it to call all of the previous functions.</strong> Functions can call other functions.</p><pre class="line-numbers language-bash" language="bash" ><code>def all():   cpuspeed()   cores()   cpu()   ram()</code></pre><p>19. <strong>Create a try / except handler and use while True: to run our code. </strong>This section will try to run our code.</p><pre class="line-numbers language-bash" language="bash" ><code>try:   while True:</code></pre><p>20. <strong>Create an object, stat, and use it to store the user’s choice.</strong> We use an input() function to capture keyboard input from the user. We can also create a prompt asking the user for their choice.</p><pre class="line-numbers language-bash" language="bash" ><code>       stat = input("Please type 'cpu', 'ram', 'cores', 'cpuspeed' or press ENTER to show all stats: ")</code></pre><p>21. <strong>Use conditional tests to check the value stored in stat and route the code to the correct option.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>       if stat == "cpu":           cpu()       elif stat == "ram":           ram()       elif stat == "cores":           cores()       elif stat == "cpuspeed":           cpuspeed()</code></pre><p>22. <strong>Use else as a catch all option that will call the all() function and show every stat that we have a function for.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>       else:           all()</code></pre><p>23. <strong>Create an exception to handle the user pressing CTRL+C to end the code. </strong>This will print Exiting to the Python Shell.</p><pre class="line-numbers language-bash" language="bash" ><code>except KeyboardInterrupt:   print("Exiting")</code></pre><p>24. <strong>Save the code as performance.py  and click Run >> Run Current Script, or press the green run button. </strong>You will see the Python Shell ask for your input. Follow the guidance and your requested data will display in the Shell.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1278px;"><p class="vanilla-image-block" style="padding-top:109.62%;"><img id="9xmqWFqFEiJ8UHFJR6hnXb" name="stats.jpg" alt="Python Functions" src="https://cdn.mos.cms.futurecdn.net/9xmqWFqFEiJ8UHFJR6hnXb.jpg" mos="" align="middle" fullscreen="1" width="1278" height="1401" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/9xmqWFqFEiJ8UHFJR6hnXb.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="complete-code-listing-using-functions-to-get-pc-performance-data">Complete Code Listing: Using Functions to Get PC Performance Data</h2><pre class="line-numbers language-bash" language="bash" ><code>import psutildef cpu():   cpu = str(psutil.cpu_percent())   print("Current CPU usage is {:s}%".format(cpu))def ram():   print("*"*10,"RAM Stats","*"*10)   memory = psutil.virtual_memory()   memory = memory[1]   memory = round(memory / 1024 / 1024)   print("There is {:n}MB of available RAM".format(memory))def cores():   physical = psutil.cpu_count(logical=False)   threads = psutil.cpu_count()   print("This CPU has {:n} cores and {:n} threads".format(physical, threads))def cpuspeed():   print("*"*10,"CPU Stats","*"*10)   speed = psutil.cpu_freq([1])   speed = (speed[0][0])   print("The CPU speed is {:n} MHz".format(speed))def all():   cpuspeed()   cores()   cpu()   ram()try:   while True:       stat = input("Please type 'cpu', 'ram', 'cores', 'cpuspeed' or press ENTER to show all stats: ")       if stat == "cpu":           cpu()       elif stat == "ram":           ram()       elif stat == "cores":           cores()       elif stat == "cpuspeed":           cpuspeed()       else:           all()except KeyboardInterrupt:   print("Exiting")</code></pre><h2 id="more-python-tutorials-2">More Python Tutorials</h2><ul><li><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11">How To Install Python on Windows 10 and 11</a></li><li><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">How to use For Loops in Python</a></li><li><a href="https://www.tomshardware.com/how-to/enumerate-in-python">How to Enumerate in Python</a></li><li><a href="https://www.tomshardware.com/how-to/create-python-executable-applications">How to Create Executable Applications in Python</a></li><li><a href="https://www.tomshardware.com/how-to/python-remove-image-backgrounds">How To Remove Backgrounds From Images With Python</a></li><li><a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny">How to Create Web Apps with Python, HTML and Thonny</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-camera-module-3-python-picamera-2">How To Use Raspberry Pi Camera Module 3 with Python Code</a></li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Microsoft Excel Gains Python Data Analysis and Visualization Support ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/microsoft-excel-gains-python-data-analysis-and-visualization-support</link>
                                                                            <description>
                            <![CDATA[ Microsoft is officially adding support for Python to Microsoft Excel with a little help from the third-party team Anaconda. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">kTrXtXQQKEVDyYwfXKHFA5</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/6fwSgi2cHsXuhohgy9LF56-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Tue, 22 Aug 2023 16:52:19 +0000</pubDate>                                                                                                                                <updated>Thu, 30 Jan 2025 16:24:49 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Ash Hill ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/p9HsnLCwBpTQYCBBhYXgrS.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Ash is a self-employed tech writer and illustrator with a serious affinity for the Raspberry Pi, 3D printing, retro gaming and finding the best tech deals and coupons. She has over a decade of IT experience and has been featured in the official Raspberry Pi magazine MagPi.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/6fwSgi2cHsXuhohgy9LF56-1280-80.jpg">
                                                            <media:credit><![CDATA[Shutterstock]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[shutterstock_2161657635]]></media:description>                                                            <media:text><![CDATA[shutterstock_2161657635]]></media:text>
                                <media:title type="plain"><![CDATA[shutterstock_2161657635]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/6fwSgi2cHsXuhohgy9LF56-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Microsoft’s Stefan Kinnestrand announced today that <a href="https://techcommunity.microsoft.com/t5/microsoft-365-blog/introducing-python-in-excel-the-best-of-both-worlds-for-data/ba-p/3905482"><u>Microsoft Excel</u></a> will officially support Python integration. This will be accomplished via a partnership with Anaconda which brings a huge repository with common libraries like statsmodels, Matplotlib and pandas. The new Python integration is available starting today as a preview for those in the Beta Channel Microsoft 365 Insiders group.</p><p>The integration will become a part of the many tools offered in Excel’s repertoire. As such, you won’t have to take any additional steps to add Python to your copy of Excel. More specifically, this integration will be implemented as a part of Excel’s data transformation tool known as Power Query.</p><p>If you want to get in on the early action, you’ll need to be a part of the Beta Channel Insider group in the <a href="https://insider.microsoft365.com/en-us/join/windows"><u>Microsoft 365 Insider Program</u></a>. The preview will be automatically included in the latest Insider build. Just install the latest copy of Excel offered and open a new workbook. In the ribbon go to ‘Formulas’ then ‘Insert Python’. There you should have an option to try the preview.</p><p><a href="https://www.anaconda.com/excel"><u>Anaconda</u></a> has more details about their work on the project over at their official website. We definitely recommend checking it out for an inside look at what the new Python support is capable of. They also offer training courses which can help you get off the ground with the new addition.</p><p>The preview will only be available for a limited time so now is your chance to check it out and see what it’s like hands-on. The preview will also be extended to Microsoft 365 subscribers. Once the preview expires, it will still be available but with limited functionality. To restore full access, users will need to purchase a license.</p><p>If you want to get a closer look at the details of the new rollout, we recommend both reading through the official announcement shared by <a href="https://techcommunity.microsoft.com/t5/microsoft-365-blog/introducing-python-in-excel-the-best-of-both-worlds-for-data/ba-p/3905482"><u>Microsoft</u></a> as well as the official documentation from <a href="https://www.anaconda.com/excel"><u>Anaconda</u></a><u>.</u></p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How To Use Dictionaries in Python ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/use-dictionaries-in-python</link>
                                                                            <description>
                            <![CDATA[ Learn how to create and use dictionaries in Python by creating a real world project which has them at its heart. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">ejXDnR2BpMsedjrcLJeFoD</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/qmyvSUATQ4pus5tAL7EgiV-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Mon, 21 Aug 2023 16:24:07 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:30 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/qmyvSUATQ4pus5tAL7EgiV-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Dictionaries in Python]]></media:description>                                                            <media:text><![CDATA[Dictionaries in Python]]></media:text>
                                <media:title type="plain"><![CDATA[Dictionaries in Python]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/qmyvSUATQ4pus5tAL7EgiV-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>In Python, dictionaries are data storage objects that use a key to retrieve a value. Think of your cell phone contact list or phone book. We look for the name of the person, the key, and their phone number is the value. Dictionaries are incredibly useful when storing and sorting data. We used a dictionary in our <a href="https://www.tomshardware.com/how-to/use-for-loops-in-python"><u>for loop project</u></a> which saw RSS news feeds used to generate content on a web page. </p><p>We’re going to go through how to create, update and delete keys and values inside of a dictionary and then use a dictionary in a real world project where we create a notification system using Python and <a href="https://ntfy.sh/"><u>nfty.sh</u></a>.</p><p>To demonstrate how to use Dictionaries in Python, we will use Thonny, a free, easy to use and cross platform Python editor.</p><p>1. <strong>In a browser go to the Thonny website and </strong><a href="https://thonny.org/"><u><strong>download the release</strong></u></a><strong> for your system.</strong></p><p>2.<strong> Alternatively, install the official Python release </strong><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11"><u><strong>using this guide</strong></u></a><strong>.</strong> Note that this guide covers installation on Windows 10 and 11.</p><h2 id="how-to-create-a-dictionary-in-python">How To Create a Dictionary in Python</h2><p>The most basic use for a dictionary is to store data, in this example we will create a dictionary called “registry” and in it store the names (keys) and starship registries / numbers (values) of characters from Star Trek.</p><p>1. <strong>Create a blank dictionary called “registry”. </strong>Dictionaries can be created with data already inside, but by creating a blank dictionary we have a “blank canvas” to start from.</p><pre class="line-numbers language-bash" language="bash" ><code>registry = {}</code></pre><p>2. <strong>Add a name and ship number to the registry.</strong> Remember that the name is a key, and the ship number is the value. Values can be strings, integers, floats, tuples, and lists.</p><pre class="line-numbers language-bash" language="bash" ><code>registry["James T Kirk"] = 1701</code></pre><p>3. <strong>Add another few names to the registry.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>registry["Hikaru Sulu"] = 2000registry["Kathryn Janeway"] = 74656registry["Ben Sisko"] = 74205</code></pre><p>4. <strong>Print the contents of the registry dictionary.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>print(registry)</code></pre><p>5. <strong>Save the code as starfleet-registry.py and click Run to start the code.</strong></p><h2 id="complete-code-listing-creating-a-dictionary">Complete Code Listing: Creating a Dictionary</h2><pre class="line-numbers language-bash" language="bash" ><code>registry = {}registry["James T Kirk"] = 1701registry["Hikaru Sulu"] = 2000registry["Kathryn Janeway"] = 74656registry["Ben Sisko"] = 74205print(registry)</code></pre><h2 id="updating-and-deleting-entries-in-a-dictionary">Updating and Deleting Entries in a Dictionary.</h2><p>Dictionaries are updatable (mutable in programming parlance) and that means we can update the key (names) and the values (ship numbers).</p><p>For our first scenario, we’ve had a call from Ben Sisko, and he wants his entry updated to Benjamin. We’re going to add this code to the previous example code.</p><p>1. <strong>Add a print statement to show that we are making updates.</strong> This is entirely optional, but for the purpose of this example it clarifies that we are updating the dictionary.</p><pre class="line-numbers language-bash" language="bash" ><code>print(“UPDATES”)</code></pre><p>2. <strong>Add a “Benjamin Sisko” key and set it to use the value stored under “Ben Sisko”.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>registry["Benjamin Sisko"] = registry["Ben Sisko"]</code></pre><p>3. <strong>Delete “Ben Sisko” from the registry.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>del registry["Ben Sisko"]</code></pre><p>4. <strong>Print the current contents of the registry. </strong>We can see that the “Ben Sisko” key is now gone, and is replaced with “Benjamin Sisko”. The value has also been transferred.</p><pre class="line-numbers language-bash" language="bash" ><code>print(registry)</code></pre><p>Next we will update the entry for James T Kirk. It seems that he has a new ship number (something to do with “accidentally” setting an easy password on his self-destruct app) and so we need to update the value for his entry.</p><p>1. <strong>Add a print statement to show that we are making updates.</strong> This is entirely optional, but for the purpose of this example it clarifies that we are updating the dictionary.</p><pre class="line-numbers language-bash" language="bash" ><code>print("Kirk's new number")</code></pre><p>2. <strong>Update the “James T Kirk” key with the new ship number.</strong> Note that because we are adding -A to the value, we have to wrap the value in “ “ to denote that we are now using a string.</p><pre class="line-numbers language-bash" language="bash" ><code>registry["James T Kirk"] = "1701-A"</code></pre><p>3. <strong>Print the contents of the registry</strong>. We can now see that James T Kirk has a new ship number.</p><p>Finally we need to delete Benjamin Sisko from the registry. It seems that he has gone “missing” while in the fire caves on Bajor. So we need to delete his entry from the registry. We’ll use the existing code, and add three new lines.</p><p>1. <strong>Add a print statement to show that we are deleting entries.</strong> This is entirely optional, but for the purpose of this example it clarifies that we are deleting entries from the dictionary.</p><pre class="line-numbers language-bash" language="bash" ><code>print("Deleting Benjamin Sisko")</code></pre><p>2. <strong>Delete “Benjamin Sisko” from the registry.</strong> We don’t know who the new captain will be yet.</p><pre class="line-numbers language-bash" language="bash" ><code>del registry["Benjamin Sisko"]</code></pre><p>3. <strong>Print the registry to confirm the deletion.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>print(registry)</code></pre><p>4. <strong>Save and run the code.</strong></p><h2 id="complete-code-listing-updating-and-deleting-a-dictionary">Complete Code Listing: Updating and Deleting a Dictionary</h2><pre class="line-numbers language-bash" language="bash" ><code>registry = {}registry["James T Kirk"] = 1701registry["Hikaru Sulu"] = 2000registry["Kathryn Janeway"] = 74656registry["Ben Sisko"] = 74205print(registry)print("UPDATES")registry["Benjamin Sisko"] = registry["Ben Sisko"]del registry["Ben Sisko"]print(registry)print("Kirk's new ship")registry["James T Kirk"] = "1701-A"print(registry)print("Deleting Benjamin Sisko")del registry["Benjamin Sisko"]print(registry)</code></pre><h2 id="using-a-for-loop-with-dictionaries">Using a For Loop With Dictionaries</h2><p><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python#"><u>For loops are awesome</u></a>. We can use them to iterate through an object, retrieving data as it goes. Lets use one with our existing code example to iterate through the names (keys) and print the name and ship number for each captain.</p><p>1. <strong>Create a for loop to iterate through the keys and values in the registry dictionary. </strong>This loop will iterate through all the items in the dictionary, saving the current key and value each time the loop iterates.</p><pre class="line-numbers language-bash" language="bash" ><code>for keys, values in registry.items():</code></pre><p>2. <strong>Create a sentence that embeds the Captain’s name (keys) and the ship’s number / registry (values).</strong></p><pre class="line-numbers language-bash" language="bash" ><code>print("Captain", keys, "registry is", values)</code></pre><p>3. <strong>Save the code and click Run.</strong> You will see the name and ship number for each captain printed at the bottom of the Python shell.</p><p><br></p><h2 id="complete-code-listing-using-a-for-loop-with-dictionaries">Complete Code Listing: Using a For Loop With Dictionaries</h2><pre class="line-numbers language-bash" language="bash" ><code>registry = {}registry["James T Kirk"] = 1701registry["Hikaru Sulu"] = 2000registry["Kathryn Janeway"] = 74656registry["Ben Sisko"] = 74205print(registry)print("UPDATES")registry["Benjamin Sisko"] = registry["Ben Sisko"]del registry["Ben Sisko"]print(registry)print("Kirk's new ship")registry["James T Kirk"] = "1701-A"print(registry)print("Deleting Benjamin Sisko")del registry["Benjamin Sisko"]print(registry)for keys, values in registry.items():   print("Captain", keys, "registry is", values)</code></pre><h2 id="using-dictionaries-in-a-real-world-project">Using Dictionaries in a Real World Project</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1079px;"><p class="vanilla-image-block" style="padding-top:53.29%;"><img id="ywdnr3xPZ3cVQ5ah2cezvV" name="ntfy0.png" alt="Dictionaries in Python" src="https://cdn.mos.cms.futurecdn.net/ywdnr3xPZ3cVQ5ah2cezvV.png" mos="" align="middle" fullscreen="1" width="1079" height="575" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/ywdnr3xPZ3cVQ5ah2cezvV.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>We’ve learnt the basics, now lets use a dictionary in a real world project. We’re going to use <a href="https://ntfy.sh/"><u>ntfy.sh</u></a>, a service to send notifications to Android and iOS devices. The Python API for ntfy.sh is based on dictionaries. Best of all, there are no Python installation files as it uses Python’s requests module to handle sending messages to ntfy.sh.</p><p>1. <a href="https://ntfy.sh/"><u><strong>Install ntfy.sh</strong></u> </a>for your Android / iOS device.</p><p>2. <strong>Open the app and click on + </strong>to create a new subscription.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1080px;"><p class="vanilla-image-block" style="padding-top:200.00%;"><img id="pBFagvemiJJBMDYNFTnM4W" name="ntfy1.png" alt="Dictionaries in Python" src="https://cdn.mos.cms.futurecdn.net/pBFagvemiJJBMDYNFTnM4W.png" mos="" align="middle" fullscreen="1" width="1080" height="2160" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/pBFagvemiJJBMDYNFTnM4W.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>3. Create a new topic and click Subscribe. </strong>We chose to use th-test. Create a topic that is personal to you. Also note that topics may not be password protected, so do not send sensitive data.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1079px;"><p class="vanilla-image-block" style="padding-top:98.42%;"><img id="vn2jnC6GtgBoS5P6aA7q9W" name="ntfy2.png" alt="Dictionaries in Python" src="https://cdn.mos.cms.futurecdn.net/vn2jnC6GtgBoS5P6aA7q9W.png" mos="" align="middle" fullscreen="1" width="1079" height="1062" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/vn2jnC6GtgBoS5P6aA7q9W.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>4. <strong>Leave the app open </strong>on your device. </p><p>Now our attention turns to our PC running Thonny.</p><p>5. <strong>Create a blank file.</strong></p><p>6.<strong> Import the requests module. </strong>This is a module of pre-written Python code designed for sending and receiving network connections.</p><pre class="line-numbers language-bash" language="bash" ><code>import requests</code></pre><p>7. <strong>Use requests to post a message to ntfy.</strong> Note that we need to specify the topic name, in our case <a href="https://ntfy.sh/th-test"><u>https://ntfy.sh/th-test</u></a>, as part of the function’s argument. The next argument, data is the text that the user will see. But our interest is in “headers” as this is a dictionary which can contain multiple entries. Right now it contains a title for the notification.</p><pre class="line-numbers language-bash" language="bash" ><code>requests.post("https://ntfy.sh/th-test",   data="This is a test of ntfy for Tom's Hardware",   headers={ "Title": "Python Dictionaries are useful" })</code></pre><p>8. <strong>Save the code as dictionary-ntfy.py and click Run.</strong> This will send the message to ntfy’s servers and from there the notification will appear on your device.</p><h2 id="complete-code-listing-real-world-project-2">Complete Code Listing: Real World Project</h2><pre class="line-numbers language-bash" language="bash" ><code>import requestsrequests.post("https://ntfy.sh/th-test",   data="This is a test of ntfy for Tom's Hardware",   headers={ "Title": "Python Dictionaries are useful" })</code></pre><h2 id="an-advanced-real-world-dictionary-project">An Advanced Real World Dictionary Project</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1080px;"><p class="vanilla-image-block" style="padding-top:98.15%;"><img id="tsUvfxMUb5F5XXA4WcEdaW" name="ntfy3.png" alt="Dictionaries in Python" src="https://cdn.mos.cms.futurecdn.net/tsUvfxMUb5F5XXA4WcEdaW.png" mos="" align="middle" fullscreen="1" width="1080" height="1060" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/tsUvfxMUb5F5XXA4WcEdaW.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>Lets create a more advanced project, one that uses a dictionary to store multiple items. We’re going to reuse the code from before, but tweak it to meet our needs.</p><p>1. <strong>Our import and requests line remain the same.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>import requestsrequests.post("https://ntfy.sh/th-test",</code></pre><p>2. <strong>Open and read a file into memory. </strong>This is the data that is sent in the notification. In this case we start with an image that is in the same directory as our code. If the image is in a different location on your machine, specify the full path to the file.</p><pre class="line-numbers language-bash" language="bash" ><code>   data=open("yoga.jpg", 'rb'),</code></pre><p>3. <strong>Create a dictionary called “headers”. </strong>This forms the information that is sent in the notification.</p><pre class="line-numbers language-bash" language="bash" ><code>   headers={</code></pre><p>4. <strong>Inside the headers dictionary, specify the following keys and values.</strong></p><p>Priority 5 messages are urgent, the highest priority and they will set your phone to vibrate / ring continuously until they are answered.</p><p>Tags: These are emojis and tags used to add icons and extra data to a notification. If the tag has an emoji, then you will see it.</p><p>Title: The top title, in bold for the notification.</p><p>Click: When you click on the notification, it will open the web page.</p><p>Filename: The name of the file that is being sent.</p><pre class="line-numbers language-bash" language="bash" ><code>       "Priority": "5",       "Tags": "rotating_light",       "Title": "Let me in, it is cold!!",       "Click": "https://www.tomshardware.com/reviews/elecfreaks-cm4-xgo",       "Filename": "yoga.jpg"   })</code></pre><p>5. <strong>Save the code and click Run.</strong> Now look at your device and you will see a notification showing our custom message.</p><h2 id="complete-code-listing-advanced-project">Complete Code Listing: Advanced Project</h2><pre class="line-numbers language-bash" language="bash" ><code>import requestsrequests.post("https://ntfy.sh/th-test",   data=open("yoga.jpg", 'rb'),   headers={       "Priority": "5",       "Tags": "rotating_light",       "Title": "Let me in, it is cold!!",       "Click": "https://www.tomshardware.com/reviews/elecfreaks-cm4-xgo",       "Filename": "yoga.jpg"   })</code></pre><h2 id="more-python-tutorials-3">More Python Tutorials</h2><ul><li><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11">How To Install Python on Windows 10 and 11</a></li><li><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">How to use For Loops in Python</a></li><li><a href="https://www.tomshardware.com/how-to/enumerate-in-python">How to Enumerate in Python</a></li><li><a href="https://www.tomshardware.com/how-to/create-python-executable-applications">How to Create Executable Applications in Python</a></li><li><a href="https://www.tomshardware.com/how-to/python-remove-image-backgrounds">How To Remove Backgrounds From Images With Python</a></li><li><a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny">How to Create Web Apps with Python, HTML and Thonny</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-camera-module-3-python-picamera-2">How To Use Raspberry Pi Camera Module 3 with Python Code</a></li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How to Enumerate in Python ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/enumerate-in-python</link>
                                                                            <description>
                            <![CDATA[ Python has a useful function that enables you to enumerate a list or tuple that can be easily called and used later in your script. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">K47zLtV69hKDB5ZFCZCEGc</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/kWZyNr8pFR7NSgdDTcx3rb-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Mon, 31 Jul 2023 17:21:48 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:19:18 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Ash Hill ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/p9HsnLCwBpTQYCBBhYXgrS.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Ash is a self-employed tech writer and illustrator with a serious affinity for the Raspberry Pi, 3D printing, retro gaming and finding the best tech deals and coupons. She has over a decade of IT experience and has been featured in the official Raspberry Pi magazine MagPi.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/kWZyNr8pFR7NSgdDTcx3rb-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Python]]></media:description>                                                            <media:text><![CDATA[Python]]></media:text>
                                <media:title type="plain"><![CDATA[Python]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/kWZyNr8pFR7NSgdDTcx3rb-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Once you’ve created a list or collection in Python, it might be useful to have each item numbered. Instead of going through the list manually and adding numerals one by one, it can be well worth looking into the enumerate function. This is a built-in tool that will go through a list and automatically number them in the order they were added to the tuple or list.</p><p>In this guide, we’ll go over how to use this enumerate function with an existing list. We’ll assume you already have familiarity with how to create a variable, list, and use functions. Once the list has been enumerated, it can be called later with the enumeration in place. You can even use a for loop (see <a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">how to use for loops in Python</a>) to iterate through the enumeration.</p><h2 id="what-is-enumeration-in-python">What is Enumeration in Python?</h2><p>Enumeration is the ordered listing of all items in a collection. In Python we can use this with a list or tuple to (data collection objects) into an enumerate object. The enumerate object has a name and value for each enum member within the object. The enumerate object can be updated (mutable) unlike other objects such as tuples which are immutable (cannot be updated).</p><h2 id="how-to-enumerate-in-python">How to Enumerate in Python</h2><p>To demonstrate how to use enumeration in Python, we’ll start with a list of flavors and label it ‘flavors’. After applying the enumeration function, we’ll print the list which will show that each item has been marked with a numeral sequentially.</p><p>1. <strong>Create a list</strong>, collection or tuple. In this case we have three flavors in a list labeled as a variable named ‘flavors’.</p><pre class="line-numbers language-python" language="python" ><code>flavors = ('Raspberry', 'Vanilla', 'Chocolate')</code></pre><p>2. <strong>Run the enumerate function.</strong> In the example code below, we’ve created a variable named ‘choices’ that consists of the enumerate function parsing the ’flavors&apos; object, as an argument.</p><pre class="line-numbers language-python" language="python" ><code>flavors = ('Raspberry', 'Vanilla', 'Chocolate')choices = enumerate(flavors)</code></pre><p>3. <strong>Print the list.</strong> You can now call the &apos;flavors&apos; object as needed in your code. For the sake of our example, we’ll print the list to show what it looks like when the list has been enumerated.</p><pre class="line-numbers language-python" language="python" ><code>flavors = ('Raspberry', 'Vanilla', 'Chocolate')choices = enumerate(flavors)print(list(choices))</code></pre><p>4. <strong>Confirm the results.</strong> The printed list should appear as follows if the enumeration was successful.</p><pre class="line-numbers language-python" language="python" ><code>[(0, 'Raspberry'), (1, 'Vanilla'), (2, 'Chocolate')]</code></pre><p>Even though we’ve printed the list to show the enumerate function, this is just to demonstrate how it works. You can apply it in your code as needed after the second step but printing the list is a quick way to make sure it’s working as intended.</p><p>We earlier mentioned that enumerated collections have a value and name associated to the data stored within. We can individually extract these values. Here is a quick example that creates an enumerated collection of foods.</p><p>1. <strong>Import the enum module.</strong> </p><pre class="line-numbers language-python" language="python" ><code>import enum</code></pre><p>2. <strong>Create a new enumeration object using a function-call syntax.</strong> Our object is called food, and in there we store a list of foods. By using the enum.Enum function call we bind  values to each of the item names.</p><pre class="line-numbers language-python" language="python" ><code>food = enum.Enum('food', ['Tomato', 'Cucumber', 'Chocolate'])</code></pre><p>3. <strong>Use a for loop to print the value and name of each item in the object. </strong>The for loop will iterate over every item in the object. We then print the value and name of the item.</p><pre class="line-numbers language-python" language="python" ><code>for item in food:    print(item.value, item.name)</code></pre><p>4. <strong>Run the code.</strong> The output will be the enumerated value of the item&apos;s position and the name of the item.</p><pre class="line-numbers language-python" language="python" ><code>1 Tomato2 Cucumber3 Chocolate</code></pre><h2 id="using-enumeration-to-number-chapters-in-a-book">Using Enumeration to Number Chapters in a Book</h2><p>There are plenty of practical applications for applying numbers to a list. In this example, we&apos;ll number the chapters in a book we&apos;re pretending to write. This example also shows how you can start a list from any number so it doesn&apos;t begin with the default value of 0.</p><p>I&apos;ll be using Thonny for this example. It&apos;s a free Python editor that works on several platforms. You can find it available for download on the official <a href="https://thonny.org">Thonny website</a>. However, you can use any editor you like for your project.</p><p>1. <strong>Make your list.</strong> In this case, my list is a handful of fake chapters for our book.</p><pre class="line-numbers language-python" language="python" ><code>chapters = ["How to Enumerate in Python", "Creating a List", "Enumerating the List"]</code></pre><p>2. <strong>Set the beginning of the list to 1 instead of 0.</strong> The next line tells Python that we want the chapter enumeration to begin at 1. The words &apos;chapter&apos; and &apos;title&apos; can be anything you like.</p><pre class="line-numbers language-python" language="python" ><code>chapters = ["How to Enumerate in Python", "Creating a List", "Enumerating the List"]for chapter, title in enumerate (chapters,1):</code></pre><p>3. <strong>Print the list.</strong> The third line prints the chapter variable which has the title argument setting the list to begin at 1.</p><pre class="line-numbers language-python" language="python" ><code>chapters = ["How to Enumerate in Python", "Creating a List", "Enumerating the List"]for chapter, title in enumerate (chapters,1):print(chapter, title)</code></pre><p>4. <strong>Run the program.</strong> It should print the chapters with the enumeration beginning at 1.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:861px;"><p class="vanilla-image-block" style="padding-top:34.96%;"><img id="mPXx2vK4rhanGjAwJf3Zcb" name="1690635122.jpg" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/mPXx2vK4rhanGjAwJf3Zcb.jpg" mos="" align="middle" fullscreen="" width="861" height="301" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="python-how-tos-2">Python How Tos</h2><ul><li><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11">How To Install Python on Windows 10 and 11</a></li><li><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">How to use For Loops in Python</a></li><li><a href="https://www.tomshardware.com/how-to/enumerate-in-python">How to Enumerate in Python</a></li><li><a href="https://www.tomshardware.com/how-to/create-python-executable-applications">How to Create Executable Applications in Python</a></li><li><a href="https://www.tomshardware.com/how-to/python-remove-image-backgrounds">How To Remove Backgrounds From Images With Python</a></li><li><a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny">How to Create Web Apps with Python, HTML and Thonny</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-camera-module-3-python-picamera-2">How To Use Raspberry Pi Camera Module 3 with Python Code</a></li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How to use For Loops in Python ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/use-for-loops-in-python</link>
                                                                            <description>
                            <![CDATA[ For loops provide a means to control the number of times your code performs a task. This can be a range, or iterating over items in an object. In this how to we will go through the steps to create your own projects using for loops. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">AhiEP3CeFtn8YQUidSJZQY</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/UhcuwXQZ9o8fkzxcUiu9k-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sat, 29 Jul 2023 11:00:55 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:19:09 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/UhcuwXQZ9o8fkzxcUiu9k-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[How To Use For Loops in Python]]></media:description>                                                            <media:text><![CDATA[How To Use For Loops in Python]]></media:text>
                                <media:title type="plain"><![CDATA[How To Use For Loops in Python]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/UhcuwXQZ9o8fkzxcUiu9k-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>In programming, for loops are incredibly versatile tools to repeat a section of code. For loops can loop for a set number of times using a range, they can have clauses / conditions which will end the loop and we can use them to iterate over items in a dictionary, list or tuple.</p><p>In this how to, we will show you how to get started with for loops using Python, the same syntax will also work with MicroPython and CircuitPython on boards such as the <a href="https://www.tomshardware.com/reviews/raspberry-pi-pico-w"><u>Raspberry Pi Pico.</u></a></p><p>To demonstrate how to use for loops in Python, we will use Thonny, a free, easy to use and cross platform Python editor. </p><p>1. <strong>In a browser go to the Thonny website and </strong><a href="https://thonny.org/"><u><strong>download the release</strong></u></a><strong> for your system.</strong></p><p>2. <strong>Alternatively, install the official Python release </strong><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11"><u><strong>using this guide</strong></u></a><strong>.</strong> Note that this guide covers installation on Windows 10 and 11.</p><h2 id="using-a-range-with-python-for-loops">Using a Range with Python For Loops</h2><p>The most basic for loop use in Python is to iterate over a range, essentially creating a loop that will only iterate for a set number of times. While “range” is not strictly part of the syntax for a for loop, it is really a built-in Python function that returns a sequence for a specific pattern, it is the easiest way to demonstrate how a for loop works.</p><p>1. <strong>Create a for loop and set the range to 10</strong>.This will set the value of x to an integer value, starting at 0 and ending at 9. The loop will iterate until it reaches the tenth loop, then it will end.</p><pre class="line-numbers language-bash" language="bash" ><code>for i in range(10):</code></pre><p>2. <strong>Print the current value of i as part of a sentence.</strong> Here we use Python’s string format method to insert the loop number each time the loop iterates.</p><pre class="line-numbers language-bash" language="bash" ><code>   print("This is loop: {:n}".format(i))</code></pre><p>3. <strong>Save the code as for_loop_range.py and click Run to start.</strong> You should see this output.</p><pre class="line-numbers language-bash" language="bash" ><code>This is loop: 0This is loop: 1This is loop: 2This is loop: 3This is loop: 4This is loop: 5This is loop: 6This is loop: 7This is loop: 8This is loop: 9</code></pre><h2 id="complete-code-listing-for-loop-with-a-range">Complete Code Listing: For Loop With a Range</h2><pre class="line-numbers language-bash" language="bash" ><code>for i in range(10):    print("This is loop: {:d}".format(i))</code></pre><h2 id="using-a-for-loop-with-rss-feeds">Using a For Loop With RSS Feeds</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1280px;"><p class="vanilla-image-block" style="padding-top:70.39%;"><img id="5YyEHZVneqNSahZomtiBD3" name="image5.jpg" alt="How To Use For Loops in Python" src="https://cdn.mos.cms.futurecdn.net/5YyEHZVneqNSahZomtiBD3.jpg" mos="" align="middle" fullscreen="1" width="1280" height="901" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/5YyEHZVneqNSahZomtiBD3.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>To better illustrate how we can use a for loop, let&apos;s use a for loop with a range to pull the top five headlines from BBC News’ RSS feed along with their corresponding URL.</p><p>1. <strong>Install feedparser using pip </strong>at a command prompt. Feedparser is an RSS parsing tool that we shall use to read the RSS feed and convert it into a Python dictionary.</p><pre class="line-numbers language-bash" language="bash" ><code>pip install feedparser</code></pre><p>2. <strong>In Thonny, create a new blank Python file </strong>and <strong>import feedparser.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>import feedparser</code></pre><p>3. <strong>Create an object, newsfeed, </strong>and in there <strong>store the parsed BBC News feed.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>newsfeed = feedparser.parse("http://feeds.bbci.co.uk/news/rss.xml")</code></pre><p>4. <strong>Use a for loop with a range of five.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>for i in range(5):</code></pre><p>5. <strong>Print the headlines (title) and the URL (link) of the top five stories. </strong>Here we are accessing the newsfeed object, which is a dictionary (array) that contains many more dictionaries and lists. Using the keys (entries, title and link) we can get the values that they store. The value of [i] increments, until it reaches 5, then the loop ends. We have how tos covering dictionaries and lists which go into further detail.</p><pre class="line-numbers language-bash" language="bash" ><code>   print(newsfeed['entries'][i]['title'])   print(newsfeed['entries'][i]['link'])</code></pre><p>6. <strong>Save the code as news_for_loop.py and click Run.</strong> You should see the top five news headlines.</p><h2 id="complete-code-listing-using-a-for-loop-with-rss-feeds-xa0">Complete Code Listing: Using a For Loop With RSS Feeds  </h2><pre class="line-numbers language-bash" language="bash" ><code>import feedparsernewsfeed = feedparser.parse("http://feeds.bbci.co.uk/news/rss.xml")for i in range(5):    print(newsfeed['entries'][i]['title'])    print(newsfeed['entries'][i]['link'])</code></pre><h2 id="for-loops-with-an-early-exit">For Loops With an Early Exit</h2><p>Ranges can also feature an “early exit”. This uses a conditional statement that checks the value of the of the loop (in our case it is stored in i) and if it matches the value, the code breaks and exits.</p><p>We’re going to reuse the code from the first example to start us off.</p><p>1. <strong>Add a conditional test that checks the value of i is the same as 4</strong>. In Python == is an operator that checks that one value is the same as another.</p><pre class="line-numbers language-bash" language="bash" ><code>   if i == 4:</code></pre><p>2. <strong>Print a sentence to inform the user that the loop is terminating. </strong>This part of the code will only activate once “i” contains the value 4.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>       print("This loop sequence terminates at loop {:n}".format(i))</code></pre><p>3. <strong>Break the loop, forcing the code to stop.</strong></p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>       break</code></pre><p>4. <strong>Save and run the code.</strong> You should see this output.</p><pre class="line-numbers language-bash" language="bash" ><code>This is loop: 0This is loop: 1This is loop: 2This is loop: 3This is loop: 4This loop sequence terminates at loop 4</code></pre><h2 id="complete-code-listing-for-loop-with-an-early-exit">Complete Code Listing: For Loop With an Early Exit</h2><pre class="line-numbers language-bash" language="bash" ><code>for i in range(10):    print("This is loop: {:n}".format(i))    if i == 4:        print("This loop sequence terminates at loop {:n}".format(i))        break</code></pre><h2 id="nested-for-loops">Nested For Loops</h2><p>We can have multiple for loops running together. For example we can nest one for loop inside of another. In this example we are reusing the code from the first example.</p><pre class="line-numbers language-bash" language="bash" ><code>for i in range(10):   print("This is loop: {:n}".format(i))</code></pre><p>1. <strong>Add a nested for loop that will iterate ten times. </strong>Ensure that the variable name is different to the main loop, otherwise the two will clash.</p><pre class="line-numbers language-bash" language="bash" ><code>   for j in range(10):</code></pre><p>2. <strong>Add a print statement to inform the user that this is the nested for loop.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>       print("This is nested loop: {:n}".format(i))</code></pre><p>3. <strong>Use a break to exit out of the nested for loop.</strong> If we don’t do this, then the nested for loop will repeat each time the main loop iterates.</p><pre class="line-numbers language-bash" language="bash" ><code>       break</code></pre><p><br></p><p>4. <strong>Save and run the code.</strong> You should see this output.</p><pre class="line-numbers language-bash" language="bash" ><code>This is loop: 0This is nested loop: 0This is loop: 1This is nested loop: 1This is loop: 2This is nested loop: 2This is loop: 3This is nested loop: 3This is loop: 4This is nested loop: 4This is loop: 5This is nested loop: 5This is loop: 6This is nested loop: 6This is loop: 7This is nested loop: 7This is loop: 8This is nested loop: 8This is loop: 9This is nested loop: 9</code></pre><h2 id="complete-code-listing-nested-for-loops">Complete Code Listing: Nested For Loops</h2><pre class="line-numbers language-bash" language="bash" ><code>for i in range(10):   print("This is loop: {:n}".format(i))   for j in range(10):       print("This is nested loop: {:n}".format(i))       break</code></pre><h2 id="iterating-with-for-loops">Iterating With For Loops</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1280px;"><p class="vanilla-image-block" style="padding-top:70.39%;"><img id="5YyEHZVneqNSahZomtiBD3" name="image5.jpg" alt="How To Use For Loops in Python" src="https://cdn.mos.cms.futurecdn.net/5YyEHZVneqNSahZomtiBD3.jpg" mos="" align="middle" fullscreen="1" width="1280" height="901" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/5YyEHZVneqNSahZomtiBD3.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>Iterating over objects in a list, dictionary or tuple is useful if we want to use data from these objects. In this example, we will reuse the code from our RSS feed reader to create a simple web app. A ranged for loop will grab the news headlines from the object, then split the headlines and their URLs apart and then store them inside of a Python dictionary object. Then we will use the dictionary as a source to generate an HTML page in a browser.</p><p>1. <strong>Install PyWebIO using pip </strong>at the command prompt<strong>,.</strong> PyWebIO is a means to create inputs and outputs around a browser session.</p><pre class="line-numbers language-bash" language="bash" ><code>pip install pywebio</code></pre><p>2. <strong>In Thonny, create a new blank Python file and import feedparser and import three PyWebIO classes. </strong>PyWebIO has many different classes and functions, but we are interested in creating a server, outputting information to a browser and controlling the session.</p><pre class="line-numbers language-bash" language="bash" ><code>import feedparserfrom pywebio import start_serverfrom pywebio.output import *    from pywebio.session import *</code></pre><p>3. <strong>Create an object, newsfeed, </strong>and in there <strong>store the parsed BBC News feed. </strong>This can be any RSS feed that you choose.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>newsfeed = feedparser.parse("http://feeds.bbci.co.uk/news/rss.xml")</code></pre><p>4. <strong>Create an empty dictionary called news_stories. </strong>Dictionaries are Python objects that store data using a key, value system. By calling a dictionary and referencing a key, we can get the value attached to it.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>news_stories = {}</code></pre><p>5. <strong>Using a for loop with a range, grab the first five news stories and store them inside the news_stories dictionary.</strong> The title (headline) will be the key, and the URL will be the value.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>for i in range(5):   news_stories.update({newsfeed['entries'][i]['title']:newsfeed['entries'][i]['link']})</code></pre><p>6. <strong>Create a function called main. </strong>This function will handle creating the web content to be served.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>def main():</code></pre><p>7. <strong>Set the page title.</strong> This is seen in the tab / title bar of the web browser.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>   set_env(title='Python For Loops RSS Example')</code></pre><p>8. <strong>Use a for loop to iterate over every key (k) and value (v) stored in the news_stories dictionary. </strong>The for loop will end once it has retrieved all of the keys and values, it does not need a range.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>   for k,v in news_stories.items():</code></pre><p>9. <strong>Place the headline text on the page. </strong>PyWebIO’s put_text function places raw text on a web page, and we pass the function the key value, which is the headline.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>       put_text(k)</code></pre><p>10. <strong>Place the URL underneath the headline. </strong>Using put_link we generate an HTML hyperlink with the text “Click here”. The URL is created from the value stored in v.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>       put_link('Click here',v)</code></pre><p>11. <strong>Outside of the for loop and the function, start the server. Call the main function and set the port to 8080, and debug to True.</strong> It is advisable to set the port to an unused value and typically 8080 is valid. If necessary change this to another value. Setting debug to True is useful as it provides output in the Python shell, and in the browser session.</p><pre class="line-numbers language-bash" language="bash" ><code>start_server(main, port=8080, debug=True)</code></pre><p>12. <strong>Save the code as for_loop_news_dict.py and click Run.</strong> The Python shell will display the URL of the generated page.</p><p><br></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:880px;"><p class="vanilla-image-block" style="padding-top:31.82%;"><img id="7Azy24mi3JFWQNjAEVyPt" name="image3.jpg" alt="How To Use For Loops in Python" src="https://cdn.mos.cms.futurecdn.net/7Azy24mi3JFWQNjAEVyPt.jpg" mos="" align="middle" fullscreen="1" width="880" height="280" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/7Azy24mi3JFWQNjAEVyPt.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>13. <strong>Click on the URL to open in your default browser. </strong>The URL can also be viewed from another device on the network.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:768px;"><p class="vanilla-image-block" style="padding-top:58.72%;"><img id="jfqF82sxXu65v6wevurHY" name="image1.jpg" alt="How To Use For Loops in Python" src="https://cdn.mos.cms.futurecdn.net/jfqF82sxXu65v6wevurHY.jpg" mos="" align="middle" fullscreen="1" width="768" height="451" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/jfqF82sxXu65v6wevurHY.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="complete-code-listing-iterating-with-for-loops">Complete Code Listing: Iterating With For Loops</h2><pre class="line-numbers language-bash" language="bash" ><code>import feedparserimport timefrom pywebio import start_serverfrom pywebio.output import *    from pywebio.session import *newsfeed = feedparser.parse("http://feeds.bbci.co.uk/news/rss.xml")news_stories = {}for i in range(5):   news_stories.update({newsfeed['entries'][i]['title']:newsfeed['entries'][i]['link']})def main():   set_env(title='Python For Loops RSS Example')   for k,v in news_stories.items():       put_text(k)       put_link('Click here',v)start_server(main, port=8080, debug=True)</code></pre><h2 id="python-how-tos-3">Python How Tos</h2><ul><li><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11">How To Install Python on Windows 10 and 11</a></li><li><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">How to use For Loops in Python</a></li><li><a href="https://www.tomshardware.com/how-to/enumerate-in-python">How to Enumerate in Python</a></li><li><a href="https://www.tomshardware.com/how-to/create-python-executable-applications">How to Create Executable Applications in Python</a></li><li><a href="https://www.tomshardware.com/how-to/python-remove-image-backgrounds">How To Remove Backgrounds From Images With Python</a></li><li><a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny">How to Create Web Apps with Python, HTML and Thonny</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-camera-module-3-python-picamera-2">How To Use Raspberry Pi Camera Module 3 with Python Code</a></li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How To Install Python on Windows 10 and 11 ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11</link>
                                                                            <description>
                            <![CDATA[ Installing Python on Windows 10 and 11 is easy and we show you three ways to install and use the versatile programming language. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">FhY2byEV5NAsUXFC6aNHqH</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/9r4zBGJk2qD62yuF295PJR-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Mon, 19 Jun 2023 09:47:57 +0000</pubDate>                                                                                                                                <updated>Thu, 20 Mar 2025 12:50:45 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/9r4zBGJk2qD62yuF295PJR-1280-80.jpg">
                                                            <media:credit><![CDATA[Future / Pexels]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Windows 11 Python]]></media:description>                                                            <media:text><![CDATA[Windows 11 Python]]></media:text>
                                <media:title type="plain"><![CDATA[Windows 11 Python]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/9r4zBGJk2qD62yuF295PJR-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Originally created by Guido van Rossum in 1991, Python is a versatile programming language used by makers on the <a href="https://www.tomshardware.com/news/raspberry-pi">Raspberry Pi</a>, system administrators in the data center, Industrial Light and Magic to bring our movies to life and behind the scenes at NASA.</p><p>Python is a great language to learn, and thanks to the <a href="https://www.tomshardware.com/raspberry-pi">Raspberry Pi</a> for the past thirteen years there have been countless tutorials covering the gamut of programming projects.</p><p>Whether you are a Python veteran, a “pythonista” or a complete newcomer to the language, installing Python on Windows is an easy task. In this how to we will walk you through installing Python 3 on Windows (including how to install via the Microsoft Store) and show two editors, one for beginners and the other for intermediate and advanced users, and how you can get coding with this fantastic language.</p><h2 id="installing-python-3-on-windows-10-and-11">Installing Python 3 on Windows 10 and 11</h2><p>The installation process for Python 3 on Windows is simple, with only a couple of extra steps that we have to follow. These steps enable us to access Python from anywhere on our system and install software using its built-in package manager, pip. Installing Python in this manner enables the creation of projects that work with the operating system, for example notifications and automated system tasks.</p><p><strong>1. Open a browser to the </strong><a href="https://www.python.org/"><strong>Python website</strong></a><strong> and download the latest stable Windows installer. </strong>In the screenshots you will see Python 3.10, which was the latest version at the time of writing.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1251px;"><p class="vanilla-image-block" style="padding-top:81.14%;"><img id="" name="image003.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/x3TyUMBfmTCAGYFNnYEptU.png" mos="" align="middle" fullscreen="" width="1251" height="1015" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. Double click on the downloaded file and install Python for all users, </strong>and <strong>ensure that Python is added to your path. Click on Install now to begin. </strong>Adding Python to the path will enable us to use the Python interpreter from any part of the filesystem.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:666px;"><p class="vanilla-image-block" style="padding-top:61.56%;"><img id="" name="image005.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/vDhoqs4LXbBTF8cEpBTnZU.png" mos="" align="middle" fullscreen="1" width="666" height="410" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/vDhoqs4LXbBTF8cEpBTnZU.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>3. After the installation is complete, click Disable path length limit and then Close. </strong>Disabling the path length limit means we can use more than 260 characters in a file path.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:666px;"><p class="vanilla-image-block" style="padding-top:61.56%;"><img id="" name="image007.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/AksLEj9diLtoAwY4qJfH7V.png" mos="" align="middle" fullscreen="1" width="666" height="410" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/AksLEj9diLtoAwY4qJfH7V.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>4. Click Close to end the installation.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:666px;"><p class="vanilla-image-block" style="padding-top:61.56%;"><img id="" name="image009.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/qauLSQBoyMEyruhcSb8zCV.png" mos="" align="middle" fullscreen="1" width="666" height="410" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/qauLSQBoyMEyruhcSb8zCV.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="installing-python-via-the-microsoft-store">Installing Python via the Microsoft Store</h2><p>An alternative to installing Python directly from the Python website is to use the Microsoft Store. Apps in the store are approved by Microsoft and can be easily installed. The downside is that this release may be one or two versions behind the official release.</p><p><strong>1. Click on Start and search for "store". </strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:781px;"><p class="vanilla-image-block" style="padding-top:86.81%;"><img id="ui9jjREZAsQm8eTL5yt7Jo" name="store1.jpg" alt="The Microsoft Store" src="https://cdn.mos.cms.futurecdn.net/ui9jjREZAsQm8eTL5yt7Jo.jpg" mos="" align="middle" fullscreen="1" width="781" height="678" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/ui9jjREZAsQm8eTL5yt7Jo.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Future)</span></figcaption></figure><p><strong>2. Search for Python in the Microsoft Store.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:919px;"><p class="vanilla-image-block" style="padding-top:22.42%;"><img id="YRrLvhV4LTcVMWE58LaEdE" name="store2.jpg" alt="Searching for Python" src="https://cdn.mos.cms.futurecdn.net/YRrLvhV4LTcVMWE58LaEdE.jpg" mos="" align="middle" fullscreen="" width="919" height="206" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Future)</span></figcaption></figure><p><strong>3. Select the latest version of Python.</strong> In this case Python 3.11.4 is available from the store. </p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1191px;"><p class="vanilla-image-block" style="padding-top:71.37%;"><img id="EzhWs63tY43hvTQZrZWHUj" name="store3.jpg" alt="Searching for Python in the Microsoft Store" src="https://cdn.mos.cms.futurecdn.net/EzhWs63tY43hvTQZrZWHUj.jpg" mos="" align="middle" fullscreen="" width="1191" height="850" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Future)</span></figcaption></figure><p><strong>4. Click "Get" to download and install Python to your computer.</strong> You will need to sign in to your Microsoft account. In a few moments Python will be installed and ready for use.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1179px;"><p class="vanilla-image-block" style="padding-top:39.69%;"><img id="ahzcm4Qj8wjNfoAYnY2QHN" name="store4.jpg" alt="Installing Python" src="https://cdn.mos.cms.futurecdn.net/ahzcm4Qj8wjNfoAYnY2QHN.jpg" mos="" align="middle" fullscreen="" width="1179" height="468" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Future)</span></figcaption></figure><h2 id="running-python-in-windows">Running Python in Windows</h2><p><strong>1. Open a Command Prompt and type “python” then press Enter.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:312px;"><p class="vanilla-image-block" style="padding-top:44.23%;"><img id="" name="image011.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/6WRSdWLa9CNgVrxKu6ZrGV.png" mos="" align="middle" fullscreen="1" width="312" height="138" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/6WRSdWLa9CNgVrxKu6ZrGV.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. Create a short Python script that uses a for loop to print a message to the Python shell ten times. Press space four times to indent </strong>the second line, otherwise Python will produce an error.<strong> Press Enter to run the code.</strong></p><pre class="line-numbers language-python" language="python" ><code>for i in range(10):    print(“Python in the command prompt”)</code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1008px;"><p class="vanilla-image-block" style="padding-top:54.86%;"><img id="" name="image013.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/No62CuxkckhbuNdi94CNMV.png" mos="" align="middle" fullscreen="1" width="1008" height="553" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/No62CuxkckhbuNdi94CNMV.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>Python comes with its own package manager, pip, that is used to install, update and remove modules of pre-written Python code. These modules provide us with extra functionality. To demonstrate we will use pip to install the <a href="https://pyjok.es/">pyjokes </a>module, a collection of programmer jokes.</p><p><strong>1. Open a Command Prompt </strong>and <strong>use pip to install pyjokes then press Enter.</strong></p><pre class="line-numbers language-python" language="python" ><code>pip install pyjokes</code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:501px;"><p class="vanilla-image-block" style="padding-top:38.32%;"><img id="" name="image015.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/woxDNpUD64ckvjiNuiNrQV.png" mos="" align="middle" fullscreen="1" width="501" height="192" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/woxDNpUD64ckvjiNuiNrQV.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. Open the Python interpreter.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:312px;"><p class="vanilla-image-block" style="padding-top:44.23%;"><img id="" name="image017.gif" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/dnwGQ4uNuuadse7hFe2nTV.gif" mos="" align="middle" fullscreen="1" width="312" height="138" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/dnwGQ4uNuuadse7hFe2nTV.gif' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>3. Import the pyjokes module and then print a joke from the module. </strong>In our case, we got a “hip hip hurray” take on an array containing two hips.</p><pre class="line-numbers language-python" language="python" ><code>import pyjokesprint(pyjokes.get_joke())</code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:602px;"><p class="vanilla-image-block" style="padding-top:31.73%;"><img id="" name="image019.gif" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/kE8DwSUmqu2j8EXVTj5vcV.gif" mos="" align="middle" fullscreen="1" width="602" height="191" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/kE8DwSUmqu2j8EXVTj5vcV.gif' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>4. More modules can be found using the <a href="https://pypi.org/">PyPi Package Index.</a></p><h2 id="beginning-python-with-thonny">Beginning Python With Thonny</h2><p>If you have never written a line of Python code, then Thonny is for you. Thonny is designed with beginners in mind. The simple interface means we can focus on our code. But don’t underestimate Thonny as under the hood we have tools to write code for the <a href="https://www.tomshardware.com/raspberry-pi/raspberry-pi-pico-2-w-review">Raspberry Pi Pico series </a>, Adafruit CircuitPython and many MicroPython boards, including those from Lego and the well known ESP32 boards.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1280px;"><p class="vanilla-image-block" style="padding-top:76.33%;"><img id="7TA4j68UqixUnu6QnPdw" name="th1.JPG" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/7TA4j68UqixUnu6QnPdw.jpg" mos="" align="middle" fullscreen="1" width="1280" height="977" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/7TA4j68UqixUnu6QnPdw.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>1. Open a browser to the Thonny</strong><a href="https://thonny.org/"><strong> website </strong></a>and <strong>download the Windows installer.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:686px;"><p class="vanilla-image-block" style="padding-top:99.27%;"><img id="DBRqgmTfDXNEMmLroTveLD" name="th2" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/DBRqgmTfDXNEMmLroTveLD.jpg" mos="" align="middle" fullscreen="1" width="686" height="681" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/DBRqgmTfDXNEMmLroTveLD.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. Go to the Downloads folder </strong>and <strong>double click the Thonny file to begin installation.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:686px;"><p class="vanilla-image-block" style="padding-top:25.36%;"><img id="mLkNCcfUudfJnB6oz7i7Xk" name="th3" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/mLkNCcfUudfJnB6oz7i7Xk.jpg" mos="" align="middle" fullscreen="1" width="686" height="174" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/mLkNCcfUudfJnB6oz7i7Xk.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>3. Click "Next" and follow the instructions to Install. </strong>The install process will take a few moments to complete.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:495px;"><p class="vanilla-image-block" style="padding-top:77.78%;"><img id="TYVmyXgDwJg2pvCEsR9k87" name="th4" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/TYVmyXgDwJg2pvCEsR9k87.jpg" mos="" align="middle" fullscreen="1" width="495" height="385" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/TYVmyXgDwJg2pvCEsR9k87.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>4. Search for Thonny via the Start Menu and click on Thonny to start. </strong>You can also press Enter to run Thonny.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:776px;"><p class="vanilla-image-block" style="padding-top:86.60%;"><img id="s5HPhxyftS2zYYBmLoDN5Y" name="th5" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/s5HPhxyftS2zYYBmLoDN5Y.jpg" mos="" align="middle" fullscreen="1" width="776" height="672" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/s5HPhxyftS2zYYBmLoDN5Y.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>5. Wait for Thonny to start.</strong> Thonny’s first launch can take some time to complete, subsequent boots will be much faster.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1280px;"><p class="vanilla-image-block" style="padding-top:76.33%;"><img id="7TA4j68UqixUnu6QnPdw" name="th1.JPG" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/7TA4j68UqixUnu6QnPdw.jpg" mos="" align="middle" fullscreen="1" width="1280" height="977" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/7TA4j68UqixUnu6QnPdw.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="the-thonny-editor-interface">The Thonny Editor Interface</h2><p>Thonny was designed with beginners in mind and this is reflected in the user interface. It is uncluttered and easy to understand.</p><p>The user interface is broken down into three areas.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1280px;"><p class="vanilla-image-block" style="padding-top:76.33%;"><img id="7YLkD2SturynFVKF2g8XAY" name="thonny-anno" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/7YLkD2SturynFVKF2g8XAY.jpg" mos="" align="middle" fullscreen="1" width="1280" height="977" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/7YLkD2SturynFVKF2g8XAY.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>The menu bar. </strong>Here we can use the conventional drop-down menus or use the icons to open, save, create files. Run the project code, and install packages and swap interpreters for working with Python, MicroPython or CircuitPython</p><p><strong>The coding area.</strong> Here is we write the code for our projects.</p><p><strong>The Python shell. </strong>This is a REPL (Read, Eval, Print, Loop) where we can interact with the Python interpreter and see the output of the running code.</p><p>We can easily write Python code with Thonny. The default is to write Python 3 code, to be run on our machine. </p><p>If you are starting out with Python, Thonny is an excellent choice to introduce the language.</p><h2 id="changing-the-python-interpreter-to-work-with-micropython-or-circuitpython">Changing the Python Interpreter to work with MicroPython or CircuitPython</h2><p>Thonny has one feature that elevates it above other beginner editors. It can switch interpreters so that one application, Thonny, can be used to write Python, MicroPython and CircuitPython.</p><p><strong>1. Click on Tools >> Options and from the dialog box choose Interpreter.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:949px;"><p class="vanilla-image-block" style="padding-top:80.82%;"><img id="CCZTepiBEeawMneuxsrvdT" name="th6-gif" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/CCZTepiBEeawMneuxsrvdT.gif" mos="" align="middle" fullscreen="1" width="949" height="767" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/CCZTepiBEeawMneuxsrvdT.gif' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. Select the Interpreter from the list. </strong>The top list are all of the interpreters for Local Python (on your machine), MicroPython for Raspberry Pi Pico, Pico 2 and Pico with Wi-Fi, RP2040 (for non-Raspberry Pi boards), ESP32 / 8266,BBC micro:bit and for CircuitPython devices.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:608px;"><p class="vanilla-image-block" style="padding-top:100.99%;"><img id="TcnSFVc8SqTeQeqRcFZ89V" name="th7" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/TcnSFVc8SqTeQeqRcFZ89V.jpg" mos="" align="middle" fullscreen="1" width="608" height="614" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/TcnSFVc8SqTeQeqRcFZ89V.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>To connect a Raspberry Pi Pico, we first need a Raspberry Pi Pico running MicroPython, we've <a href="https://www.tomshardware.com/how-to/raspberry-pi-pico-setup">got a guide</a> that you can follow.</p><p>To follow this part of the how to you will need a <a href="https://www.tomshardware.com/reviews/raspberry-pi-pico-w">Raspberry Pi Pico.</a></p><p>1.  <strong>With Thonny open, connect a Raspberry Pi Pico </strong>to your computer.</p><p>2. <strong>Go to Tools >> Options and select the Interpreter tab, and then select the MicroPython (Raspberry Pi Pico) interpreter. Leave the port to automatically detect. Click OK.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:632px;"><p class="vanilla-image-block" style="padding-top:96.84%;"><img id="4ws2Um4kKJrsnVKjj9D5hL" name="th8" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/4ws2Um4kKJrsnVKjj9D5hL.jpg" mos="" align="middle" fullscreen="1" width="632" height="612" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/4ws2Um4kKJrsnVKjj9D5hL.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>3. The Python Shell (3 in the annotated screenshot) will now show an active connection to the Raspberry Pi Pico.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1269px;"><p class="vanilla-image-block" style="padding-top:76.67%;"><img id="8592SD4LdD9jnnqfEt2wsX" name="th9" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/8592SD4LdD9jnnqfEt2wsX.jpg" mos="" align="middle" fullscreen="1" width="1269" height="973" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/8592SD4LdD9jnnqfEt2wsX.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>4. In the editor (2 in the annotated diagram) import two modules of code. </strong>The first enables MicroPython to talk to the GPIO. The second is used to add pauses to the code.</p><pre class="line-numbers language-python" language="python" ><code>import machinefrom time import sleep</code></pre><p><strong>5. Create an object, led </strong>and <strong>use it to set the onboard LED as an output.</strong> For the Raspberry Pi Pico W use the line of code with ‘LED’, for the original Pico use the line of code with 25. The Pico has the LED connected to GPIO 25, but the Pico W does not.</p><p><strong>Raspberry Pi Pico W</strong></p><pre class="line-numbers language-python" language="python" ><code>led = machine.Pin('LED', machine.Pin.OUT)</code></pre><p><strong>Raspberry Pi Pico</strong></p><pre class="line-numbers language-python" language="python" ><code>led = machine.Pin(25, machine.Pin.OUT)</code></pre><p><strong>6. Create a for loop that iterates 10 times</strong>, each time the loop runs it will toggle the LED on / off, print a message to the REPL and sleep for 0.1 seconds.</p><pre class="line-numbers language-python" language="python" ><code>for i in range(10):    led.toggle()    print("BLINK")    sleep(0.1)</code></pre><p><strong>7. Click Save and save the file to your Raspberry Pi Pico as blink.py</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:381px;"><p class="vanilla-image-block" style="padding-top:79.27%;"><img id="QmEuE7b3cLTb3VgMNthc7G" name="th10" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/QmEuE7b3cLTb3VgMNthc7G.jpg" mos="" align="middle" fullscreen="1" width="381" height="302" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/QmEuE7b3cLTb3VgMNthc7G.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>8. Click on Run >> Run Current Script (or click on the green play button) to start the code on the Pico. </strong>The LED on the Pico will blink on and off and the REPL will show the “BLINK” message.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1280px;"><p class="vanilla-image-block" style="padding-top:76.33%;"><img id="EkCZgdF8uSJUg54862zLhW" name="th11.JPG" alt="Thonny" src="https://cdn.mos.cms.futurecdn.net/EkCZgdF8uSJUg54862zLhW.jpg" mos="" align="middle" fullscreen="1" width="1280" height="977" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/EkCZgdF8uSJUg54862zLhW.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="intermediate-python-with-notepad">Intermediate Python with Notepad++</h2><p>You know your stuff, and you need a lightweight editor to get your Python code done. Sure you can install Visual Studio Code, PyCharm etc. But if you just need to edit a few project files, Notepad++ is for you. Notepad++ is a Swiss Army Knife of an editor, and it works exceptionally well with Python. Here we will install Notepad++ and set it up to run our Python code at the press of a button.</p><p>Note that you will need to install the Python 3 interpreter, the steps for which are at the start of this how to.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1251px;"><p class="vanilla-image-block" style="padding-top:81.14%;"><img id="" name="image044.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/AmxQoMafrtL2YhbttRCBeW.png" mos="" align="middle" fullscreen="1" width="1251" height="1015" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/AmxQoMafrtL2YhbttRCBeW.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>1. Open a browser to the </strong><a href="https://notepad-plus-plus.org/downloads/"><strong>Notepad++ website </strong></a><strong>and download the latest Windows installer.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1280px;"><p class="vanilla-image-block" style="padding-top:62.58%;"><img id="sBJnf9SoxghtppwJz8KbRk" name="np1.JPG" alt="Notepad++" src="https://cdn.mos.cms.futurecdn.net/sBJnf9SoxghtppwJz8KbRk.jpg" mos="" align="middle" fullscreen="1" width="1280" height="801" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/sBJnf9SoxghtppwJz8KbRk.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. In the your Downloads folder, double click on the file to start the installer.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:562px;"><p class="vanilla-image-block" style="padding-top:52.14%;"><img id="" name="image048.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/S5uYScKNjAMgLWf7Qcc5pW.png" mos="" align="middle" fullscreen="1" width="562" height="293" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/S5uYScKNjAMgLWf7Qcc5pW.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>3. Set your preferred language and click OK.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:290px;"><p class="vanilla-image-block" style="padding-top:53.45%;"><img id="" name="image050.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/QeFDNwjDrmNCM2yzNNuUtW.png" mos="" align="middle" fullscreen="1" width="290" height="155" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/QeFDNwjDrmNCM2yzNNuUtW.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>4. Select Next.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:499px;"><p class="vanilla-image-block" style="padding-top:77.76%;"><img id="" name="image052.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/LXD4Pg4vULjpgwPFdvPRAX.png" mos="" align="middle" fullscreen="1" width="499" height="388" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/LXD4Pg4vULjpgwPFdvPRAX.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>5. Select “I Agree”.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:499px;"><p class="vanilla-image-block" style="padding-top:77.76%;"><img id="" name="image054.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/uTcgYpqvr3i99mRgHpqq4X.png" mos="" align="middle" fullscreen="1" width="499" height="388" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/uTcgYpqvr3i99mRgHpqq4X.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>6. Click Next.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:499px;"><p class="vanilla-image-block" style="padding-top:77.76%;"><img id="" name="image056.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/VbjUA9pxoRgzHuo2iN6iEX.png" mos="" align="middle" fullscreen="1" width="499" height="388" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/VbjUA9pxoRgzHuo2iN6iEX.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>7. Click Next.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:499px;"><p class="vanilla-image-block" style="padding-top:77.76%;"><img id="" name="image058.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/ZrQY52TTCSSTiA326RC3PX.png" mos="" align="middle" fullscreen="1" width="499" height="388" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/ZrQY52TTCSSTiA326RC3PX.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>8. Click Install to begin the process.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:499px;"><p class="vanilla-image-block" style="padding-top:77.76%;"><img id="" name="image060.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/aoFEQFHkmdxcSM8XYDqUJX.png" mos="" align="middle" fullscreen="1" width="499" height="388" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/aoFEQFHkmdxcSM8XYDqUJX.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>9. </strong>Check “Run Notepad++” and click Finish to end the installation and open Notepad++.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:499px;"><p class="vanilla-image-block" style="padding-top:77.76%;"><img id="" name="image062.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/B2fx6GNzJs8ugbdN8UGXcX.png" mos="" align="middle" fullscreen="1" width="499" height="388" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/B2fx6GNzJs8ugbdN8UGXcX.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="the-notepad-interface">The Notepad++ Interface</h2><p>Notepad++ has a more involved user interface than Thonny, and this reflects the flexibility of the editor. Notepad++ is much more than a Python editor, we can use it to write PHP, Perl, JSON etc.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1107px;"><p class="vanilla-image-block" style="padding-top:84.64%;"><img id="" name="image064.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/cjiR2DsG5AVJE7UMqdvpVX.png" mos="" align="middle" fullscreen="" width="1107" height="937" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>Menus.</strong> Here we can load projects, save, create macros and install plugins for specific languages.</p><p><strong>Editor. </strong>The code for our project is created here.</p><p><strong>Workspace.</strong> If we are working on a large project with multiple project files, we can load the folder as a workspace and have quick access to the files.</p><h2 id="running-python-code-in-notepad">Running Python code in Notepad++</h2><p><strong>1. Create a simple Python project that uses a for loop to print a message to the Python shell.</strong></p><pre class="line-numbers language-python" language="python" ><code>for i in range(10):    print("Writing Python in Notepad++")</code></pre><p><strong>2. Save the code as for_loop.py.</strong></p><p><strong>3. Click on Run >> Run..</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:802px;"><p class="vanilla-image-block" style="padding-top:30.17%;"><img id="" name="image066.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/C6gZbEPXLTghjQzKgJJjgX.png" mos="" align="middle" fullscreen="" width="802" height="242" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>4. Click on … and navigate to the Python executable file. Select the file and the path will be added to the dialog box. At the end of the path, add -i "$(FULL_CURRENT_PATH)" to force Notepad++ to open the file. Click Save.</strong></p><pre class="line-numbers language-python" language="python" ><code>Example path to PythonC:\Users\LattePanda\AppData\Local\Programs\Python\Python310\python.exe -i "$(FULL_CURRENT_PATH)"</code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:296px;"><p class="vanilla-image-block" style="padding-top:64.19%;"><img id="" name="image068.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/JMCMmNMtTDU9mTohoHkEoX.png" mos="" align="middle" fullscreen="" width="296" height="190" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>5. Create a shortcut called Python3.10 to launch the Python interpreter then click OK. </strong>We chose ALT + SHIFT + P as it didn’t conflict with other shortcuts on our system. </p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:272px;"><p class="vanilla-image-block" style="padding-top:72.79%;"><img id="" name="image070.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/FLxbGbhEDuXUxPjZ7aPnjX.png" mos="" align="middle" fullscreen="" width="272" height="198" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>6. Use your shortcut to run the Python code.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1344px;"><p class="vanilla-image-block" style="padding-top:59.30%;"><img id="" name="image072.png" alt="How To Install Python on Windows 10 and 11" src="https://cdn.mos.cms.futurecdn.net/w5yPZmePZPbNC3anZcFnxX.png" mos="" align="middle" fullscreen="1" width="1344" height="797" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/w5yPZmePZPbNC3anZcFnxX.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="python-how-tos-4">Python How Tos</h2><ul><li><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11">How To Install Python on Windows 10 and 11</a></li><li><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">How to use For Loops in Python</a></li><li><a href="https://www.tomshardware.com/how-to/enumerate-in-python">How to Enumerate in Python</a></li><li><a href="https://www.tomshardware.com/how-to/create-python-executable-applications">How to Create Executable Applications in Python</a></li><li><a href="https://www.tomshardware.com/how-to/python-remove-image-backgrounds">How To Remove Backgrounds From Images With Python</a></li><li><a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny">How to Create Web Apps with Python, HTML and Thonny</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-camera-module-3-python-picamera-2">How To Use Raspberry Pi Camera Module 3 with Python Code</a></li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Raspberry Pi Pico W MicroPython Gains Official Bluetooth Support ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/raspberry-pi-pico-w-gains-official-bluetooth-support</link>
                                                                            <description>
                            <![CDATA[ In a recent update, Raspberry Pi adds Bluetooth support for MicroPython projects. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">yQKtoF3fHrFX74w2HNMuy5</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/8oHHkE6nVPMwtrW8JpSf5H-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Wed, 14 Jun 2023 11:43:56 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:38 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/8oHHkE6nVPMwtrW8JpSf5H-1280-80.jpg">
                                                            <media:credit><![CDATA[Future]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Raspberry Pi Pico W with Bluetooth]]></media:description>                                                            <media:text><![CDATA[Raspberry Pi Pico W with Bluetooth]]></media:text>
                                <media:title type="plain"><![CDATA[Raspberry Pi Pico W with Bluetooth]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/8oHHkE6nVPMwtrW8JpSf5H-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Murmurings of official Bluetooth support for the $6 <a href="https://www.tomshardware.com/reviews/raspberry-pi-pico-w">Raspberry Pi Pico W</a> have been running since early 2023. Developers favoring C/C++ received support back in <a href="https://www.tomshardware.com/news/raspberry-pi-pico-w-sdk-adds-bluetooth">February</a>. <a href="https://www.raspberrypi.com/news/new-functionality-bluetooth-for-pico-w/"> Today via a blog post</a> from Raspberry Pi LTD CEO Eben Upton, MicroPython developers can now create Bluetooth projects using our favorite microcontroller thanks to the latest MicroPython build.</p><p>The Raspberry Pi Pico W&apos;s wireless chip, the Infineon CYW43439 provides both 2.4 GHz Wi-Fi and Bluetooth 5.2 over a three pin SPI bus between itself and the RP2040 SoC. The latest MicroPython update brings support for Bluetooth Classic (no ACL/SSO support just yet), BLE Central and Peripheral roles. Bluetooth Classic and BLE can be enabled individually. or at the same time. </p><p>The good news is that you don&apos;t have to rush out and purchase a new Raspberry Pi Pico W. As this is a software update, work between Raspberry Pi, Infineon and MicroPython creator, Damien George. All you need to do is <a href="https://www.raspberrypi.com/documentation/microcontrollers/micropython.html#drag-and-drop-micropython">download</a> the latest update and <a href="https://www.tomshardware.com/how-to/raspberry-pi-pico-setup">flash it to your Raspberry Pi Pico W.</a> Also updated is Alasdair Allan&apos;s exceptional <a href="https://www.raspberrypi.com/documentation/microcontrollers/">documentation</a>. A book, <a href="https://datasheets.raspberrypi.com/picow/connecting-to-the-internet-with-pico-w.pdf">Connecting to the Internet with Raspberry Pi Pico W</a> illustrates just how simple a Bluetooth project can now be created using the Raspberry Pi Pico W.</p><p>With support now being added for MicroPython, it must only be a short time before it also arrives for CircuitPython.</p><p><br></p><iframe src="https://content.jwplatform.com/players/YdWWS5dA.html" id="YdWWS5dA" title="Raspberry Pi 4 Review: The New Gold Standard for Single-Board Computing" width="1920" height="1080" frameborder="0" scrolling="auto" allowfullscreen></iframe>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Donkey Car Python Library Powers Self Driving Raspberry Pi Cars ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/donkey-car-python-library</link>
                                                                            <description>
                            <![CDATA[ Donkey Car is an open source Python library for self-driving cars that works with the Raspberry Pi and other SBCs. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">oa3nUG6SkUvmSD463QHDtM</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/fCAv8MVFBWmZLkAgHbThY3-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Wed, 17 May 2023 14:34:28 +0000</pubDate>                                                                                                                                <updated>Thu, 21 Aug 2025 10:07:56 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Ash Hill ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/p9HsnLCwBpTQYCBBhYXgrS.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Ash is a self-employed tech writer and illustrator with a serious affinity for the Raspberry Pi, 3D printing, retro gaming and finding the best tech deals and coupons. She has over a decade of IT experience and has been featured in the official Raspberry Pi magazine MagPi.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/fCAv8MVFBWmZLkAgHbThY3-1280-80.jpg">
                                                            <media:credit><![CDATA[Donkey Car / Pexels]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[A Raspberry Pi robot car]]></media:description>                                                            <media:text><![CDATA[A Raspberry Pi robot car]]></media:text>
                                <media:title type="plain"><![CDATA[A Raspberry Pi robot car]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/fCAv8MVFBWmZLkAgHbThY3-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>If you’re ready to race, you should check out <a href="https://www.donkeycar.com/"><u>Donkey Car</u></a>. This open-source Python library makes it super easy to get off the ground with setting up your own driveable car project. Because it’s Python-focused, you can use it with a wide variety of boards ranging from <a href="https://www.tomshardware.com/topics/raspberry-pi"><u>Raspberry Pi</u></a> to even the Nvidia Jetson range of boards.</p><p>This platform makes it easy to not only to drive cars remotely but also integrate them with AI systems so they can drive themselves. You can interface with it using a separate computer or device (like a smartphone or tablet) and make the RC car as complex as you want. Long gone are the days of building your own tool from scratch, Donkey Car has plenty of ready-to-go features out of the box that you can build off of to customize your project the way you want.</p><div class="youtube-video" data-nosnippet ><div class="video-aspect-box"><iframe data-lazy-priority="low" data-lazy-src="https://www.youtube-nocookie.com/embed/lfwq73D7oHg" allowfullscreen></iframe></div></div><h2 id="what-can-you-do-with-donkey-car">What can you do with Donkey Car</h2><ul><li>Build your own toy car that can drive itself.</li><li>Drive your car with your phone or laptop.</li><li>Record images, steering angles & throttles.</li><li>Train neural net pilots to drive your car on different tracks.</li></ul><p>Not only can you use the SBC of your choice, you can build the RC car of your dreams. It works with plenty of existing car kits you can find online but you can also make one from scratch. The team at Donkey Car recommends using their Donkey2 setup. It costs around $250 to get all of the components and can be assembled in just a couple of hours.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1100px;"><p class="vanilla-image-block" style="padding-top:66.55%;"><img id="rYgF7GDwfkWgt574n4BSGU" name="1684332195.jpg" alt="Donkey Car" src="https://cdn.mos.cms.futurecdn.net/rYgF7GDwfkWgt574n4BSGU.jpg" mos="" align="middle" fullscreen="" width="1100" height="732" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Donkey Car)</span></figcaption></figure><p>The standard Donkey Car kit is available on the Donkey Car website for $92. It includes a camera, servo driver, 3D printed frame components, as well as screws and jumper wires for assembly. You’ll still need an RC car component, an SBC (like the Raspberry Pi), an SD card, and a battery. While it doesn’t have everything you need, it’s a great starting point. There are also a few chassis made by the brand Exceed that work well with Donkey Car. You can read more about the hardware requirements in the <a href="http://docs.donkeycar.com/guide/build_hardware/">build guide</a>.</p><p>If you want to read more about this project or maybe even make one yourself, check out the official <a href="https://www.donkeycar.com/">Donkey Car</a> website. If you’ve already got an RC car project lying around, it might be worth tinkering with to see how well it handles the Donkey Car library.</p><iframe src="https://content.jwplatform.com/players/YdWWS5dA.html" id="YdWWS5dA" title="Raspberry Pi 4 Review: The New Gold Standard for Single-Board Computing" width="1920" height="1080" frameborder="0" scrolling="auto" allowfullscreen></iframe>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How To Manage MicroPython Modules With Mip on Raspberry Pi Pico ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/raspberry-pi-pico-micropython-mip</link>
                                                                            <description>
                            <![CDATA[ MicroPython has a new and lightweight MicroPython package manager for all of your MicroPython module needs. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">mWdKGgNFxueVGCiYwbgAw9</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/QcY5MMyUfb46o79fS4TPbM-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sat, 29 Apr 2023 13:00:08 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:33 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/QcY5MMyUfb46o79fS4TPbM-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[How To Use Mip]]></media:description>                                                            <media:text><![CDATA[How To Use Mip]]></media:text>
                                <media:title type="plain"><![CDATA[How To Use Mip]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/QcY5MMyUfb46o79fS4TPbM-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Managing modules in Python is often handled via pip, the Python package manager which uses a repository provided by PyPi to list available Python modules. But what is there for MicroPython? There was upip, a micro version of pip, but now there is mip, the new, official lightweight package manager for MicroPython. </p><p>Mip is designed for all MicroPython devices, be they online or offline. Devices which can connect to the Internet can be used directly via the Python Shell while offline devices can use a tool, mpremote, to install modules from your computer.</p><p>In this how-to, fee we will show you how to use mip directly on a <a href="https://www.tomshardware.com/reviews/raspberry-pi-pico-w"><u>Raspberry Pi Pico W</u></a>, then offline using a <a href="https://www.tomshardware.com/reviews/raspberry-pi-pico-review"><u>Raspberry Pi Pico</u></a> and mpremote. We will also go through a few handy mpremote commands.</p><h2 id="using-mip-with-the-raspberry-pi-pico-w">Using mip With the Raspberry Pi Pico W</h2><p>Using mip with a network connected MicroPython device means that modules can be directly installed to the device in a similar means to pip installing Python modules, and package managers in Linux.</p><p>1. <a href="https://www.tomshardware.com/how-to/raspberry-pi-pico-setup"><u><strong>Follow these steps</strong></u></a><strong> to download the latest version of MicroPython for the Raspberry Pi Pico W. </strong>The most important steps are to download and install the UF2 firmware image and to set up Thonny. The rest are optional. <strong>Ensure that you are downloading MicroPython 1.20 or newer.</strong></p><p>2.<strong> Open Thonny </strong>and <strong>click on the Stop button </strong>to refresh the connection. This ensures that the Python Shell is open and working correctly.</p><p>3. <strong>Create a new file.</strong> This file will contain all of the steps necessary to connect to Wi-Fi.</p><p>4. <strong>Add the following lines of code to the new file.</strong> Change the SSID and PASSWORD to match your own.</p><pre class="line-numbers language-bash" language="bash" ><code>import networkwlan = network.WLAN(network.STA_IF)wlan.active(True)wlan.connect("SSID","PASSWORD")print(wlan.isconnected())</code></pre><p>5. <strong>Save the file to the Raspberry Pi Pico W as network-connection.py</strong></p><p>6. <strong>Click on Run to start a Wi-Fi connection.</strong> After a few seconds it should print True to the Python shell. This indicates that we have an Internet connection. If false, click Stop and then Run again.</p><p>7. <strong>Import mip, the lightweight package manager.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>import mip</code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:306px;"><p class="vanilla-image-block" style="padding-top:60.13%;"><img id="" name="mip1.jpg" alt="How To Use Mip" src="https://cdn.mos.cms.futurecdn.net/GwMw3PH6xo5HfYHXB2TVgM.jpg" mos="" align="middle" fullscreen="1" width="306" height="184" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/GwMw3PH6xo5HfYHXB2TVgM.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>8. <strong>Test mip by installing a package.</strong> I chose umqtt, a MQTT module for MicroPython. Packages are installed by calling mip’s install function and passing it the name of a package. Mip uses micropython-lib as its index, Python 3’s package manage, pip uses the PyPI index.</p><pre class="line-numbers language-bash" language="bash" ><code>mip.install(“umqtt.simple”)</code></pre><p>9. <strong>Test installing a third-party MicroPython package.</strong> Mip can also be used to install third-party packages outside of the micropython-lib index. Here we pass the install function the URL for the <a href="https://www.tomshardware.com/how-to/raspberry-pi-pico-reaction-game"><u>PicoZero library</u></a> from the Raspberry Pi Foundation.</p><pre class="line-numbers language-bash" language="bash" ><code>mip.install(“https://raw.githubusercontent.com/RaspberryPiFoundation/picozero/master/picozero/picozero.py”) </code></pre><h2 id="using-mip-with-mpremote-on-raspberry-pi-pico">Using Mip With Mpremote on Raspberry Pi Pico</h2><p>For MicroPython on a device with no network access, a Raspberry Pi Pico, mip will need to be used with mpremote, a tool that will communicate with the device over a USB / serial interface.</p><p>1. <a href="https://www.tomshardware.com/how-to/raspberry-pi-pico-setup"><u><strong>Follow these steps</strong></u></a><strong> to download the latest version of MicroPython for the Raspberry Pi Pico W. </strong>The most important steps are to download and install the UF2 firmware image and to set up Thonny. The rest are optional. <strong>Ensure that you are downloading MicroPython 1.20 or newer.</strong></p><p>2. <strong>Ensure that </strong><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11"><u><strong>Python 3 is installed on your machine.</strong></u></a></p><p>3. <strong>Open a Command Prompt and use pip to install mpremote.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>pip install mpremote</code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:973px;"><p class="vanilla-image-block" style="padding-top:52.11%;"><img id="" name="mpr1.jpg" alt="How To Use Mip" src="https://cdn.mos.cms.futurecdn.net/gMb8RBLYD2hyuv5ABu7e4N.jpg" mos="" align="middle" fullscreen="1" width="973" height="507" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/gMb8RBLYD2hyuv5ABu7e4N.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>4. <strong>Run mpremote and pass mip as an argument, </strong>and <strong>then specify the package name </strong>or the URL for the module<strong>. </strong>Here I am installing a package to use <a href="https://www.tomshardware.com/how-to/raspberry-pi-pico-7-segment-display"><u>seven segment displays with the Pico</u></a>.</p><pre class="line-numbers language-bash" language="bash" ><code>mpremote mip install https://raw.githubusercontent.com/mcauser/micropython-tm1637/master/tm1637.py </code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1035px;"><p class="vanilla-image-block" style="padding-top:15.65%;"><img id="" name="mpr3.jpg" alt="How To Use Mip" src="https://cdn.mos.cms.futurecdn.net/iHkoKKx5HKGxsJnBMyjJWN.jpg" mos="" align="middle" fullscreen="1" width="1035" height="162" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/iHkoKKx5HKGxsJnBMyjJWN.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="other-useful-mpremote-commands">Other Useful mpremote Commands</h2><p>Mpremote is a useful tool for quick tasks on a MicroPython device. We’ve detailed a few extra useful commands that will help manage a MicroPython device.</p><p><strong>mpremote: </strong>Automatically connects to a device running MicroPython to view the output of running code. Press CTRL + ] to close the connection.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1033px;"><p class="vanilla-image-block" style="padding-top:52.66%;"><img id="" name="mpremote.jpg" alt="How To Use Mip" src="https://cdn.mos.cms.futurecdn.net/eos49EiPaCnpjd2hm8RoEN.jpg" mos="" align="middle" fullscreen="1" width="1033" height="544" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/eos49EiPaCnpjd2hm8RoEN.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>mpremote repl: </strong>Opens an interactive Python shell, a REPL (Read, Eval, Print, Loop) where a user can directly work with the hardware.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:500px;"><p class="vanilla-image-block" style="padding-top:80.60%;"><img id="" name="repl.jpg" alt="How To Use Mip" src="https://cdn.mos.cms.futurecdn.net/ge6SHxHhEimZiP4zeN98bN.jpg" mos="" align="middle" fullscreen="1" width="500" height="403" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/ge6SHxHhEimZiP4zeN98bN.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>mpremote soft-reset:</strong> Reboot the attached MicroPython device. This is the same as pressing CTRL + D in the REPL.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:700px;"><p class="vanilla-image-block" style="padding-top:34.43%;"><img id="" name="reset.jpg" alt="How To Use Mip" src="https://cdn.mos.cms.futurecdn.net/U8bqzGphJFPh9nsQcPjhfN.jpg" mos="" align="middle" fullscreen="1" width="700" height="241" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/U8bqzGphJFPh9nsQcPjhfN.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>mpremote fs <command>:</strong> Use a series of file system commands with the MicroPython device. These commands are similar to common Unix / Linux commands.</p><div ><table><thead><tr><th class="firstcol " >Command</th><th  >Description</th></tr></thead><tbody><tr><td class="firstcol " >cat <file></file></td><td  >Shows the contents of a file</td></tr><tr><td class="firstcol " >ls</td><td  >List the content of the current directory</td></tr><tr><td class="firstcol " >ls <dir></dir></td><td  >List the contents of a given directory</td></tr><tr><td class="firstcol " >cp [-r] <src> <destination></destination></src></td><td  >Copy files. Use : prefix to specify a file on the MicroPython device. Recursive uses -r</td></tr><tr><td class="firstcol " >rm <src></src></td><td  >Remove files from the device</td></tr><tr><td class="firstcol " >mkdir <dir name=""></dir></td><td  >Create a directory on the device</td></tr><tr><td class="firstcol " >rmdir <dir name=""></dir></td><td  >Delete a directory on the device</td></tr><tr><td class="firstcol " >touch <filename></filename></td><td  >Create a file on the device using <filename></filename></td></tr></tbody></table></div><p>In the example we list the contents of the flash storage, create a new file, then re-list the storage to see the new file.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:565px;"><p class="vanilla-image-block" style="padding-top:64.25%;"><img id="" name="mpremotefs.jpg" alt="How To Use Mip" src="https://cdn.mos.cms.futurecdn.net/tXS9mAexvDaP7D7MoCX8MN.jpg" mos="" align="middle" fullscreen="1" width="565" height="363" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/tXS9mAexvDaP7D7MoCX8MN.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>MORE: </strong><a href="https://www.tomshardware.com/best-picks/best-rp2040-boards"><strong>Best RP2040 Boards</strong></a></p><p><strong>MORE: </strong><a href="https://www.tomshardware.com/features/best-raspberry-pi-projects"><strong>Best Raspberry Pi Projects</strong></a></p><p><strong>MORE: </strong><a href="https://www.tomshardware.com/news/raspberry-pi"><strong>Raspberry Pi: How to Get Started</strong></a></p><iframe src="https://content.jwplatform.com/players/YdWWS5dA.html" id="YdWWS5dA" title="Raspberry Pi 4 Review: The New Gold Standard for Single-Board Computing" width="1920" height="1080" frameborder="0" scrolling="auto" allowfullscreen></iframe><h2 id="python-how-tos-5">Python How Tos</h2><ul><li><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11">How To Install Python on Windows 10 and 11</a></li><li><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">How to use For Loops in Python</a></li><li><a href="https://www.tomshardware.com/how-to/enumerate-in-python">How to Enumerate in Python</a></li><li><a href="https://www.tomshardware.com/how-to/create-python-executable-applications">How to Create Executable Applications in Python</a></li><li><a href="https://www.tomshardware.com/how-to/python-remove-image-backgrounds">How To Remove Backgrounds From Images With Python</a></li><li><a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny">How to Create Web Apps with Python, HTML and Thonny</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-camera-module-3-python-picamera-2">How To Use Raspberry Pi Camera Module 3 with Python Code</a></li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ MicroPython 1.20 Brings Raspberry Pi Pico W Support, Lightweight Package Manager ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/micropython-120-brings-raspberry-pi-pico-w-support-lightweight-package-manager</link>
                                                                            <description>
                            <![CDATA[ MicroPython 1.20 adds official support for the Raspberry Pi Pico W and introduces a new lightweight package manager ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">5ZReZfXXxpr6xhoy3VEt7D</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/BBm6rUNYAsvta8ogC3aw2Y-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Thu, 27 Apr 2023 14:24:00 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:27 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/BBm6rUNYAsvta8ogC3aw2Y-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Raspberry Pi Pico W]]></media:description>                                                            <media:text><![CDATA[Raspberry Pi Pico W]]></media:text>
                                <media:title type="plain"><![CDATA[Raspberry Pi Pico W]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/BBm6rUNYAsvta8ogC3aw2Y-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>A new version of <a href="https://github.com/micropython/micropython/releases/tag/v1.20.0">MicroPython has been released</a> for compatible microcontrollers. This release. version 1.20, sees support for the <a href="https://www.tomshardware.com/reviews/raspberry-pi-pico-w">Raspberry Pi Pico W</a> and brings a new package manager.</p><p>Version 1.20 brings support for the Raspberry Pi Pico W&apos;s CYW43439 Wi-Fi chip, this means that stock MicroPython can now take advantage of the $6 boards wireless connectivity. Bluetooth support is still missing, in this and the official MicroPython release. Support for Bluetooth isn&apos;t too far away now. Bluetooth support was <a href="https://www.tomshardware.com/news/raspberry-pi-pico-w-sdk-adds-bluetooth">recently added to the Raspberry Pi Pico SDK</a>, so MicroPython isn&apos;t too far away now.</p><p>The other addition to the release is a new lightweight package manager, <em>mip</em>. Mip is optimized for use with embedded systems. In MicroPython creator <a href="https://github.com/micropython/micropython/releases/tag/v1.20.0">Damien George&apos;s release post </a>they state that "It is intended to take over the role of upip and supports installing packages from micropython-lib as well as any URL. Mip can be run directly on a device (with network connectivity) or via mpremote." Raspberry Pi Pico W users would need to ensure that their Pico W is connected to Wi-Fi and that they have access to the Python Shell (REPL) in order to use mip directly on the hardware. Raspberry Pi Pico users will need to use mpremote, a command line tool that provides utilities to communicate between a computer and a MicroPython device over a serial interface.</p><p>MicroPython, is the creation of programmer and theoretical physicist Damien George and in broad terms it is a port of Python 3 aimed squarely at microcontrollers. MicroPython has been used with a diverse range of boards (ESP32, ESP8266, W600 etc) but for some it was introduced via the Raspberry Pi Pico. </p><figure role="gallery"><figure><img src="https://cdn.mos.cms.futurecdn.net/nKBbecc3Gug48uV89n8BDb.jpg" alt="MicroPython v1.20 on Raspberry Pi Pico W" /><figcaption><small role="credit">Future</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/pq9gDADGZqrqhGv666cS7b.jpg" alt="MicroPython v1.20 on Raspberry Pi Pico W" /><figcaption><small role="credit">Future</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/ZMMZsn65bmjkNjTPYcEL2b.jpg" alt="MicroPython v1.20 on Raspberry Pi Pico W" /><figcaption><small role="credit">Future</small></figcaption></figure></figure><p>We were keen to see if the <a href="https://www.raspberrypi.com/documentation/microcontrollers/micropython.html#drag-and-drop-micropython">official Raspberry Pi Pico MicroPython firmware</a> featured support for mip. It seems that it does, the latest firmware for the Raspberry Pi Pico W, rp2-pico-w-20230427-unstable-v1.20.0-1-g82a59a824.uf2 does indeed feature mip. We were able to use mip to install a third-party MicroPython module and then directly use it, all from the Python Shell.</p><iframe src="https://content.jwplatform.com/players/YdWWS5dA.html" id="YdWWS5dA" title="Raspberry Pi 4 Review: The New Gold Standard for Single-Board Computing" width="1920" height="1080" frameborder="0" scrolling="auto" allowfullscreen></iframe>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How To Remove Backgrounds From Images With Python ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/python-remove-image-backgrounds</link>
                                                                            <description>
                            <![CDATA[ With just eight lines of Python code we can create an application to remove the background from many images. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">2zgmd7J888rbp7rCDVRuTo</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/Et7sGY4MZirzRm6qrisXbZ-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sun, 23 Oct 2022 15:16:54 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:25 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/Et7sGY4MZirzRm6qrisXbZ-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Remove Backgrounds From Images With Python]]></media:description>                                                            <media:text><![CDATA[Remove Backgrounds From Images With Python]]></media:text>
                                <media:title type="plain"><![CDATA[Remove Backgrounds From Images With Python]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/Et7sGY4MZirzRm6qrisXbZ-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11"><u>Python</u></a> is a multi-purpose programming language. It does many things, from creating <a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny"><u>web apps</u></a> to checking out who is on the <a href="https://www.tomshardware.com/how-to/connect-raspberry-pi-pico-w-to-the-internet"><u>International Space Station</u></a> with a <a href="https://www.tomshardware.com/reviews/raspberry-pi-pico-w"><u>Raspberry Pi Pico W</u></a>.<br>Python is easy to learn due to it being easy to read. What makes Python multi-purpose are modules of prewritten code, sometimes referred to as “libraries”. These modules bring in new functionality, for example RPi.GPIO enables Python to control the GPIO of the <a href="https://www.tomshardware.com/news/raspberry-pi"><u>Raspberry Pi.</u></a></p><p>In this how to, we will use two Python modules to create a GUI application that will remove the background from an image. The first module, <a href="https://github.com/danielgatis/rembg"><u>rembg</u></a> from<a href="https://github.com/danielgatis"><u> Daniel Gatis</u></a> will remove the background from any image presented to it. The second module, easygui provides a means to create dialogs and menus using the operating system’s toolkit. So a file open / save dialog box will look exactly like those used in many other applications.</p><p>To take this project further, you can make your applications by <a href="https://www.tomshardware.com/how-to/create-python-executable-applications"><u>packaging the project code into a single executable file.</u></a></p><h2 id="setting-up">Setting Up</h2><p>Before we write a line of code we need to get everything in order. First we will create a folder to store the images that we will be working with. We will then open a Python editor for the coding part of the project.</p><p>1. <strong>Create a new folder on your desktop called rembg.</strong></p><p>2.<strong> In the folder place an image that you wish to remove the background from.</strong></p><p>3.<strong> Open your preferred Python editor</strong>, we prefer <a href="https://thonny.org/"><u>Thonny</u></a> as it provides a simple user interface. Follow <a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny"><u>this guide</u></a> to install Thonny.</p><h2 id="installing-the-python-modules">Installing the Python Modules</h2><p>In order to use Rembg we first need to download and install its Python module. This can be handled via Thonny’s built-in package manager, or via Python’s packaging tool, pip. </p><p><strong>Installing via Thonny</strong></p><p>1. <strong>Click on Tools >> Manage Packages.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:397px;"><p class="vanilla-image-block" style="padding-top:53.15%;"><img id="" name="pack1.jpg" alt="Remove Backgrounds From Images With Python" src="https://cdn.mos.cms.futurecdn.net/EZuyNws92awuZeyPvXKvkZ.jpg" mos="" align="middle" fullscreen="1" width="397" height="211" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/EZuyNws92awuZeyPvXKvkZ.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>2. <strong>Search for rembg and click Search on PyPi. Select rembg from the returned list.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:629px;"><p class="vanilla-image-block" style="padding-top:72.81%;"><img id="" name="pack2.jpg" alt="Remove Backgrounds From Images With Python" src="https://cdn.mos.cms.futurecdn.net/VQGvvbmaweqz93fHCf96qZ.jpg" mos="" align="middle" fullscreen="1" width="629" height="458" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/VQGvvbmaweqz93fHCf96qZ.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>3. <strong>Click on Install to download and install rembg for Python. </strong>We have already installed rembg on our system, hence the uninstall button.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:634px;"><p class="vanilla-image-block" style="padding-top:72.56%;"><img id="" name="pack3.jpg" alt="Remove Backgrounds From Images With Python" src="https://cdn.mos.cms.futurecdn.net/WvQ8Yas3asRPcnfPeo84uZ.jpg" mos="" align="middle" fullscreen="1" width="634" height="460" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/WvQ8Yas3asRPcnfPeo84uZ.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>4. <strong>Repeat steps 2 and 3, but this time search for and install easygui.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:634px;"><p class="vanilla-image-block" style="padding-top:71.92%;"><img id="" name="pack4.jpg" alt="Remove Backgrounds From Images With Python" src="https://cdn.mos.cms.futurecdn.net/9goZNs6xCmSELC68VWRoxZ.jpg" mos="" align="middle" fullscreen="1" width="634" height="456" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/9goZNs6xCmSELC68VWRoxZ.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="installing-via-pip">Installing via Pip</h2><p>If you are using another Python editor, you will need to install the Python packages using pip.</p><p>1. <strong>Open a Command Prompt and install rembg. Press Enter to start the process.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>pip install rembg</code></pre><p>2. <strong>Install easygui using pip. </strong>Easygui provides a basic user interface for file open and save operations.</p><pre class="line-numbers language-bash" language="bash" ><code>pip install easygui</code></pre><h2 id="writing-the-code">Writing the Code</h2><p>The code is essentially very simple, with just eight lines of Python we can remove the background from any image. The underlying modules, rembg and easygui will be doing all of the heavy lifting for us.</p><p>1. <strong>From the rembg module import the remove class.</strong> This is what we shall use to remove the background.</p><pre class="line-numbers language-bash" language="bash" ><code>from rembg import remove</code></pre><p>2. <strong>From the Python Imaging Library (PIL), import Image. </strong>PIL is a powerful module that contains many different options for creating and working with images and image streams.</p><pre class="line-numbers language-bash" language="bash" ><code>from PIL import Image</code></pre><p>3. <strong>Import the easygui module and create a reference to it as “eg”.</strong> Easygui is our GUI for basic file operations. Renaming it to “eg” makes it easier to work with.</p><pre class="line-numbers language-bash" language="bash" ><code>import easygui as eg</code></pre><p>4. <strong>Create an object, input_path and use it to store the path and name of a file that we wish to remove the background from.</strong> Using easygui’s file open dialog box, we give the dialog a title, to explain what it is for. The chosen file and its path are stored to the input_path object.</p><pre class="line-numbers language-bash" language="bash" ><code>input_path = eg.fileopenbox(title='Select image file')</code></pre><p>5. <strong>Create an object, output_path and use easygui’s file save dialog box to capture the file path and save it to the object.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>output_path = eg.filesavebox(title='Save file to..')</code></pre><p>6. <strong>Create an object, input and use it to open and store the image via PIL’s Image.open </strong>function.</p><pre class="line-numbers language-bash" language="bash" ><code>input = Image.open(input_path)</code></pre><p>7. <strong>Use rembg to remove the background from the image.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>output = remove(input)</code></pre><p>8. <strong>Save the new image using the file path stored in output_path.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>output.save(output_path)</code></pre><p>9. <strong>Save the code as background_remover.py.</strong></p><p>10. <strong>Run the code by clicking on the Run button.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:984px;"><p class="vanilla-image-block" style="padding-top:42.48%;"><img id="" name="run1.jpg" alt="Remove Backgrounds From Images With Python" src="https://cdn.mos.cms.futurecdn.net/7h4u2xsa9BqHRPohmwzX3a.jpg" mos="" align="middle" fullscreen="1" width="984" height="418" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/7h4u2xsa9BqHRPohmwzX3a.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>11. <strong>Select the image that you wish to remove the background from.</strong> Notice that the dialog has the title that we specified in the code.</p><p><br></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1181px;"><p class="vanilla-image-block" style="padding-top:60.12%;"><img id="" name="run2.jpg" alt="Remove Backgrounds From Images With Python" src="https://cdn.mos.cms.futurecdn.net/D45v5P2BYhhYPmPZaBtw6a.jpg" mos="" align="middle" fullscreen="" width="1181" height="710" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>12. <strong>Navigate to the rembg folder and give the file a name and set the file format to PNG. Click Save.</strong> In our example we save the file as les-no-bg.png.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1178px;"><p class="vanilla-image-block" style="padding-top:60.02%;"><img id="" name="run3.jpg" alt="Remove Backgrounds From Images With Python" src="https://cdn.mos.cms.futurecdn.net/uUnv2wzrjMTqYXpWPyDFAa.jpg" mos="" align="middle" fullscreen="1" width="1178" height="707" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/uUnv2wzrjMTqYXpWPyDFAa.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>13. You may encounter an error, but this is to be expected. <a href="https://drive.google.com/uc?id=1tCU5MM1LhRgGou5OpmpjBQbSrYIUoYab"><u><strong>Download the u2net file</strong></u></a><strong> and save it to .u2net folder in your user directory.</strong> This folder is automatically created and stored.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:814px;"><p class="vanilla-image-block" style="padding-top:41.40%;"><img id="" name="error.jpg" alt="Remove Backgrounds From Images With Python" src="https://cdn.mos.cms.futurecdn.net/CboS6nV4Bc3UFrs8eDsDVZ.jpg" mos="" align="middle" fullscreen="1" width="814" height="337" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/CboS6nV4Bc3UFrs8eDsDVZ.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>14. <strong>Go back to Step 10 and re-run the code.</strong> There will be no error this time so skip step 13.</p><p>15. <strong>Go to the rembg folder and your image is now ready for use.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:594px;"><p class="vanilla-image-block" style="padding-top:65.49%;"><img id="" name="run4.jpg" alt="Remove Backgrounds From Images With Python" src="https://cdn.mos.cms.futurecdn.net/5BtbhZumKupmkESCG7jqEa.jpg" mos="" align="middle" fullscreen="1" width="594" height="389" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/5BtbhZumKupmkESCG7jqEa.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="complete-code-listing-3">Complete Code Listing</h2><pre class="line-numbers language-bash" language="bash" ><code>from rembg import removefrom PIL import Imageimport easygui as eginput_path = eg.fileopenbox(title='Select image file')output_path = eg.filesavebox(title='Save file to..')input = Image.open(input_path)output = remove(input)output.save(output_path)</code></pre><h2 id="python-how-tos-6">Python How Tos</h2><ul><li><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11">How To Install Python on Windows 10 and 11</a></li><li><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">How to use For Loops in Python</a></li><li><a href="https://www.tomshardware.com/how-to/enumerate-in-python">How to Enumerate in Python</a></li><li><a href="https://www.tomshardware.com/how-to/create-python-executable-applications">How to Create Executable Applications in Python</a></li><li><a href="https://www.tomshardware.com/how-to/python-remove-image-backgrounds">How To Remove Backgrounds From Images With Python</a></li><li><a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny">How to Create Web Apps with Python, HTML and Thonny</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-camera-module-3-python-picamera-2">How To Use Raspberry Pi Camera Module 3 with Python Code</a></li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How To Get The News With Raspberry Pi Pico W and CircuitPython ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/raspberry-pi-pico-w-newsfeed-circuitpython</link>
                                                                            <description>
                            <![CDATA[ With a little code we can use a Raspberry Pi Pico W and CircuitPython to grab the latest headlines and scroll them across a tiny OLED screen on our desktop. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">tdNnJnZtkgs98aUs2dGNkJ</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/rMeH72SWYwk2piRqYMrYSi-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sat, 22 Oct 2022 13:00:37 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:34 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/rMeH72SWYwk2piRqYMrYSi-1280-80.jpg">
                                                            <media:credit><![CDATA[Future]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[CircuitPython newspaper]]></media:description>                                                            <media:text><![CDATA[CircuitPython newspaper]]></media:text>
                                <media:title type="plain"><![CDATA[CircuitPython newspaper]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/rMeH72SWYwk2piRqYMrYSi-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>The <a href="https://www.tomshardware.com/news/raspberry-pi-pico-tutorials-pinout-everything-you-need-to-know">Raspberry Pi Pico</a> certainly put the cat amongst the pigeons in 2021, but it was missing one key feature, Wi-Fi. Sure we can <a href="https://www.tomshardware.com/how-to/get-wi-fi-internet-on-raspberry-pi-pico">hack our own solution</a> but we had to wait until mid 2022 for Raspberry Pi to announce the Raspberry Pi Pico W in order to get official support.</p><p>The Raspberry Pi Pico W was released with a robust MicroPython firmware, but <a href="https://circuitpython.org/">CircuitPython</a>, our favorite microcontroller Python release, was sadly missing support. It may have taken a few months but down to the hard work of <a href="https://twitter.com/jeffepler">@jeffepler</a> we now have CircuitPython 8 Beta 2 which offers Wi-Fi support for the Pico W, while retaining the familiar CircuitPython ecosystem.</p><p>To celebrate this milestone we put together a project to highlight CircuitPython on the Raspberry Pi Pico W. We’ll be working with live data from an RSS news feed, converted to JSON and then displayed on a tiny OLED screen.</p><h2 id="building-the-circuit">Building the Circuit</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1356px;"><p class="vanilla-image-block" style="padding-top:65.27%;"><img id="" name="image003.jpg" alt="How To Get The News With Raspberry Pi" src="https://cdn.mos.cms.futurecdn.net/nHfnz7nveijSTDxLE4arXF.jpg" mos="" align="middle" fullscreen="" width="1356" height="885" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>For this project you will need</p><ul><li><a href="https://www.amazon.com/Raspberry-Pico-Platform-pre-soldered-headers/dp/B0BB9CQ3T9">A Raspberry Pi Pico W</a></li><li><a href="https://www.amazon.com/WayinTop-Display-SSD1306-3-3V-5V-Raspberry/dp/B085NHM5TC">128 x 32 0.91 inch OLED</a></li><li><a href="https://www.amazon.com/EDGELEC-Resistor-Tolerance-Multiple-Resistance/dp/B07QJB3LGN">4.7K Ohm Resistors</a></li><li><a href="https://www.amazon.com/SunFounder-Breadboards-Solderless-Distribution-Connecting/dp/B082KBF7MM">Half Breadboard</a></li><li><a href="https://www.amazon.com/GenBasic-Solderless-Dupont-Compatible-Breadboard-Prototyping/dp/B01L5UJ36U">Male to male jumper wires</a></li></ul><p>The circuit is essentially just the OLED screen connected to the Raspberry Pi Pico via an I2C connection. The only addition to the circuit are two 4.7K Ohm resistors which connect to the + rail and the SDA and SCL pins of the Pico. This rail is connected to 3.3V, and the resistors are used to pull the pins high, ready for sending and receiving data.</p><p>The connections are as follows</p><div ><table><tbody><tr><td class="firstcol " >Wire Color</td><td  >Raspberry Pi Pico W</td><td  >Breadboard</td><td  >OLED Display</td></tr><tr><td class="firstcol " >Green</td><td  >GP0 (SDA)</td><td  >N/A</td><td  >SDA</td></tr><tr><td class="firstcol " >Yellow</td><td  >GP1 (SCL)</td><td  >N/A</td><td  >SCL</td></tr><tr><td class="firstcol " >Red</td><td  >3V3 Out</td><td  >+</td><td  >VIN</td></tr><tr><td class="firstcol " >Black</td><td  >GND</td><td  >N/A</td><td  >GND</td></tr></tbody></table></div><h2 id="configuring-circuitpython">Configuring CircuitPython</h2><p><strong>1. Go to the official CircuitPython page for the Raspberry Pi Pico W </strong>and <a href="https://circuitpython.org/board/raspberry_pi_pico_w/"><strong>download the latest release UF2 firmware image</strong></a><strong>.</strong> At the time of writing this was CircuitPython 8 Beta 2.</p><p><strong>2. Whilst holding the BOOTSEL button, connect the Raspberry Pi Pico W to your computer. </strong>A new drive, RPI-RP2 will appear</p><p><strong>3. Copy the downloaded CircuitPython UF2 file to RPI-RP2. </strong>This will write CircuitPython to the internal flash storage of the Pico W. A new drive, CIRCUITPY will appear.</p><p>We need a number of CircuitPython libraries before we can continue. These libraries of prewritten code add extra features to a project.</p><p><strong>1. </strong><a href="https://circuitpython.org/libraries"><strong>Download</strong></a><a href="https://circuitpython.org/libraries"><strong> the bundle of libraries</strong></a><strong> for the same version of CircuitPython as installed on the Pico W.</strong> We installed CircuitPython 8 so downloaded the bundle for version 8.x.</p><p><strong>2. Extract the bundle to your desktop </strong>and <strong>then open the lib folder </strong>contained within.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:679px;"><p class="vanilla-image-block" style="padding-top:60.68%;"><img id="" name="image005.jpg" alt="How To Get The News With Raspberry Pi" src="https://cdn.mos.cms.futurecdn.net/Z8jMiwW93CSyGUBJWAoXcF.jpg" mos="" align="middle" fullscreen="" width="679" height="412" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>3. Copy the following files / folders from this lib folder to the lib folder on the CIRCUITPY drive.</strong></p><p>adafruit_bitmap_font</p><p>adafruit_display_text</p><p>adafruit_displayio_ssd1306.mpy</p><p>adafruit_requests.mpy</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:774px;"><p class="vanilla-image-block" style="padding-top:27.52%;"><img id="" name="image007.jpg" alt="How To Get The News With Raspberry Pi" src="https://cdn.mos.cms.futurecdn.net/Bw8X87h2QvvhchZXMrC9mF.jpg" mos="" align="middle" fullscreen="" width="774" height="213" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="working-with-circuitpython">Working with CircuitPython</h2><p><strong>1. </strong><a href="https://thonny.org/"><strong>Download and install Thonny</strong></a><strong> </strong>if you don’t have it already<strong>. </strong>Thonny is a Python editor which covers Python 3, MicroPython and CircuitPython.</p><p><strong>2. Open Thonny and go to Tools >> Options.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:301px;"><p class="vanilla-image-block" style="padding-top:68.77%;"><img id="" name="image009.jpg" alt="How To Get The News With Raspberry Pi" src="https://cdn.mos.cms.futurecdn.net/8xn5dTfWaZZbAFdjuPD4rF.jpg" mos="" align="middle" fullscreen="" width="301" height="207" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>3. Select Interpreter, then set the interpreter as CircuitPython, port to automatic, and click OK.</strong> Thonny will now connect to the Pico W running CircuitPython.</p><p>Our project code is made up of two files, secrets.py and code.py. The secrets.py file is essentially a Python module with two variables that will contain the SSID of our Wi-Fi access point, and the password. It is best practice to save your Wi-Fi details to a separate file called secrets.py, this reduces the risk of accidentally sharing your credentials. This process works for CircuitPython and <a href="https://www.tomshardware.com/how-to/hide-passwords-in-code-raspberry-pi-pico-w">MicroPython</a>.</p><p><strong>1. Create a new file </strong>and in there <strong>create two objects, ssid and password.</strong></p><p><strong>2. For the ssid object, assign it the name of your Wi-Fi access point / router.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>ssid = “YOUR WI-FI AP NAME HERE”</code></pre><p><strong>3. For the password, assign the Wi-Fi password.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>password = “YOUR SECRET PASSWORD”</code></pre><p><strong>4. Save the file to the CIRCUITPY drive as secrets.py.</strong></p><h2 id="secrets-py-code-listing">Secrets.py Code Listing</h2><pre class="line-numbers language-bash" language="bash" ><code>ssid = "YOUR WI-FI AP NAME HERE"password = "YOUR SECRET PASSWORD"</code></pre><p>The code for this project is contained in a file called code.py. This file will autorun when the Pico W is powered up, this is a feature of CircuitPython. In MicroPython we would name the file main.py to achieve the same result. We now start the process of writing the code that will make up our project.</p><p><strong>1. Click on File >> Open </strong>and <strong>select the CircuitPython device. Open code.py on the CIRCUITPY drive. Delete any code in the file.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:270px;"><p class="vanilla-image-block" style="padding-top:84.81%;"><img id="" name="image010.jpg" alt="How To Get The News With Raspberry Pi" src="https://cdn.mos.cms.futurecdn.net/aXvkrfW2vPs9QPYiXTCDvF.jpg" mos="" align="middle" fullscreen="" width="270" height="229" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. Import modules of pre-written code </strong>to handle pause (time) our code, set an IP address, use the Pico W’s Wi-Fi chip and to create web sockets.</p><pre class="line-numbers language-bash" language="bash" ><code>import timeimport ipaddressimport wifiimport socketpool</code></pre><p><strong>3. Import four more modules </strong>for secure connections, to make web requests, a module with our Wi-Fi login details and a module to interact with the GPIO.</p><pre class="line-numbers language-bash" language="bash" ><code>import sslimport adafruit_requestsimport secretsimport board</code></pre><p><strong>4. Import the final group of modules</strong> for accelerated bus access, a display library, a terminal style text module, scrolling text, and a driver for the OLED display.</p><pre class="line-numbers language-bash" language="bash" ><code>import busioimport displayioimport terminaliofrom adafruit_display_text.scrolling_label import ScrollingLabelimport adafruit_displayio_ssd1306</code></pre><p><strong>5. Release the display for CircuitPython </strong>to use it and then<strong> specify the GPIO pins used for I2C.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>displayio.release_displays()i2c = busio.I2C(board.GP1, board.GP0)</code></pre><p><strong>6. Specify the I2C interface and I2C address for the OLED screen </strong>on the display bus and then<strong> use that to create a display object. </strong>Don’t forget to set the width and height to match your OLED display. To find the I2C address of the OLED display, consult its datasheet or<a href="https://learn.adafruit.com/scanning-i2c-addresses/circuitpython"> use an I2C scanner to search for it.</a></p><pre class="line-numbers language-bash" language="bash" ><code>display_bus = displayio.I2CDisplay(i2c, device_address=0x3C)display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=32)</code></pre><p><strong>7. Connect to the Wi-Fi</strong> using the ssid and password stored in the secrets module.</p><pre class="line-numbers language-bash" language="bash" ><code>wifi.radio.connect(ssid=secrets.ssid,password=secrets.password)</code></pre><p><strong>8. Create a pool of sockets </strong>that we can use for connections and <strong>then create a new HTTP session </strong>to be used when making web requests.</p><pre class="line-numbers language-bash" language="bash" ><code>pool = socketpool.SocketPool(wifi.radio)request = adafruit_requests.Session(pool, ssl.create_default_context())</code></pre><p><strong>9. Create a while True loop </strong>to run the main project code.<strong> </strong>This loop will continue for as long as the Pico W is powered on.</p><pre class="line-numbers language-bash" language="bash" ><code>while True:</code></pre><p><strong>10. Create a banner, and save it to toms object.</strong>The Banner is a string of * followed by  “Tom’s Hardware News” then a further 10 more *.</p><pre class="line-numbers language-bash" language="bash" ><code>toms = "*"*10+" Tom's Hardware News"+"*"*10</code></pre><p><strong>11. Create an object to handle scrolling the text </strong>stored in the toms object. The animate time handles the scrolling speed, scale is used to increase the text size, with 3 being the largest available for our 128x32 screen.</p><pre class="line-numbers language-bash" language="bash" ><code>my_scrolling_label = ScrollingLabel(terminalio.FONT, text=toms, max_characters=20, animate_time=0.1, scale=3)</code></pre><p><strong>12. Set the position of the text </strong>(horizontal, x and vertical, y<strong>).</strong></p><pre class="line-numbers language-bash" language="bash" ><code>my_scrolling_label.x = 10my_scrolling_label.y = 10</code></pre><p><strong>13. Show the text on the OLED display.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>display.show(my_scrolling_label)</code></pre><p><strong>14. Use a for loop to scroll the banner </strong>across the screen.<strong> </strong>We use the length of the text stored in the toms object, minus six to create a pleasant scroll. This will need to be tweaked to suit your banner text.</p><pre class="line-numbers language-bash" language="bash" ><code>for i in range(len(toms)-6):        my_scrolling_label.update()        time.sleep(0.1)</code></pre><p><strong>15. Create an object, feed </strong>to <strong>store the URL of the JSON feed that contains the news headlines. </strong>We used <a href="http://rss2json.com">rss2json.com</a> to convert the Tom’s Hardware RSS feed into JSON, which can be easily worked with in CircuitPython.</p><pre class="line-numbers language-bash" language="bash" ><code>feed = request.get("https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fwww.tomshardware.com%2Ffeeds%2Fall")</code></pre><p><strong>16. Use a for loop to retrieve the first five stories</strong> from the feed.</p><pre class="line-numbers language-bash" language="bash" ><code>for story in range(5):</code></pre><p><strong>17. Print the story’s headline </strong>to the Python shell.</p><pre class="line-numbers language-bash" language="bash" ><code>print(feed.json()['items'][story]['title'])</code></pre><p><strong>18. Update the scrolling text to scroll the headline</strong>, with a buffer of 20 blank spaces before the text and a scale (text size) of 2.</p><pre class="line-numbers language-bash" language="bash" ><code>my_scrolling_label = ScrollingLabel(terminalio.FONT, text=" "*20+str(feed.json()['items'][story]['title']), max_characters=20, animate_time=0.1, scale=2)</code></pre><p><strong>19. Set the position of the text</strong> (horizontal, x and vertical, y).</p><pre class="line-numbers language-bash" language="bash" ><code>my_scrolling_label.x = 10my_scrolling_label.y = 10</code></pre><p><strong>20. Show the text on the OLED display.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>display.show(my_scrolling_label)</code></pre><p><strong>21. Use another for loop to scroll the headline text. </strong>The iterations in the loop are set by the length of the headline, plus 21 characters to create a buffer.</p><pre class="line-numbers language-bash" language="bash" ><code>for i in range(len(feed.json()['items'][story]['title'])+21):            my_scrolling_label.update()            time.sleep(0.1)</code></pre><p><strong>22. Finally add a sleep of 30 minutes, (1800 seconds) </strong>to set the Pico W to check for new headlines every half hour.</p><pre class="line-numbers language-bash" language="bash" ><code>time.sleep(1800)</code></pre><p><strong>23. Save the project as code.py</strong> to CIRCUITPY and click Run to test start the code.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:217px;"><p class="vanilla-image-block" style="padding-top:50.69%;"><img id="" name="image011.jpg" alt="How To Get The News With Raspberry Pi" src="https://cdn.mos.cms.futurecdn.net/Ru2MkHCpuycxpBSM22eHyF.jpg" mos="" align="middle" fullscreen="" width="217" height="110" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>You should see the OLED screen come to life and scroll a banner, then the news headlines. As we saved the project to the code.py file, this code will autorun when the Pico W is powered up.</p><h2 id="complete-code-listing-4">Complete Code Listing</h2><pre class="line-numbers language-bash" language="bash" ><code>import timeimport ipaddressimport wifiimport socketpoolimport sslimport adafruit_requestsimport secretsimport boardimport busioimport displayioimport terminaliofrom adafruit_display_text.scrolling_label import ScrollingLabelimport adafruit_displayio_ssd1306# Setup the displaydisplayio.release_displays()i2c = busio.I2C(board.GP1, board.GP0)display_bus = displayio.I2CDisplay(i2c, device_address=0x3C)display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=32)wifi.radio.connect(ssid=secrets.ssid,password=secrets.password)pool = socketpool.SocketPool(wifi.radio)request = adafruit_requests.Session(pool, ssl.create_default_context())while True:    toms = "*"*10+" Tom's Hardware News"+"*"*10    my_scrolling_label = ScrollingLabel(terminalio.FONT, text=toms, max_characters=20, animate_time=0.1, scale=3)    my_scrolling_label.x = 10    my_scrolling_label.y = 10    display.show(my_scrolling_label)    for i in range(len(toms)-6):        my_scrolling_label.update()        time.sleep(0.1)    feed = request.get("https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fwww.tomshardware.com%2Ffeeds%2Fall")    for story in range(5):        print(feed.json()['items'][story]['title'])        my_scrolling_label = ScrollingLabel(terminalio.FONT, text=" "*20+str(feed.json()['items'][story]['title']), max_characters=20, animate_time=0.1, scale=2)        my_scrolling_label.x = 10        my_scrolling_label.y = 10        display.show(my_scrolling_label)        for i in range(len(feed.json()['items'][story]['title'])+21):            my_scrolling_label.update()            time.sleep(0.1)    time.sleep(1800)</code></pre>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Rust Programming Language To Land in Linux Kernel 6.1 ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/rust-in-linux-kernel</link>
                                                                            <description>
                            <![CDATA[ Linux will support the Rust programming language in its kernel from version 6.1. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">GNHKEAbQY6y5uChH2cF3fh</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/R2JUKM6rNcPQHywUUAzgqZ-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Thu, 06 Oct 2022 15:10:08 +0000</pubDate>                                                                                                                                <updated>Thu, 21 Aug 2025 09:49:25 +0000</updated>
                                                                                                                                            <category><![CDATA[Linux]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                    <category><![CDATA[Operating Systems]]></category>
                                                                                                                    <dc:creator><![CDATA[ Ian Evenden ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/dY5MGBXCT6GV6ARt8oSiSj.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Ian is a UK-based news writer for Tom’s Hardware US. In 1992, he was given a 286-based PC because his parents hoped he’d become a programmer, and was instantly hooked despite the vagaries of MS-DOS. Pretty soon there was a 386 with Windows 3.1, a CD-ROM, and Sound Blaster card under the desk, followed by Pentium II, Athlon, i7 and Threadripper systems, most of which he built himself. After a brief eight-year dalliance with games consoles at Edge magazine, he began contributing to the likes of Maximum PC, PC Gamer, Windows Help and Advice and a few other magazines that have since closed - none of which were directly his fault. His desk today is a riot of PC monitors, Apple products, Raspberry Pi boards, purple unicorns, game controllers and camera lenses. He has no idea about programming.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/R2JUKM6rNcPQHywUUAzgqZ-1280-80.jpg">
                                                            <media:credit><![CDATA[Miguel Á. Padriñán]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Tux the penguin peeks out from behind a rusty chain]]></media:description>                                                            <media:text><![CDATA[Tux the penguin peeks out from behind a rusty chain]]></media:text>
                                <media:title type="plain"><![CDATA[Tux the penguin peeks out from behind a rusty chain]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/R2JUKM6rNcPQHywUUAzgqZ-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>In a recent post on the Linux Kernel Mailing List, Linus Torvalds promised “a number of fairly core new things” in <a href="https://www.tomshardware.com/news/linux-kernel-release-6" target="_blank">Linux kernel</a> 6.1, and the first one seems to have appeared: as reported by <a href="https://www.theregister.com/2022/10/05/rust_kernel_pull_request_pulled/" target="_blank">The Register</a>, the Rust programming language will be directly supported in the OS.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1280px;"><p class="vanilla-image-block" style="padding-top:56.25%;"><img id="" name="rust-logo.jpg" alt="The Rust logo" src="https://cdn.mos.cms.futurecdn.net/Mpg5Rxr8oYnbeNTyMoqPwZ.jpg" mos="" align="middle" fullscreen="" width="1280" height="720" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Rust Foundation)</span></figcaption></figure><p>The news isn&apos;t exactly unexpected as patches to add Rust to Linux go back for some time, with <a href="https://lkml.org/lkml/2022/8/5/481">version 9 appearing in August 2022.</a> At the recent Open Source Summit Torvalds&apos; keynote indicated that we should expect Rust to appear in 6.1. Right now, Rust has a <a href="https://github.com/Rust-for-Linux">group of developers</a> working on support for the Linux Kernel and in a pull request made by Kees Cook on October 1, accepted by Torvalds, we see the first steps towards its inevitable arrival in 6.1.</p><p>Adding support for Rust adds about 12,500 lines of code to the Linux kernel, which is itself written in C, with which Rust has a certain amount of interoperability. However, GCC, the Gnu Compiler Collection, cannot compile the new language, and Clang, which can, has its own shortcomings if you want to write code for architectures other than x86 and Arm. With Rust set to receive official Linux support, and an eager community of kernel hackers, it can only be a matter of time before Rust is available to more architectures. The new kernel is expected to be available from December this year.</p><p>Some developers have already begun showing what can be done with Rust on Linux, with Western Digital’s principal engineer Andreas Hindborg showing off an NVMe SSD driver for Linux written in Rust at the 2022 Linux Plumbers Summit, which had a whole micro conference dedicated to <a href="https://lpc.events/blog/2022/index.php/2022/07/09/microconferences-at-linux-plumbers-conference-rust/">Rust in Linux</a>.</p><p><a href="https://www.rust-lang.org/" target="_blank">Rust</a> is a general-purpose programming language influenced by C++ that was created in 2006 and hit version 1.0 in 2015. It grew out of a personal project by Mozilla employee Graydon Hoare, and was sponsored by Mozilla until 2020, when corporate restructuring caused by the Covid pandemic caused the Rust Foundation to be founded in 2021. Amazon Web Services, Huawei, Google, Microsoft and Mozilla now support the foundation, and Google supports Rust in its Android Open Source Project. The language is notable for its elegance, its zero-tolerance approach to memory safety, and the speed of its growth in popularity.</p><p>It’s also known as a high-performance language, created with the intention of marrying the flexible syntax of a high-level language with the hardware control and speed of a low-level one. Parallelism is also one of its fortes, and its strong memory safety - it notably doesn’t incorporate a garbage collector to return memory that’s no longer being referenced by a program to the system, as C# and Java do. The memory errors introduced by C programmers could be a thing of the past with Rust’s memory-safe features.</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How To Set Up an SSH Key For Secure Connections ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/use-a-secure-key-for-ssh</link>
                                                                            <description>
                            <![CDATA[ SYNOPSISPasswords are just one part of the security toolkit. SSH keys are a seamless and easy to setup tool to keep our connections secure. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">A8dJMv7kosCjjWGDSWKq2k</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/hmxQgYZLtvPkiGkefoEfYn-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sat, 01 Oct 2022 13:21:21 +0000</pubDate>                                                                                                                                <updated>Thu, 30 Jan 2025 16:26:36 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/hmxQgYZLtvPkiGkefoEfYn-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[How To Set Up an SSH Key]]></media:description>                                                            <media:text><![CDATA[How To Set Up an SSH Key]]></media:text>
                                <media:title type="plain"><![CDATA[How To Set Up an SSH Key]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/hmxQgYZLtvPkiGkefoEfYn-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>The Secure Shell Protocol (SSH) is perhaps the most well-known means to make a secure connection between a client machine (your laptop, phone or desktop) and a remote server in an office, data center or in your home network. You’ll likely use SSH if you want to get to the command line on your web hosting service or a <a href="https://www.tomshardware.com/reviews/raspberry-pi-headless-setup-how-to,6028.html">headless Raspberry Pi</a>. SSH is available in some form for nearly every operating system, and often it is <a href="https://www.tomshardware.com/how-to/use-ssh-connect-to-remote-computer">integrated into the OS.</a></p><p>Most servers give you a choice of connecting to SSH via a password or via SSH keys, which are more secure. The SSH key method uses cryptographically-generated public and private keys to create an encrypted connection between devices.</p><p>Our public key is stored on the remote machine and a private key is stored on our machine. The two SSH keys are required to make a secure connection. Keys can also be used with passphrases to add another level of security, but they can also be used without, for example in automated processes.</p><p>In this how to we will learn how to create SSH keys using PuTTY, the most popular SSH client, and at the Windows Command Prompt / Linux Terminal.</p><h2 id="preparing-the-remote-server-for-ssh-keys">Preparing the Remote Server for SSH Keys</h2><p>Our remote machine can be in a data center run by a web hosting service, our office or home. Typically Linux servers such as VPS and cloud hosting will have SSH running by default, using passwords for secure logins. If this is not the case, you will need to enable SSH via the control panel for your VPS / cloud service. If you are using a home server, then it is possible that it may not be installed. If that is the case, follow these steps before moving onwards.</p><p><strong>1. Open a terminal and check for a running SSH service on the machine. </strong>If the SSH service is running it will return Active: active (running).</p><pre class="line-numbers language-bash" language="bash" ><code>sudo service ssh status</code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:777px;"><p class="vanilla-image-block" style="padding-top:67.31%;"><img id="" name="image003.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/KaUHvohJh4XNhNxSfdFijB.jpg" mos="" align="middle" fullscreen="1" width="777" height="523" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/KaUHvohJh4XNhNxSfdFijB.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. On the physical server, open a terminal and install OpenSSH Server.</strong> You will need to be sat in front of the machine to issue these commands.</p><pre class="line-numbers language-bash" language="bash" ><code>sudo apt updatesudo apt install openssh-server</code></pre><p><strong>3. Start the SSH service.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>sudo service ssh start</code></pre><p><strong>4. In your home directory create a hidden directory called .ssh.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>mkdir .ssh</code></pre><p><strong>5. Close the connection by pressing CTRL+D or typing exit and pressing Enter.</strong></p><h2 id="using-putty-to-connect-to-a-remote-server-using-ssh-keys">Using PuTTY to Connect to a Remote Server Using SSH Keys</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:452px;"><p class="vanilla-image-block" style="padding-top:97.79%;"><img id="" name="putty-hero.JPG" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/aWVsFz56mRtAnHF3s252Uk.jpg" mos="" align="middle" fullscreen="" width="452" height="442" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>PuTTY is an application to create and manage SSH and serial connections to devices. PuTTY comes with its own key generator application and in this part of the how to we will create a public for our remote server and private key on our trusted device.</p><p><strong>1. </strong><a href="https://www.google.com/url?q=https://www.putty.org/&sa=D&source=editors&ust=1656970899227880&usg=AOvVaw3BBY_Kj1lj9rCQkyuFz3KH"><strong>Download and install PuTTY.</strong></a><strong> </strong>Windows does have its own command prompt, which can be used with SSH, but PuTTY is by far the most accessible means to open an SSH connection.</p><p><strong>2. Search for puttygen and open the application.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:782px;"><p class="vanilla-image-block" style="padding-top:86.32%;"><img id="" name="putty-install1.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/F9uKmesPSg8Xz5eeY8TfNk.jpg" mos="" align="middle" fullscreen="" width="782" height="675" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>3. Click on RSA and set the bits to 4096. Click Generate to create a key.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:639px;"><p class="vanilla-image-block" style="padding-top:79.19%;"><img id="" name="putty-install2.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/wSQzweahAeNKcwfLcp4knk.jpg" mos="" align="middle" fullscreen="" width="639" height="506" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>4. Move the mouse around the blank area of the dialog </strong>to generate a random seed for the key.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:602px;"><p class="vanilla-image-block" style="padding-top:78.24%;"><img id="" name="putty-install3.gif" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/xom9mgBdDo6pPoX4Wwuhhk.gif" mos="" align="middle" fullscreen="" width="602" height="471" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>5. Create a passphrase for the key. </strong>This is advised for SSH keys that will be used in interactive sessions.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:593px;"><p class="vanilla-image-block" style="padding-top:78.25%;"><img id="" name="putty-install3-pass.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/8UkMEYcUHMAGLPrTmh2Ruk.jpg" mos="" align="middle" fullscreen="" width="593" height="464" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>6. Save the public key as id_rsa_putty.pub to a folder called .ssh.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:636px;"><p class="vanilla-image-block" style="padding-top:78.77%;"><img id="" name="putty-install4.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/MNYWUk33wmVive4XsPM83m.jpg" mos="" align="middle" fullscreen="" width="636" height="501" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>7. Save the private key as id_rsa_putty.ppk.</strong> The ppk file is Putty’s own private key format.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:639px;"><p class="vanilla-image-block" style="padding-top:79.66%;"><img id="" name="putty-install5.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/UPxScdhpkvBoTdonWGvAAm.jpg" mos="" align="middle" fullscreen="" width="639" height="509" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>8. Highlight the public key and copy the text.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:664px;"><p class="vanilla-image-block" style="padding-top:78.77%;"><img id="" name="putty-install6.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/tNm86DSyg2zteQ3RURWMHm.jpg" mos="" align="middle" fullscreen="" width="664" height="523" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="copying-the-public-key-to-the-remote-server">Copying the Public Key to the Remote Server</h2><p><strong>1. Launch PuTTY.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:796px;"><p class="vanilla-image-block" style="padding-top:85.68%;"><img id="" name="putty-key1.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/4NUiCKoFMR6pfErRau8ZPm.jpg" mos="" align="middle" fullscreen="" width="796" height="682" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. Enter the IP address or hostname for your remote server </strong>and <strong>click Open.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:503px;"><p class="vanilla-image-block" style="padding-top:96.22%;"><img id="" name="putty-key2.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/YPXcUFNkZjzHnyWdpouXVm.jpg" mos="" align="middle" fullscreen="" width="503" height="484" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>3. When prompted, enter your username and password for the remote server.</strong> Note that the password is not shown. This is a security feature to prevent “shoulder surfing”.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:293px;"><p class="vanilla-image-block" style="padding-top:45.39%;"><img id="" name="putty-key3.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/nmbHiKdaPAvmBN5Zik2ZZm.jpg" mos="" align="middle" fullscreen="" width="293" height="133" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>4. Using the nano text editor, create a new file called authorized_keys in the .ssh directory.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:526px;"><p class="vanilla-image-block" style="padding-top:23.95%;"><img id="" name="putty-key4.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/nyE2HSwZqQRPqW5sFm64pm.jpg" mos="" align="middle" fullscreen="" width="526" height="126" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>5. Right click and paste the public key (created in PuTTYGen) </strong>into the blank file<strong>. Save </strong>by hitting CTRL+X,then Y and Enter.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:715px;"><p class="vanilla-image-block" style="padding-top:64.48%;"><img id="" name="putty-key5.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/ibvPpnD7jXr89B6r9nsFem.jpg" mos="" align="middle" fullscreen="" width="715" height="461" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>6. Log out of the SSH session</strong> by pressing CTRL + D.</p><p><strong>7. Re-Open PuTTY</strong> and <strong>go to SSH >> Auth.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:545px;"><p class="vanilla-image-block" style="padding-top:94.50%;"><img id="" name="putty-key6.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/QkKKgPJbQwd3UyMvYEx9km.jpg" mos="" align="middle" fullscreen="" width="545" height="515" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>8. Select the Putty Private Key (ppk)</strong> that we just created.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:490px;"><p class="vanilla-image-block" style="padding-top:98.78%;"><img id="" name="putty-key7.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/qZbtpja92AZUmKVxq4zXum.jpg" mos="" align="middle" fullscreen="" width="490" height="484" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>9. Scroll back to Session, enter the hostname / IP address for your server </strong>and <strong>click Open</strong> to start a connection.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:513px;"><p class="vanilla-image-block" style="padding-top:96.30%;"><img id="" name="putty-key8.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/YkxNJZ6wcKw9fFG9ZzE77n.jpg" mos="" align="middle" fullscreen="" width="513" height="494" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>10. Enter your username, then the passphrase for your key. Press Enter to login.</strong></p><figure role="gallery"><figure><img src="https://cdn.mos.cms.futurecdn.net/9iomFDH5vYbnUZVTQL53zm.jpg" alt="How To Set Up an SSH Key" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/P6Z6y8o5reUx8ooWnbo9Dn.jpg" alt="How To Set Up an SSH Key" /><figcaption><small role="credit">Tom's Hardware</small></figcaption></figure></figure><p>You are now in control of the remote server, using a Linux terminal working in the <a href="https://www.tomshardware.com/how-to/getting-to-know-the-linux-filesystem">Linux filesystem</a>. To close a connection use CTRL + D or click on the X to close the window.</p><h2 id="how-to-create-an-ssh-key-pair-via-the-command-prompt-terminal">How To Create an SSH Key Pair via the Command Prompt / Terminal</h2><p>Creating an SSH key pair from the command prompt / Linux terminal can be done with just one command and a few questions to answer. We set up the public and private keys on our client machine, copying the public key to the remote server. These steps apply to the Windows command prompt and the Linux terminal.</p><p><strong>1. Open a Command Prompt by pressing the Windows key and search for CMD. Press Enter to run.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:769px;"><p class="vanilla-image-block" style="padding-top:88.04%;"><img id="" name="cmd1.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/2tEX5jCAzXcXdkxXSaFsJj.jpg" mos="" align="middle" fullscreen="" width="769" height="677" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>2. Use the ssh-keygen command </strong>to create a SSH key using the RSA key type, with 4096 bits.</p><pre class="line-numbers language-bash" language="bash" ><code>ssh-keygen -t rsa -b 4096</code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:488px;"><p class="vanilla-image-block" style="padding-top:34.43%;"><img id="" name="cmd2.jpg" alt="How To Set Up an SSH Key" src="https://cdn.mos.cms.futurecdn.net/UWwfwqzQsaPNhWgNuVXMti.jpg" mos="" align="middle" fullscreen="" width="488" height="168" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p><strong>3. When prompted to name your key, press Enter</strong>. This will save the private and public key to the .ssh directory for your named account. For example our keys were saved to C:\Users\lespo\.ssh. Linux users, the keys will save to .ssh in your home directory \home\user\.ssh</p><p><strong>4.</strong> When prompted, <strong>give your key a passphrase as an extra level of security.</strong> A passphrase is an additional security step for SSH keys that will be used by real users (interactively). A passphrase is not needed if the SSH connection will be used in an automated script.</p><p><strong>5. Change directory to the location of your SSH keys</strong>. Here we assume that you are in your named account. For example C:\Users\lespo is ours. Under Linux it would be /home/les/.ssh</p><pre class="line-numbers language-bash" language="bash" ><code>cd .ssh</code></pre><p><strong>6. List the files in the directory. </strong>There should be id_rsa and id_rsa.pub.</p><pre class="line-numbers language-bash" language="bash" ><code>Windows CommanddirLinux Commandls</code></pre><h2 id="copying-the-public-key-to-the-remote-server-2">Copying the Public Key to the Remote Server</h2><p>The public key is stored on our remote server, and it interacts with the private key on our trusted machine to form a secure connection. In order to get the public key to our server we need to securely copy (scp) the file across.</p><p><strong>1. In a Command Prompt use the scp command to securely copy the id_rsa.pub to your home directory on the remote server.</strong> You will need to know the IP address or hostname of the remote computer. In our example we copied the file to testuser@192.168.0.10:/home/testuser/</p><pre class="line-numbers language-bash" language="bash" ><code>scp id_rsa.pub user@hostname:/home/username</code></pre><p><strong>2. SSH into the remote computer.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>ssh user@hostname</code></pre><p><strong>3. Verify that the id_rsa.pub file is present in your home directory.</strong></p><pre class="line-numbers language-bash" language="bash" ><code>ls *.pub</code></pre><p><strong>4. Copy the contents of the file into a new file in the .ssh directory. </strong>Using the cat command we send the contents to the file, authorized_keys using a pipe that appends the data to the file (>>).</p><pre class="line-numbers language-bash" language="bash" ><code>cat id_rsa.pub >> .ssh/authorized_keys</code></pre><p><strong>5. Close the SSH connection by pressing CTRL + D or by typing exit.</strong></p><p><strong>6. Reconnect via SSH to the remote computer</strong>. If you created a passphrase for your SSH key, you will be prompted for it.</p><h2 id="using-ssh-keys-on-another-machine">Using SSH Keys on Another Machine</h2><p>Reusing your private SSH key is possible, but it isn’t the best security practice. Losing a laptop with the key means that you will need to regenerate your keys. Best practice would be to generate a new key pair for each device that wishes to connect. Appending the public key to the authrozied_keys file on the server. That said, it is relatively easy to reuse a private key across multiple devices.</p><h2 id="reusing-a-putty-private-key">Reusing a PuTTY Private Key</h2><p>PuTTY stores the private key as a PPK key and this file is all we need for a machine to connect to a remote server using our public key.</p><p>1. <strong>Go to your .ssh folder and copy the PPK file to a USB stick.</strong> Keep this USB stick safe as it can be used by anyone to gain access to your server.</p><p>2. <strong>Insert the USB stick into another computer.</strong></p><p>3.<strong> Create an .ssh folder in your home directory. </strong>For windows this would be C:\Users\username\.ssh and Linux /home/user/.ssh.</p><p>4. <strong>Copy the PPK file to the .ssh directory.</strong></p><p>5. <strong>Follow from Step 7 of Copying the Public Key to the Remote Server to login.</strong></p><h2 id="reusing-a-command-prompt-terminal-private-key">Reusing a Command Prompt / Terminal Private Key</h2><p>1.  <strong>Go to your .ssh folder and copy the private key file to a USB stick.</strong> Keep this USB stick safe as it can be used by anyone to gain access to your server.</p><p>2. <strong>Insert the USB stick into another computer.</strong></p><p>3.<strong> Create an .ssh folder in your home directory.</strong> For windows this would be C:\Users\username\.ssh and Linux /home/user/.ssh.</p><p>4. <strong>Copy the private key file to the .ssh directory.</strong></p><p>5. <strong>Start an SSH session to the remote computer.</strong> If you created a passphrase for your SSH key, you will be prompted for it. </p><pre class="line-numbers language-bash" language="bash" ><code>ssh user@hostname</code></pre>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ FPGA Demo Shows Efficiency Gains Compared to x86 Chip ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/fpga-demo-shows-efficiency-gains-compared-to-x86-chip</link>
                                                                            <description>
                            <![CDATA[ A paper from two programmers shows efficiency gains of 50x running the same program on an FPGA vs a CPU ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">WSRhX7kCpypbao5dZ6Kmfa</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/ouFvkYNLoRm4gA98TsZNSo-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Wed, 28 Sep 2022 14:31:24 +0000</pubDate>                                                                                                                                <updated>Thu, 21 Aug 2025 12:53:32 +0000</updated>
                                                                                                                                            <category><![CDATA[Manufacturing]]></category>
                                                    <category><![CDATA[Tech Industry]]></category>
                                                                                                                    <dc:creator><![CDATA[ Ian Evenden ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/dY5MGBXCT6GV6ARt8oSiSj.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Ian is a UK-based news writer for Tom’s Hardware US. In 1992, he was given a 286-based PC because his parents hoped he’d become a programmer, and was instantly hooked despite the vagaries of MS-DOS. Pretty soon there was a 386 with Windows 3.1, a CD-ROM, and Sound Blaster card under the desk, followed by Pentium II, Athlon, i7 and Threadripper systems, most of which he built himself. After a brief eight-year dalliance with games consoles at Edge magazine, he began contributing to the likes of Maximum PC, PC Gamer, Windows Help and Advice and a few other magazines that have since closed - none of which were directly his fault. His desk today is a riot of PC monitors, Apple products, Raspberry Pi boards, purple unicorns, game controllers and camera lenses. He has no idea about programming.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/ouFvkYNLoRm4gA98TsZNSo-1280-80.jpg">
                                                            <media:credit><![CDATA[Victor Suarez Rovere and Julian Kemmerer]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Sphery Vs Shapes]]></media:description>                                                            <media:text><![CDATA[Sphery Vs Shapes]]></media:text>
                                <media:title type="plain"><![CDATA[Sphery Vs Shapes]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/ouFvkYNLoRm4gA98TsZNSo-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>An FPGA - that’s a field-programmable gate array, a sort of reconfigurable microchip - has been shown to run a 3D, ray-traced game written in C 50 times more efficiently than an x86 CPU while using a fraction of the energy and perhaps pointing the way to future programming efficiency gains. The claims are made in a white paper [<a href="https://raw.githubusercontent.com/JulianKemmerer/PipelineC-Graphics/main/doc/Sphery-vs-Shapes.pdf" target="_blank">PDF</a>] by Victor Suarez Rovere, a developer from Argentina, and Julian Kemmerer, a systems engineer from Pennsylvania, and brought to our attention by <a href="https://www.cnx-software.com/2022/09/28/3d-game-fpga-50x-more-efficient-x86-hardware/" target="_blank">CNX Software</a>.</p><div class="youtube-video" data-nosnippet ><div class="video-aspect-box"><iframe data-lazy-priority="low" data-lazy-src="https://www.youtube-nocookie.com/embed/hn3sr3VMJQU" allowfullscreen></iframe></div></div><p>The <a href="https://www.tomshardware.com/reviews/fpga-definition-explained-vs-asic,6068.html" target="_blank">FPGA</a> in question is the <a href="https://digilent.com/shop/arty-a7-artix-7-fpga-development-board/" target="_blank">Arty A7</a>, a Xilinx Artix-7 100T FPGA development board that sells for around $280 and features 101,440 logic cells (an FPGA’s logic cells contain a look-up table that can implement any logic function, giving the chip its programmability) on a 28 nanometer process, and which pulls less than a watt of power. The CPU it was pitted against (without, it must be said, troubling the chip’s iGPU) was a Ryzen 7 4800H, an eight-core 16-thread laptop processor that was built on a 7 nm process and has a default TDP of 45W. That&apos;s a laptop chip that&apos;s not available on its own, but the R7 4700G is currently available for about $240.</p><p>The game that was compiled to run on the two very different platforms is "Sphery Vs Shapes," and doesn’t appear to contain much in the way of plot, characters or actual gameplay, but does have lots of ray-tracing, as a shiny metallic ball bounces its way across a chessboard-like environment, which is reflected in its shiny spherical surface.</p><p>Both platforms rendered the game at 1080p and 60 frames per second without a problem, but the FPGA did it using 660 mW, while the R7 needed 35W, a difference of 53x. It is speculated that, were the FPGA to use the same 7nm process as the CPU, this figure could be six times higher.</p><p>The keys to the whole thing are <a href="https://github.com/JulianKemmerer/PipelineC" target="_blank">Pipeline C</a>, an invention of Kemmerer’s, and <a href="https://github.com/suarezvictor/CFlexHDL" target="_blank">CflexHDL</a> from Suarez. You can find them both on GitHub. "The game’s pixel rendering and animation logic is based on floating point and vector math operations. All of the game code is expressed using a clean syntax that translates directly to a digital circuit. The current target of this design is a FPGA board with Full HD digital video output, and the workflow also allows running the game in realtime on a regular PC using the unmodified source," they write in their paper. "This allows for much faster development-test iterations than with traditional hardware design tools. For the same workload, the computing efficiency resulted in more than 50X better than using a modern CPU, in a chip an order of magnitude smaller."</p><p>"Sphery Vs Shapes" stands up pretty well as a graphics demo, but what it means for the future of programming is more interesting - especially as FPGAs are <a href="https://www.tomshardware.com/news/amd-to-fuse-fpga-ai-engines-onto-epyc-processors-arrives-in-2023" target="_blank">going to start appearing</a> in AMD chips. There are plans to port the whole thing to RISC-V, and to design an open-source ASIC (application-specific integrated circuit) that supports the pipeline, and there are possibilities for the world of microcontrollers too." The code can be translated to a logic circuit, run on a[n] off-the-shelf CPU, or on a microcontroller to develop hardware/software peripherals without changes to the code,” Suarez and Kemmerer write in their conclusion. "The results we obtained are readily reproducible, as materials are easy to obtain and not expensive."</p><p><br></p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How to Create Web Apps with Python, HTML and Thonny ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny</link>
                                                                            <description>
                            <![CDATA[ Get the latest news, stocks, jokes using RSS feeds and just a little Python. We use the latest version of Thonny to write our own, custom web app. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">cg4qqzErp7US5ZZufrzyY9</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/99ENoLZ2KwUXu9wQbAd2Bi-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sat, 03 Sep 2022 12:00:12 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:28 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/99ENoLZ2KwUXu9wQbAd2Bi-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Create Web Apps with Python, HTML and Thonny]]></media:description>                                                            <media:text><![CDATA[Create Web Apps with Python, HTML and Thonny]]></media:text>
                                <media:title type="plain"><![CDATA[Create Web Apps with Python, HTML and Thonny]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/99ENoLZ2KwUXu9wQbAd2Bi-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Python is a glue. We can use it to join different elements of code together. As a language, Python is easy to learn, and human readable which makes it one of the most effective languages for learning and general purpose programming. Part of Python’s charm are the many modules of code which can be easily inserted into a project. </p><p>Thonny is a powerful yet simple editor for Python and, with the release of version 4, we wanted to use it to create a project. In this how to we shall use the latest version of Thonny to create a web application that will pull Raspberry Pi stock data from <a href="https://rpilocator.com/"><u>rpilocator.com</u></a> and use it to populate a table in our app.</p><p>RSS is a great way to share a stream of information. It can be used to serve news headlines, such as the <a href="https://www.tomshardware.com/feeds/all"><u>Tom’s Hardware RSS feed</u></a> or <a href="https://xkcd.com/rss.xml"><u>even the latest xkcd comic strip</u></a>.</p><p>Nore that the RSS feed from rpilocator is not as up-to-date as the data on <a href="https://rpilocator.com/"><u>rpilocator.com</u></a>. Think of this project as more of a notification system, than a “sniping” tool.</p><h2 id="installing-thonny-4-0">Installing Thonny 4.0</h2><p>Thonny is the default Python IDE on the <a href="https://www.tomshardware.com/news/raspberry-pi"><u>Raspberry Pi</u></a>, but it is not limited to just that machine. Thonny is also available for Windows, Mac and Linux machines, and it can be used to write Python and MicroPython for devices such as the <a href="https://www.tomshardware.com/reviews/raspberry-pi-pico-w"><u>Raspberry Pi Pico W</u></a> and ESP32.</p><p>1. <strong>Open a </strong><a href="https://thonny.org/"><u><strong>browser to the Thonny homepage.</strong></u></a></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:691px;"><p class="vanilla-image-block" style="padding-top:80.46%;"><img id="" name="Thonny1.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/bAENEfgR4VcffgJKvdxe2g.jpg" mos="" align="middle" fullscreen="1" width="691" height="556" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/bAENEfgR4VcffgJKvdxe2g.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>2. <strong>Select the download for your OS</strong>. For Windows, there are a few options to choose from. The first choice is which version of Python, we would recommend the latest (3.10 at the time of writing). Next is your choice of installing Thonny to your machine, or using a portable version. We recommend installing Thonny to your machine.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:696px;"><p class="vanilla-image-block" style="padding-top:92.39%;"><img id="" name="Thonny2.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/cyPrANgdyeiDfBZZLNNJBg.jpg" mos="" align="middle" fullscreen="1" width="696" height="643" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/cyPrANgdyeiDfBZZLNNJBg.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>3. <strong>Click on the downloaded file to start the installation.</strong></p><p>4. <strong>Click on “More Info” to continue the installation.</strong> The new installation has a certificate that is relatively unknown and has yet to build up a reputation.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:520px;"><p class="vanilla-image-block" style="padding-top:93.85%;"><img id="" name="Thonny3.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/EtoAevUD9YsKjTXstFoaFg.jpg" mos="" align="middle" fullscreen="1" width="520" height="488" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/EtoAevUD9YsKjTXstFoaFg.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>5. <strong>Click on “Run anyway” to continue.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:519px;"><p class="vanilla-image-block" style="padding-top:94.22%;"><img id="" name="Thonny4.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/uKjFpGE3JaRTyakRjsmHKg.jpg" mos="" align="middle" fullscreen="1" width="519" height="489" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/uKjFpGE3JaRTyakRjsmHKg.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>6. <strong>Click next to continue.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:499px;"><p class="vanilla-image-block" style="padding-top:78.56%;"><img id="" name="Thonny5.JPG" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/fnRgQTQCzSb8TSrkPve3mg.jpg" mos="" align="middle" fullscreen="1" width="499" height="392" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/fnRgQTQCzSb8TSrkPve3mg.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>7. <strong>Accept the License agreement.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:493px;"><p class="vanilla-image-block" style="padding-top:78.30%;"><img id="" name="Thonny6.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/wZM9jWNAwK6wQFb7cb2fQg.jpg" mos="" align="middle" fullscreen="1" width="493" height="386" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/wZM9jWNAwK6wQFb7cb2fQg.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>8. <strong>Select the checkbox to create a desktop icon. </strong>This is an optional step, We chose not to do this as we prefer icons in the task bar.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:488px;"><p class="vanilla-image-block" style="padding-top:79.30%;"><img id="" name="Thonny7.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/7WGHhAf3Mg7Sh9sriENcVg.jpg" mos="" align="middle" fullscreen="1" width="488" height="387" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/7WGHhAf3Mg7Sh9sriENcVg.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>9. <strong>Click Install to start the install process.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:493px;"><p class="vanilla-image-block" style="padding-top:78.50%;"><img id="" name="Thonny8.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/afksgGXnaixfaoPwEH8aag.jpg" mos="" align="middle" fullscreen="1" width="493" height="387" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/afksgGXnaixfaoPwEH8aag.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>10. <strong>Click Finish </strong>to end the installation.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:494px;"><p class="vanilla-image-block" style="padding-top:77.94%;"><img id="" name="Thonny9.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/gfFAX5x8nEz5YZx4DvtYfg.jpg" mos="" align="middle" fullscreen="1" width="494" height="385" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/gfFAX5x8nEz5YZx4DvtYfg.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="creating-our-project-with-thonny-4-0">Creating Our Project with Thonny 4.0</h2><p>Thonny is beginner focused, but don’t be fooled, Thonny is a competent and fully featured editor for makers. Thonny has a multi-window layout that can be edited to suit your needs.</p><p>1. <strong>Files:</strong> This is a basic file manager that can be used to open files in a project. Raspberry Pi Pico W and other MicroPython devices will open an additional pane that we can use to copy files to and from the device.</p><p>2. <strong>Coding Area: </strong>Here is where we create the project for our code. We can have multiple tabs, for multiple files.</p><p>3. <strong>Python Shell: </strong>The Python Shell (REPL, Read, Eval, Print, Loop) is where we can see the output of our code, and also interact with it.</p><p>4. <strong>Assistant: </strong>If your code has a bug, or doesn’t follow a styling guideline, it will be flagged here.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1280px;"><p class="vanilla-image-block" style="padding-top:56.95%;"><img id="" name="Layout-Anno.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/56YXe9tDoYdTs5tnSeWDBh.jpg" mos="" align="middle" fullscreen="1" width="1280" height="729" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/56YXe9tDoYdTs5tnSeWDBh.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="installing-modules-with-thonny">Installing Modules with Thonny</h2><p>Python modules (sometimes also referred to as “libraries”) are pre-written segments of code that enable extra functionality. Popular examples include RPI.GPIO and GPIO Zero for the Raspberry Pi. Modules often abstract / simplify complex tasks. In our project we will use two modules. PyWebIO is a module to create HTML content using Python. It also creates a web server that we can use to quickly connect to our app. The second module is Feedparser, an RSS feed reader module that we shall use to read the rpilocator Raspberry Pi stock level feed.</p><p>1. <strong>Open Thonny and ensure that no projects are open.</strong></p><p>2. <strong>Click on Tools >> Manage Packages. </strong>Thonny has a built-in GUI for the Python 3 package manager “pip”.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:381px;"><p class="vanilla-image-block" style="padding-top:55.91%;"><img id="" name="Module1.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/zPEHzMFPGFj364Ajd5HX6h.jpg" mos="" align="middle" fullscreen="1" width="381" height="213" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/zPEHzMFPGFj364Ajd5HX6h.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>3. <strong>Search for pywebio.</strong>This is the module that we shall use to generate a web page using Python.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:639px;"><p class="vanilla-image-block" style="padding-top:71.52%;"><img id="" name="Module2.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/sWa2C4LUTAVzTYs9MLw5rg.jpg" mos="" align="middle" fullscreen="1" width="639" height="457" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/sWa2C4LUTAVzTYs9MLw5rg.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>4. <strong>Click Install to download and install the module.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:637px;"><p class="vanilla-image-block" style="padding-top:72.06%;"><img id="" name="Module3.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/vUgoiEwt8iTTaUGC59R3wg.jpg" mos="" align="middle" fullscreen="1" width="637" height="459" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/vUgoiEwt8iTTaUGC59R3wg.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>5. <strong>Repeat the previous steps, this time install feedparser.</strong> Feedparser is a Python module for RSS feeds.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:634px;"><p class="vanilla-image-block" style="padding-top:72.71%;"><img id="" name="Module6.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/GR5PZTyoJ4nw5QPDrak3Rh.jpg" mos="" align="middle" fullscreen="1" width="634" height="461" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/GR5PZTyoJ4nw5QPDrak3Rh.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>6. <strong>Click Close to quit the dialog.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:636px;"><p class="vanilla-image-block" style="padding-top:72.33%;"><img id="" name="Module4.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/Cd6u27jFxx4bZohshBg62h.jpg" mos="" align="middle" fullscreen="1" width="636" height="460" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/Cd6u27jFxx4bZohshBg62h.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="writing-the-project-code">Writing the Project Code</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:655px;"><p class="vanilla-image-block" style="padding-top:58.47%;"><img id="" name="final.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/uquRBpsfxqC3Z9YrfN6qmh.jpg" mos="" align="middle" fullscreen="1" width="655" height="383" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/uquRBpsfxqC3Z9YrfN6qmh.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>Our goal is to create a Python project that will use the data from rpilocator’s RSS feed to populate a table. We will grab the current five entries and display them in an HTML table, created using Python.</p><p>1. <strong>In a new blank document, import two modules from pywebio.</strong> The first contains the code to start a simple web server. The pywebio.output module is used to generate HTML elements such as tables and hyperlinks.</p><pre class="line-numbers language-python" language="python" ><code>from pywebio import start_serverfrom pywebio.output import *  </code></pre><p>2. <strong>Import the feedparser module.</strong></p><pre class="line-numbers language-python" language="python" ><code>import feedparser</code></pre><p>3. <strong>Create a function called main.</strong></p><pre class="line-numbers language-python" language="python" ><code>def main():</code></pre><p>4. <strong>Inside the function create an object, “stock” and use it to store the parsed output of the rpilocator RSS feed.</strong></p><pre class="line-numbers language-python" language="python" ><code>   stock = feedparser.parse('https://rpilocator.com/feed/')</code></pre><p>5. <strong>Create three empty lists, in_stock, in_stock_link and category. </strong>These will be used to store the data retrieved from the “stock” object containing the RSS data.</p><pre class="line-numbers language-python" language="python" ><code>   in_stock = []   in_stock_link = []   category = []</code></pre><p>6. <strong>Create a for loop that will iterate five times.</strong></p><pre class="line-numbers language-python" language="python" ><code>   for i in range(5):</code></pre><p>7. <strong>Use “append” to add the stock status, link and category (reseller name) to the appropriate list. </strong>The RSS data stored in “stock” is a mixture of lists and dictionaries. For the data in a list we can use its numerical index, which is the value of i in our for loop. This will count from 0 to 4 as the for loop iterates. The data stored in a dictionary requires us to know the key (‘entries’ for example). Using the key will return its value.</p><pre class="line-numbers language-python" language="python" ><code>       in_stock.append(stock['entries'][i]['title'])       in_stock_link.append(stock['entries'][i]['link'])       category.append(stock['entries'][i]['category'])</code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1187px;"><p class="vanilla-image-block" style="padding-top:40.86%;"><img id="" name="RSS.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/XEAeeTYsE9o5yDqr8KutVh.jpg" mos="" align="middle" fullscreen="1" width="1187" height="485" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/XEAeeTYsE9o5yDqr8KutVh.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="caption-text">An example of the RSS feed data viewed in Google Chrome </span><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>8. <strong>Outside of the for loop, create a pop-up notification using “toast”. </strong>The message can be a mixture of a strong, and even emojis.</p><pre class="line-numbers language-python" language="python" ><code>   toast('🍓I found Raspberry Pi in stock!🍓')</code></pre><p>9. <strong>Use “put_html” to write an HTML H1 heading element to the web page. </strong>We can use this function to write any HTML elements to the page, but do take note that the <a href="https://pywebio.readthedocs.io/en/latest/index.html"><u>PyWebIO module</u></a> has many different means to create specialist elements.</p><pre class="line-numbers language-python" language="python" ><code>   put_html("<h1>Raspberry Pi Stock</h1>")</code></pre><p>10. <strong>Create a list, “table” and use it to store two columns of data, taken from our in_stock, in_stock_link and category lists. </strong>The first row are the column headings Details and URL. In stock will print a brief description of what is in stock. Using “put_link” we create an HTML hyperlink, with the link text being the name of the reseller, stored in the category list, and the address stored in in_stock_link.</p><pre class="line-numbers language-python" language="python" ><code>   table = [['Details','URL'],       [in_stock[0], put_link(category[0],url=in_stock_link[0])],       [in_stock[1], put_link(category[1],url=in_stock_link[1])],       [in_stock[2], put_link(category[2],url=in_stock_link[2])],       [in_stock[3], put_link(category[3],url=in_stock_link[3])],       [in_stock[4], put_link(category[4],url=in_stock_link[4])],       ]</code></pre><p>11. <strong>Use PyWebIO’s “put_table” function to create an HTML table from our table object.</strong></p><pre class="line-numbers language-python" language="python" ><code>   put_table(table)</code></pre><p>12. <strong>Use “put_link” to create a hyperlink under the table,</strong> in this case it takes us to the source of the Raspberry Pi stock levels, rpilocator.</p><pre class="line-numbers language-python" language="python" ><code>   put_link('Data provided by RPiLocator',url='https://rpilocator.com')</code></pre><p>13. <strong>Outside of the function, call PyWebIO’s “start_server” function, and pass it three arguments.</strong> The arguments are our “main” function which will create the table from the RSS data. The port is set to 8080, and debugging is enabled via the Python shell and on our web page.</p><pre class="line-numbers language-python" language="python" ><code>start_server(main, port=8080, debug=True)</code></pre><p>14. <strong>Save the code as RSS-Feed-Reader.py and click Run to start.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:99px;"><p class="vanilla-image-block" style="padding-top:71.72%;"><img id="" name="run.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/cKkhNeCMgpW86ja6UvnXah.jpg" mos="" align="middle" fullscreen="1" width="99" height="71" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/cKkhNeCMgpW86ja6UvnXah.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>15. <strong>Click on the link in the Python shell to open the web page in your default browser.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:680px;"><p class="vanilla-image-block" style="padding-top:28.68%;"><img id="" name="shell.jpg" alt="Create Web Apps with Python, HTML and Thonny" src="https://cdn.mos.cms.futurecdn.net/Uztoh7DQq3z47Z4HTrgQfh.jpg" mos="" align="middle" fullscreen="1" width="680" height="195" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/Uztoh7DQq3z47Z4HTrgQfh.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="complete-code-listing-5">Complete Code Listing</h2><pre class="line-numbers language-python" language="python" ><code>from pywebio import start_serverfrom pywebio.output import *    import feedparserdef main():   stock = feedparser.parse('https://rpilocator.com/feed/')   in_stock = []   in_stock_link = []   category = []   for i in range(5):       in_stock.append(stock['entries'][i]['title'])       in_stock_link.append(stock['entries'][i]['link'])       category.append(stock['entries'][i]['category'])   toast('🍓I found Raspberry Pi in stock!🍓')   put_html("<h1>Raspberry Pi Stock</h1>")   table = [['Details','URL'],       [in_stock[0], put_link(category[0],url=in_stock_link[0])],       [in_stock[1], put_link(category[1],url=in_stock_link[1])],       [in_stock[2], put_link(category[2],url=in_stock_link[2])],       [in_stock[3], put_link(category[3],url=in_stock_link[3])],       [in_stock[4], put_link(category[4],url=in_stock_link[4])],       ]   put_table(table)   put_link('Data provided by RPiLocator',url='https://rpilocator.com')start_server(main, port=8080, debug=True)</code></pre><h2 id="python-how-tos-7">Python How Tos</h2><ul><li><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11">How To Install Python on Windows 10 and 11</a></li><li><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">How to use For Loops in Python</a></li><li><a href="https://www.tomshardware.com/how-to/enumerate-in-python">How to Enumerate in Python</a></li><li><a href="https://www.tomshardware.com/how-to/create-python-executable-applications">How to Create Executable Applications in Python</a></li><li><a href="https://www.tomshardware.com/how-to/python-remove-image-backgrounds">How To Remove Backgrounds From Images With Python</a></li><li><a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny">How to Create Web Apps with Python, HTML and Thonny</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-camera-module-3-python-picamera-2">How To Use Raspberry Pi Camera Module 3 with Python Code</a></li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How to Make CircuitPython Projects on a Chromebook with Raspberry Pi Pico ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/create-circuitpython-projects-on-chromebook-raspberry-pi-pico</link>
                                                                            <description>
                            <![CDATA[ Learning to code with the Raspberry Pi Pico is now even easier thanks to CircuitPython and low cost Chrome devices. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">4TFE8sjnY2xSJnkuAfmrCJ</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/JYTzZUnrXzZmsAemoQmQa9-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sun, 29 May 2022 18:40:53 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:27 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/JYTzZUnrXzZmsAemoQmQa9-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[CircuitPython Projects on a Chromebook]]></media:description>                                                            <media:text><![CDATA[CircuitPython Projects on a Chromebook]]></media:text>
                                <media:title type="plain"><![CDATA[CircuitPython Projects on a Chromebook]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/JYTzZUnrXzZmsAemoQmQa9-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>There is no denying that the Raspberry Pi Pico made a big impact back in 2021. The $4 microcontroller was quickly adopted by many of the maker communities and groups and one of those was CircuitPython. CircuitPython, a fork of MicroPython which is a version of Python 3 for microcontrollers, is backed by Adafruit who are one of the partners that launched its own RP2040 range of boards. Since its creation back in 2018, CircuitPython has seen a massive investment from the community, with many projects and libraries being ported to the language.</p><p>CircuitPython is the best means to introduce Python on microcontrollers, because it’s easy to use with devices appearing in the host OS as USB flash drives. We write our code into the <em>code.py</em> file and we can enable external sensors, screens and inputs via a dazzling array of libraries. </p><p>So how can we work with the Raspberry Pi Pico and CircuitPython? Typically we connect up our Pico to a PC and start writing code, but we can also build projects with a Chromebook or other Chrome OS device. With an easy-to-use programming language, cheap microcontroller and an easy-to-use OS we have the perfect platform for creativity, no matter our age or ability.</p><p>In this how to we will show you how to set up your Raspberry Pi Pico for CircuitPython, install the software to write code and communicate with your Pico, and finally we shall build a temperature sensor project.</p><h2 id="for-this-project-you-will-need">For this project you will need</h2><ul><li><a href="https://www.amazon.com/HP-Chromebook-G8-Education-Bluetooth/dp/B09WNJVGBZ">Chromebook</a> or other Chrome OS device</li><li><a href="https://www.amazon.com/Raspberry-Pre-Soldered-Microcontroller-Development-Dual-Core/dp/B08X7HN2VG">Raspberry Pi Pico</a></li><li><a href="https://www.amazon.com/Half-Size-breadboard-Adafruit-64/dp/B00HPLNVHQ">Half size breadboard</a></li><li><a href="https://www.amazon.com/Tenmiro-Led-Lights/dp/B0932M1666">LED</a></li><li><a href="https://www.amazon.com/EDGELEC-Resistor-Tolerance-Multiple-Resistance/dp/B07QH5PFG3">330 Ohm resistor</a></li><li><a href="https://www.amazon.com/Gowoops-Temperature-Humidity-Measurement-Raspberry/dp/B073F472JL">DHT22 temperature sensor</a></li><li><a href="https://www.amazon.com/EDGELEC-Breadboard-Multicolored-1pin-1pin-Connector/dp/B07GD1ZCHQ">5x Male to male jumper wires</a></li><li><a href="https://www.amazon.com/Projects-100EP51410K0-10k-Resistors-Pack/dp/B0185FGYQA">10K Ohm Resistor (Brown-Black-Orange-Gold)</a></li></ul><h2 id="install-circuitpython-onto-the-raspberry-pi-pico">Install CircuitPython onto the Raspberry Pi Pico</h2><p>The Raspberry Pi Pico can run many <a href="https://twitter.com/ChrisRemboldt/status/1529823398548807684"><u>different languages</u></a>, even a version of a <a href="https://www.tomshardware.com/how-to/raspberry-pi-pico-basic-controlled-neopixels"><u>50+ year old language</u></a>. Our focus is on CircuitPython, and installing CircuitPython on a Pico is super easy to do.</p><p>1. Download the latest version of  <a href="https://circuitpython.org/board/raspberry_pi_pico/"><u>CircuitPython for the Raspberry Pi Pico</u></a>. At the time of writing the latest version was 7.3.0.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1436px;"><p class="vanilla-image-block" style="padding-top:42.90%;"><img id="" name="image1.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/Da7RURzSzFdqjKo7suj8LR.png" mos="" align="middle" fullscreen="1" width="1436" height="616" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/Da7RURzSzFdqjKo7suj8LR.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>2. <strong>Press and hold the BOOTSEL button on the Raspberry Pi Pico, then connect your Pico to the Chromebook via a USB cable.</strong></p><p>3. <strong>Copy the downloaded UF2 file from Downloads to the RPI-RP2 drive in files. </strong>The process will take under a minute and when complete a new drive CIRCUITPY will appear in the Files browser.</p><h2 id="install-the-tools-to-use-circuitpython-on-chrome-os">Install the Tools to use CircuitPython on Chrome OS</h2><p>Ideally we would have just one application which could do everything, but for now, alas we need to install two. The first is a text editor, Caret, which we can use to write CircuitPython code directly to the CIRCUITPY drive. The second is Beagle Term, a serial terminal emulator for Chrome OS.</p><p>1. <a href="https://chrome.google.com/webstore/detail/caret/fljalecfjciodhpcledpamjachpmelml/related?hl=en"><u>Install the Caret Text Editor</u></a> via the Chrome Web Store.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1920px;"><p class="vanilla-image-block" style="padding-top:62.50%;"><img id="" name="caret install.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/FtCtqBKHrSxX3FZyLGHkf9.png" mos="" align="middle" fullscreen="1" width="1920" height="1200" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/FtCtqBKHrSxX3FZyLGHkf9.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>2. <a href="https://chrome.google.com/webstore/detail/beagle-term/gkdofhllgfohlddimiiildbgoggdpoea?hl=en"><u>Install Beagle Term </u></a>via the Chrome Web Store. </p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1920px;"><p class="vanilla-image-block" style="padding-top:62.45%;"><img id="" name="beagle term install.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/xwCT7ycxAnqJAV29ngfCr9.png" mos="" align="middle" fullscreen="1" width="1920" height="1199" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/xwCT7ycxAnqJAV29ngfCr9.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="writing-our-test-circuitpython-code-on-chromebook">Writing our Test CircuitPython Code on Chromebook</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1138px;"><p class="vanilla-image-block" style="padding-top:75.04%;"><img id="" name="hello world.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/f6h6gCfYbq5nMP57EuazrB.png" mos="" align="middle" fullscreen="1" width="1138" height="854" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/f6h6gCfYbq5nMP57EuazrB.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>Before we start any electronics, let&apos;s check that we can control and communicate with the Raspberry Pi Pico. Our demo code is a simple Hello World that prints to the Python shell every second.</p><p>1. <strong>Open the Caret text editor</strong> using the Search key (the spyglass where caps lock normally resides) and type Caret. Press Enter to open. </p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1920px;"><p class="vanilla-image-block" style="padding-top:37.24%;"><img id="" name="caret.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/V2CeidjfCDi33p2erwPX5C.png" mos="" align="middle" fullscreen="1" width="1920" height="715" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/V2CeidjfCDi33p2erwPX5C.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>2.  <strong>Click on File >> Open and select code.py </strong>found on your CIRCUITPY drive. This drive is your Raspberry Pi Pico running CircuitPython.</p><p>3. <strong>Delete any code in the file.</strong></p><p>4.<strong> Import the time module. </strong>We will use this to control the speed at which our code loops.</p><pre class="line-numbers language-bash" language="bash" ><code>import time</code></pre><p>5. <strong>Create a while True loop </strong>to continually run the code within.</p><pre class="line-numbers language-bash" language="bash" ><code>while True:</code></pre><p>6. <strong>Use a print function to print “Hello World”. </strong>Note that the code is indented by one TAB keypress or four spaces. Do not mix tabs and spaces as Python will throw an error. This is a classic example of testing code. It is a simple means that we can use to confirm that we have control of and communication with a device.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>   print(“Hello World”)</code></pre><p>7. <strong>Add a one second pause</strong></p><p>This gives us a second to read the Hello World message.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>   time.sleep(1)</code></pre><p>8. <strong>Save your code to code.py.</strong> CircuitPython will automatically run the code each time we save.</p><h2 id="test-code-listing">Test Code Listing</h2><pre class="line-numbers language-bash" language="bash" ><code>import timewhile True:    print(“Hello World”)    time.sleep(1)</code></pre><h2 id="using-the-beagle-term-serial-emulator">Using the Beagle Term Serial Emulator</h2><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1920px;"><p class="vanilla-image-block" style="padding-top:62.50%;"><img id="" name="hello world running.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/XPus8T2KQLdq6TGmj4bYPC.png" mos="" align="middle" fullscreen="1" width="1920" height="1200" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/XPus8T2KQLdq6TGmj4bYPC.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>To see the output of our code we need to run the Beagle Term serial terminal emulator. This app will connect to the Python console, running over a USB to serial connection. CircuitPython has a REPL (Read, Eval, Print, Loop) Python console which can be used to interactively work with the board and it can output information directly to the console.</p><p>1. <strong>Open the Beagle Term application </strong>using the Search key (the spyglass where caps lock normally resides) and type Caret. Press Enter to open.</p><p>2. <strong>Set your Port to your Raspberry Pi Pico. </strong>This is a little bit of a trial and error approach as we do not know the name of the port. In our tests we saw /dev/ttyACM1 for our Raspberry Pi Pico.</p><p>3. <strong>Set the Bitrate to 9600.</strong> This is the speed at which our Chrome OS device and Raspberry Pi Pico will communicate. </p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1457px;"><p class="vanilla-image-block" style="padding-top:75.02%;"><img id="" name="Beagle Term.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/gzXrefGSxVNSrjRSJwUqbB.png" mos="" align="middle" fullscreen="1" width="1457" height="1093" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/gzXrefGSxVNSrjRSJwUqbB.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>4. <strong>Set the Data Bit to 8 bit, Parity to none, Stop Bit to 1 bit, </strong>and <strong>finally set Flow Control to none.</strong></p><p>5.<strong> Click Connect </strong>to start the serial connection to your Raspberry Pi Pico. Hello World should be scrolling down the screen. If not, press CTRL+C to stop the code running, and then press CTRL+D to restart the code. </p><h2 id="building-a-temperature-sensor-project">Building a Temperature Sensor Project</h2><p>The DHT22 has four pins, but we shall only need to use three of them. The sensor is relatively easy to work with. It needs 3V to power it, and the data output pin is pulled high using a 10K Ohm resistor. By pulling the pin high we ensure that the data from the sensor is read, as the pin is always “on”.</p><p>1. <strong>Insert your Raspberry Pi Pico into the breadboard</strong> so that the microUSB port is on the left side of the board. </p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:876px;"><p class="vanilla-image-block" style="padding-top:72.26%;"><img id="" name="Temp Sensor_bbjust pico.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/sznXQLHt22oSPMM3UremKA.png" mos="" align="middle" fullscreen="1" width="876" height="633" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/sznXQLHt22oSPMM3UremKA.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>2. <strong>Run a jumper wire from the 3V3 out (red wire) to the + rail of the breadboard.</strong> This provides a connection to the 3.3V pin to the entire + rail. <strong>Run another wire from the GND pin to the - rail.</strong> </p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1008px;"><p class="vanilla-image-block" style="padding-top:62.80%;"><img id="" name="Temp Sensor_bb no dht22.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/YLhENR5WdaqfdXE7AmBTPA.png" mos="" align="middle" fullscreen="1" width="1008" height="633" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/YLhENR5WdaqfdXE7AmBTPA.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>3. <strong>Insert the DHT22 into the breadboard.</strong> </p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1008px;"><p class="vanilla-image-block" style="padding-top:62.80%;"><img id="" name="Temp Sensor_bb dht22 no power.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/FDcYhNwLKbxx62VfFYJzSA.png" mos="" align="middle" fullscreen="1" width="1008" height="633" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/FDcYhNwLKbxx62VfFYJzSA.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>4. <strong>Connect 3.3V (red wire) and GND (black wire) to pins 1 and 4 of the DHT22. </strong>The pin numbers go from left to right, as we face the plastic “frame” of the sensor. </p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1008px;"><p class="vanilla-image-block" style="padding-top:62.80%;"><img id="" name="Temp Sensor_bb no r.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/85tVPSTVw5pGwBmu2owsWA.png" mos="" align="middle" fullscreen="1" width="1008" height="633" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/85tVPSTVw5pGwBmu2owsWA.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>5. <strong>Connect the 3.3V rail to pin 2 of the DHT22 using a 10K Ohm resistor. </strong>This is our pull-up resistor for the data pin.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1008px;"><p class="vanilla-image-block" style="padding-top:62.80%;"><img id="" name="Temp Sensor_bb no data.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/qYMJp5jePdMvE5Ejw6UuaA.png" mos="" align="middle" fullscreen="1" width="1008" height="633" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/qYMJp5jePdMvE5Ejw6UuaA.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>6. <strong>Connect the data pin (pin 2) of the DHT22 to GP15 of the Raspberry Pi Pico. </strong>Your breadboard should look like this.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1008px;"><p class="vanilla-image-block" style="padding-top:62.80%;"><img id="" name="Temp Sensor_bb.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/cjq32PYHYufdY2uLZui69B.png" mos="" align="middle" fullscreen="1" width="1008" height="633" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/cjq32PYHYufdY2uLZui69B.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="coding-the-project">Coding the Project</h2><p>1. <strong>Download the CircuitPython Libraries bundle </strong>for your version of CircuitPython.</p><p>2. <strong>Go to your Downloads folder. Right click and extract the ZIP file</strong>.</p><p>3. <strong>Open the adafruit-circuitpython-bundle folder </strong>and <strong>navigate to the</strong><em><strong> lib</strong></em><strong> sub-folder.</strong></p><p><br></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1282px;"><p class="vanilla-image-block" style="padding-top:37.21%;"><img id="" name="dht.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/8zHWzy4V4vyWiTEnvxMrCA.png" mos="" align="middle" fullscreen="1" width="1282" height="477" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/8zHWzy4V4vyWiTEnvxMrCA.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>4. <strong>Copy adfafruit_dht.mpy to the /lib/ folder of your CIRCUITPY drive. </strong>This library enables our Raspberry Pi Pico to work with the DHT11 and DHT22 sensors.</p><p><br></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1282px;"><p class="vanilla-image-block" style="padding-top:27.77%;"><img id="" name="dht cpy.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/bbTEgJqgvxyt7YPEVYi89A.png" mos="" align="middle" fullscreen="1" width="1282" height="356" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/bbTEgJqgvxyt7YPEVYi89A.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>5. <strong>Open code.py on your Raspberry Pi Pico</strong> using the Caret text editor.<strong> Delete the test code from the file.</strong></p><p>6.<strong> Import three modules to enable our code to access the GPIO (board), use the temperature sensor(adafruit_dht) and to control the speed of the loop (time).</strong></p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>import boardimport adafruit_dhtimport time</code></pre><p>7. <strong>Create an object, </strong><em><strong>dht</strong></em><strong> to connect the code to the DHT22 sensor connected to GP15 on the Raspberry Pi Pico.</strong></p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>dht = adafruit_dht.DHT22(board.GP15)</code></pre><p>8. <strong>Create a loop to run the code.</strong></p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>while True:</code></pre><p>9. <strong>Store the current temperature in a variable called </strong><em><strong>temp.</strong></em> The temperature is saved in Celsius.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>   temp = dht.temperature</code></pre><p>10. <strong>Create an object, </strong><em><strong>text</strong></em><strong> and in there store a string which will print “The temperature is    Celsius”. </strong>You’ll notice {:>8}, this is a string format which will include eight spaces in the center of the sentence. This gives us a clear space to place the temperature data.</p><pre class="line-numbers language-bash" language="bash" ><code>   text = "The temperature is {:>8} Celsius."</code></pre><p>11. <strong>Use the print function along with the text forma</strong>t to insert the temperature data into the gap.</p><p><br></p><pre class="line-numbers language-bash" language="bash" ><code>   print(text.format(temp))</code></pre><p>12. <strong>Finally add a one second pause. </strong>This enables the loop to slowly repeat.</p><pre class="line-numbers language-bash" language="bash" ><code>   time.sleep(1)</code></pre><p>13. <strong>Save the project to code.py </strong>on your CIRCUITPY drive.</p><p>14. <strong>Open Beagle Term </strong>and <strong>connect to your Raspberry Pi Pico. </strong>You should see the temperature data scroll across the screen. If not, press CTRL + C, then CTRL+D to restart the code.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1920px;"><p class="vanilla-image-block" style="padding-top:62.45%;"><img id="" name="Running Code.png" alt="CircuitPython Projects on a Chromebook" src="https://cdn.mos.cms.futurecdn.net/TM2HCqdknsKAovrKBvLpHB.png" mos="" align="middle" fullscreen="1" width="1920" height="1199" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/TM2HCqdknsKAovrKBvLpHB.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="complete-code-listing-6">Complete Code Listing</h2><pre class="line-numbers language-bash" language="bash" ><code>import boardimport adafruit_dhtimport timedht = adafruit_dht.DHT22(board.GP15)while True:    temp = dht.temperature    text = "The temperature is {:>8} Celsius."    print(text.format(temp))    time.sleep(1)</code></pre><h2 id="related-tutorials">Related Tutorials</h2><ul><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-pico-basic-controlled-neopixels">How To Control Neopixels with BASIC on Raspberry Pi Pico</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-pico-reaction-game">How To Make a Raspberry Pi Pico Reaction Game With PicoZero</a></li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How to Create Executable Applications in Python ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/create-python-executable-applications</link>
                                                                            <description>
                            <![CDATA[ Building your own executable Python applications is now just a matter of a few clicks and a little patience. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">zJqCZc5bQEruqa843rmyuc</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/5DyJosrc2Sbw66rV7cqJri-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sun, 22 May 2022 13:00:47 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:38 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/5DyJosrc2Sbw66rV7cqJri-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Executable Applications in Python]]></media:description>                                                            <media:text><![CDATA[Executable Applications in Python]]></media:text>
                                <media:title type="plain"><![CDATA[Executable Applications in Python]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/5DyJosrc2Sbw66rV7cqJri-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Used by NASA, ILM, Disney and hardware hackers, Python is a versatile programming language and an ideal choice for beginners. Whether you’re just  creating a “Hello World” or a full-blown application, Python needs an interpreter and a bunch of supporting libraries to work. What if we could make a GUI application, all bundled inside of a single executable file?</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:629px;"><p class="vanilla-image-block" style="padding-top:105.09%;"><img id="" name="hero.png" alt="Executable Applications in Python" src="https://cdn.mos.cms.futurecdn.net/RUuT6sZ5qX36KA4U4Kcnyi.png" mos="" align="middle" fullscreen="1" width="629" height="661" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/RUuT6sZ5qX36KA4U4Kcnyi.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>With <a href="https://github.com/brentvollebregt/auto-py-to-exe"><u>auto-py-to-exe </u></a>,a project by Brent Vollebregt we can easily create our own executable Python applications. Underneath the GUI is PyInstaller, a terminal based application to create Python executables for Windows, Mac and Linux. Veteran Pythonistas will be familiar with how PyInstaller works, but with auto-py-to-exe any user can easily create a single Python executable for their system.</p><p>In this how to, we are going to create a GUI Python application using EasyGUI, and then use auto-py-to-exe to create a standalone application that will run on any Microsoft Windows system, including systems without Python installed. Linux and Mac users will need to use the underlying PyInstaller command line tool. A simple app can be created using a single line instruction. By adding more arguments we can include icons, packaged libraries etc.</p><p>For example here is the code to create a onefile application using <em>app.py</em> as the project code.</p><pre class="line-numbers language-python" language="python" ><code>pyinstaller --onefile app.py</code></pre><p>Where auto-py-to-exe differs is that we have an easier means to create an application using a GUI tool.</p><h2 id="how-to-install-auto-py-to-exe">How to Install auto-py-to-exe</h2><p>1. <strong>Open a Command Prompt by searching for CMD.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:822px;"><p class="vanilla-image-block" style="padding-top:82.73%;"><img id="" name="CMD.png" alt="Executable Applications in Python" src="https://cdn.mos.cms.futurecdn.net/oFbvyN5hVkg3JmToA763ij.png" mos="" align="middle" fullscreen="1" width="822" height="680" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/oFbvyN5hVkg3JmToA763ij.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>2. <strong>Use the Python package manager pip to install auto-py-to-exe.</strong></p><pre class="line-numbers language-python" language="python" ><code>pip install auto-py-to-exe</code></pre><h2 id="create-a-test-script">Create a Test Script</h2><p>Our example application is a simple GUI to launch one of three applications. We use the EasyGUI Python library as it abstracts the complexities of creating a GUI application. All we need to provide is the logic that drives the application.</p><p>1. <strong>Open a PowerShell</strong> by right clicking on the Windows icon and selecting PowerShell.</p><p>2. <strong>Install EasyGUI using pip.</strong></p><pre class="line-numbers language-python" language="python" ><code>pip install easygui</code></pre><p>3. <strong>Open a text editor to write the Python test script.</strong> We chose to use <a href="https://notepad-plus-plus.org/"><u>Notepad++</u></a>, but you are free to use your favorite editor.</p><p>4. <strong>Import two Python modules, easygui and os.</strong> Easygui creates the GUI application and OS enables the code to interact with the operating system.</p><pre class="line-numbers language-python" language="python" ><code>import easyguiimport os</code></pre><p>5. <strong>Create two variables, one for a message (msg) to the user while the other becomes the application title.</strong></p><pre class="line-numbers language-python" language="python" ><code>msg = "Load application..."title="Tom's Hardware Application Starter"</code></pre><p>6. <strong>Create a list, </strong><em><strong>choices</strong></em><strong>, </strong>and <strong>inside store three values which are the application names. </strong>Lists are Python’s arrays. Objects that can store multiple items. Each item has a numerical index, starting from zero.</p><pre class="line-numbers language-python" language="python" ><code>choices = ["Google Chrome","Slack","PuTTY"]</code></pre><p>7. <strong>Create an object, </strong><em><strong>reply</strong></em><strong>, to ask the user a question. </strong>In this case we use a button box from EasyGUI, each button is an option from the <em>choices </em>list. The chosen application is stored in the <em>reply </em>object.</p><pre class="line-numbers language-python" language="python" ><code>reply = easygui.buttonbox(msg, title,  choices=choices)</code></pre><p>8. <strong>Use a conditional statement to read the value stored in </strong><em><strong>reply</strong></em><strong> and compare it to three conditions. </strong>The first checks <em>reply</em> to see if it contains “Google Chrome” if so it will open the Google Chrome browser. The <em>startfile</em> function requires the use of a full file path to the application. We need to use double \\ in the path as Python uses \ to insert illegal characters into a string.</p><pre class="line-numbers language-python" language="python" ><code>if reply == "Google Chrome":   os.startfile("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe")</code></pre><p>9. <strong>Use another conditional statement to check </strong><em><strong>reply</strong></em><strong> for slack.</strong></p><pre class="line-numbers language-python" language="python" ><code>elif reply == "Slack":   os.startfile("C:\\Users\\lespo\\AppData\\Local\\slack\\slack.exe")</code></pre><p>10. <strong>Add another conditional statement to load PuTTY. </strong>Note that for PuTTY we use the <em>os.system</em> function as PuTTY is a registered app with the Windows path.</p><pre class="line-numbers language-python" language="python" ><code>elif reply == "PuTTY":   os.system("putty")</code></pre><p>11. <strong>Close the conditional test with an </strong><em><strong>else</strong></em><strong> condition to catch any other input.</strong></p><pre class="line-numbers language-python" language="python" ><code>else:   print("Done")</code></pre><p>12. <strong>Save the file as </strong><em><strong>app.py</strong></em><strong> to the Desktop.</strong> If you are using an image in the application ensure that the image is also on the Desktop.</p><h2 id="complete-example-code-listing">Complete Example Code Listing</h2><pre class="line-numbers language-python" language="python" ><code>import easyguiimport osmsg = "Load application..."title="Tom's Hardware Application Starter"choices = ["Google Chrome","Slack","PuTTY"]reply = easygui.buttonbox(msg, title , choices=choices)if reply == "Google Chrome":    os.startfile("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe")elif reply == "Slack":    os.startfile("C:\\Users\\lespo\\AppData\\Local\\slack\\slack.exe")elif reply == "PuTTY":    os.system("putty")else:    print("Done")</code></pre><h2 id="using-auto-py-to-exe">Using auto-py-to-exe</h2><p> 1. <strong>Open a Command Prompt </strong>by searching for CMD.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:822px;"><p class="vanilla-image-block" style="padding-top:82.73%;"><img id="" name="CMD.png" alt="Executable Applications in Python" src="https://cdn.mos.cms.futurecdn.net/oFbvyN5hVkg3JmToA763ij.png" mos="" align="middle" fullscreen="1" width="822" height="680" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/oFbvyN5hVkg3JmToA763ij.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>2. <strong>Run auto-py-to-exe from the prompt.</strong></p><pre class="line-numbers language-python" language="python" ><code>auto-py-to-exe</code></pre><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:395px;"><p class="vanilla-image-block" style="padding-top:33.92%;"><img id="" name="auto-py-to-exe-cmd.png" alt="Executable Applications in Python" src="https://cdn.mos.cms.futurecdn.net/pqG38oDkNQ4s5p6VMRh5ej.png" mos="" align="middle" fullscreen="1" width="395" height="134" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/pqG38oDkNQ4s5p6VMRh5ej.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>3. <strong>Click on Browse </strong>and <strong>navigate to our example Python file.</strong></p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:633px;"><p class="vanilla-image-block" style="padding-top:103.95%;"><img id="" name="browser.png" alt="Executable Applications in Python" src="https://cdn.mos.cms.futurecdn.net/ny2DN8BvaqGz2e2FQFi4bj.png" mos="" align="middle" fullscreen="1" width="633" height="658" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/ny2DN8BvaqGz2e2FQFi4bj.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>4. <strong>Set the application to use one file.</strong> This will condense the application and the supporting Python libraries into a single executable file.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:627px;"><p class="vanilla-image-block" style="padding-top:45.61%;"><img id="" name="onefile.png" alt="Executable Applications in Python" src="https://cdn.mos.cms.futurecdn.net/yE2MUJKwDML9FgZVKbNiTj.png" mos="" align="middle" fullscreen="1" width="627" height="286" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/yE2MUJKwDML9FgZVKbNiTj.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>5. <strong>Set the application to be Console Based.</strong> By doing this we will see any errors outputted to the Command Prompt. Once we are confident that the app works correctly, we can set this to Window Based.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:447px;"><p class="vanilla-image-block" style="padding-top:27.29%;"><img id="" name="console.png" alt="Executable Applications in Python" src="https://cdn.mos.cms.futurecdn.net/jAAZmgnX9vpYW8w2MKZ2Qj.png" mos="" align="middle" fullscreen="1" width="447" height="122" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/jAAZmgnX9vpYW8w2MKZ2Qj.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>6. <strong>Click on the Icon drop down </strong>and <strong>select an icon for your application. </strong>This is an optional step but it adds an extra level of quality to your application. Icons must be .ico files and we used a 64x64 pixel image as an icon.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:613px;"><p class="vanilla-image-block" style="padding-top:13.70%;"><img id="" name="icon.png" alt="Executable Applications in Python" src="https://cdn.mos.cms.futurecdn.net/adgcNxq6pc9AoXvgLmuyKj.png" mos="" align="middle" fullscreen="1" width="613" height="84" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/adgcNxq6pc9AoXvgLmuyKj.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>7. <strong>Click on Advanced </strong>and, under <em>–name,</em> <strong>enter the name of your application.</strong> We chose App Launcher.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:603px;"><p class="vanilla-image-block" style="padding-top:38.64%;"><img id="" name="advanced.png" alt="Executable Applications in Python" src="https://cdn.mos.cms.futurecdn.net/XFdAAcdDZVDUDguJdQRv7j.png" mos="" align="middle" fullscreen="1" width="603" height="233" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/XFdAAcdDZVDUDguJdQRv7j.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>8. <strong>Scroll down </strong>and <strong>click on CONVERT .PY to .EXE</strong> to start the process. This will take a couple of minutes.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:621px;"><p class="vanilla-image-block" style="padding-top:20.93%;"><img id="" name="convert.png" alt="Executable Applications in Python" src="https://cdn.mos.cms.futurecdn.net/VTwE5v3qdVa2XNhMGwHXFj.png" mos="" align="middle" fullscreen="1" width="621" height="130" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/VTwE5v3qdVa2XNhMGwHXFj.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>9. <strong>Click on </strong><em><strong>Open Output Folder</strong></em> to open the folder containing the application.</p><figure class="van-image-figure  inline-layout" data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:625px;"><p class="vanilla-image-block" style="padding-top:105.92%;"><img id="" name="app created.png" alt="Executable Applications in Python" src="https://cdn.mos.cms.futurecdn.net/m7dDYVyxDgaZes3UQNzWBj.png" mos="" align="middle" fullscreen="1" width="625" height="662" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/m7dDYVyxDgaZes3UQNzWBj.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=" inline-layout"><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>10. <strong>Double click on the icon </strong>to run your application.</p><h2 id="python-how-tos-8">Python How Tos</h2><ul><li><a href="https://www.tomshardware.com/how-to/install-python-on-windows-10-and-11">How To Install Python on Windows 10 and 11</a></li><li><a href="https://www.tomshardware.com/how-to/use-for-loops-in-python">How to use For Loops in Python</a></li><li><a href="https://www.tomshardware.com/how-to/enumerate-in-python">How to Enumerate in Python</a></li><li><a href="https://www.tomshardware.com/how-to/create-python-executable-applications">How to Create Executable Applications in Python</a></li><li><a href="https://www.tomshardware.com/how-to/python-remove-image-backgrounds">How To Remove Backgrounds From Images With Python</a></li><li><a href="https://www.tomshardware.com/how-to/build-web-apps-with-python-html-thonny">How to Create Web Apps with Python, HTML and Thonny</a></li><li><a href="https://www.tomshardware.com/how-to/raspberry-pi-camera-module-3-python-picamera-2">How To Use Raspberry Pi Camera Module 3 with Python Code</a></li></ul>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ CircuitPython Officially Supported by Over 300 Microcontrollers ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/circuitpython-supported-by-over-300-boards</link>
                                                                            <description>
                            <![CDATA[ Adafruit confirms over 300 boards officially support CircuitPython in a new blog update with hundreds of libraries available to tinker with. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">VtgYihdZZhZhNmL2U5bJYZ</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/ffDPaLS72aK9bh23KyJtfT-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Wed, 18 May 2022 19:01:41 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:35 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Ash Hill ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/p9HsnLCwBpTQYCBBhYXgrS.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Ash is a self-employed tech writer and illustrator with a serious affinity for the Raspberry Pi, 3D printing, retro gaming and finding the best tech deals and coupons. She has over a decade of IT experience and has been featured in the official Raspberry Pi magazine MagPi.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/ffDPaLS72aK9bh23KyJtfT-1280-80.jpg">
                                                            <media:credit><![CDATA[Adafruit]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Raspberry Pi]]></media:description>                                                            <media:text><![CDATA[Raspberry Pi]]></media:text>
                                <media:title type="plain"><![CDATA[Raspberry Pi]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/ffDPaLS72aK9bh23KyJtfT-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>The Adafruit blog has published an <a href="https://blog.adafruit.com/2022/05/17/there-are-now-over-300-circuitpython-compatible-microcontroller-boards-circuitpython-python-adafruit"><u>announcement</u></a> confirming over 300 boards now officially support CircuitPython. These microcontrollers can be used for tons of cool projects and CircuitPython adds a new level of accessibility that makes programming modules, including the <a href="https://www.tomshardware.com/news/raspberry-pi"><u>Raspberry Pi</u></a>, in many ways much easier.</p><p>CircuitPython is a barebones programming language that simplifies coding by eliminating unecessary bloat and focusing only on what’s needed. To get a better idea of what it’s capable of, check out our guides on how to use <a href="https://www.tomshardware.com/how-to/use-circuitpython-raspberry-pi"><u>CircuitPython on the Raspberry Pi</u></a> and on the <a href="https://www.tomshardware.com/how-to/gpio-pins-circuitpython-on-a-pc"><u>Raspbery Pi Pico</u></a> RP2040 board.</p><p>According to Adafruit, the 300+ boards supporting CircuitPython include both official and third-party creations from companies as well as open source projects made by members of the Raspberry Pi community. There are tons of microcontrollers out there to take advantage of for your projects and some of the best ones around are <a href="https://www.tomshardware.com/best-picks/best-rp2040-boards"><u>RP2040 boards</u></a>.</p><p>Adafruit provides a complete list of officially supported boards on the <a href="https://circuitpython.org/downloads"><u>CircuitPython website</u></a>. Examples include most any RP2040 board, NXP, Nordic, Espressif boards and plenty more. Check out the complete list to see if the board you want to use will work or to find alternatives for your project that support CircuitPython.</p><p>It’s not enough to support CircuitPython, special <a href="https://circuitpython.org/libraries"><u>libraries</u></a> are created to absolve much of the hard work and so far over 350 are available to download. There is a complete list of libraries available on the CircuitPython website including a package that bundles many of them together. If you want to see what these libraries are capable of, check out our tutortial on how to create a <a href="https://www.tomshardware.com/how-to/make-simon-game-with-raspberry-pi-pico"><u>Simon Says</u></a> game using the Raspberry Pi Pico along with the aid of CircuitPython.</p><p>The <a href="https://www.tomshardware.com/features/best-raspberry-pi-projects"><u>best Raspberry Pi projects</u></a> are the ones you can make at home and CircuitPython easily bridges the learning gap with microelectronics. With over 300 boards now officially supported, there’s plenty of hardware to choose from and tons of inspiration from the community to help bring your project to fruition. </p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Adafruit Joins Us for the Pi Cast: KB2040 and CircuitPython ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/picast-adafruit-2021-holiday-special</link>
                                                                            <description>
                            <![CDATA[ Adafruit is joining the PiCast team as our special guests for this episode to give everyone a closer look at the new KB2040 and CircuitPython features. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">iT4xxv2oYhs9kk3C3VMwSB</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/davr8upiTeiDm37gDNqCn-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Tue, 21 Dec 2021 15:39:57 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:31 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Ash Hill ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/p9HsnLCwBpTQYCBBhYXgrS.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Ash is a self-employed tech writer and illustrator with a serious affinity for the Raspberry Pi, 3D printing, retro gaming and finding the best tech deals and coupons. She has over a decade of IT experience and has been featured in the official Raspberry Pi magazine MagPi.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/davr8upiTeiDm37gDNqCn-1280-80.jpg">
                                                            <media:credit><![CDATA[Adafruit]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Raspberry Pi]]></media:description>                                                            <media:text><![CDATA[Raspberry Pi]]></media:text>
                                <media:title type="plain"><![CDATA[Raspberry Pi]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/davr8upiTeiDm37gDNqCn-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>We’ve got some special guests lined up this holiday for The Picast—our weekly <a href="https://www.tomshardware.com/topics/raspberry-pi"><u>Raspberry Pi</u></a>-themed podcast. Our present to you this season is a special episode featuring the team at Adafruit scheduled for today, December 21st at 2:30pm EST / 7:30pm BST.</p><p>It’s has been an exciting year for the Raspberry Pi and consequently the rest of the community as companies like Adafruit have released a selection of new products based on the new RP2040 processor.</p><div class="youtube-video" data-nosnippet ><div class="video-aspect-box"><iframe data-lazy-priority="low" data-lazy-src="https://www.youtube-nocookie.com/embed/jnxAq6czefY" allowfullscreen></iframe></div></div><p>We&apos;ll no doubt delve into what the team has been up to this year with particular attention on the new <a href="https://www.tomshardware.com/news/adafruit-a-wild-kb2040-appears"><u>KB2040 Key Board Driver</u></a> board, which can power a custom keyboard. This is the latest creation from Adafruit and we’re just as excited as you are to see what it’s capable of.</p><p>In addition to talking about the KB2040, we’ve also got a chance to get into CircuitPython and explore the new features. If you’re not sure about where to use it, this is a great opportunity to see what it’s capable of.</p><p>Tune in today at 2:30pm EST / 7:30pm BST via <a href="https://www.youtube.com/watch?v=jnxAq6czefY"><u>YouTube</u></a> or <a href="https://www.facebook.com/tomshardware/posts/10161651541109676"><u>Facebook</u></a> to see Adafruit and plan your last-minute wishlist. </p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ CircuitPython Powers TI-84 Plus CE Python Graphing Calculator ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/circuitpython-powers-ti-84-calculator</link>
                                                                            <description>
                            <![CDATA[ Adafruit confirmed in a recent blog post that CircuitPython is officially installed on all new TI-84 Plus CE Python Graphing Calculators. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">T23Q5q9RMRabA42MujZrrh</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/DJ6B9dY5vhdbsVDU3Dib7e-1280-80.png" type="image/png" length="0"></enclosure>
                                                                        <pubDate>Sun, 23 May 2021 16:49:08 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:19:26 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Ash Hill ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/p9HsnLCwBpTQYCBBhYXgrS.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Ash is a self-employed tech writer and illustrator with a serious affinity for the Raspberry Pi, 3D printing, retro gaming and finding the best tech deals and coupons. She has over a decade of IT experience and has been featured in the official Raspberry Pi magazine MagPi.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/png" url="https://cdn.mos.cms.futurecdn.net/DJ6B9dY5vhdbsVDU3Dib7e-1280-80.png">
                                                            <media:credit><![CDATA[Mr. Posnanski]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[TI-84 Plus CE Python Graphing Calculators]]></media:description>                                                            <media:text><![CDATA[TI-84 Plus CE Python Graphing Calculators]]></media:text>
                                <media:title type="plain"><![CDATA[TI-84 Plus CE Python Graphing Calculators]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/DJ6B9dY5vhdbsVDU3Dib7e-1280-80.png" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Math class just got even more fun! If you&apos;re lucky enough to get your hands on the new TI-84 Plus CE Python Graphing Calculator from Texas Instruments, you now have the opportunity to tinker with CircuitPython! That’s right, it’s not just for the <a href="https://www.tomshardware.com/news/raspberry-pi-pico-tutorials-pinout-everything-you-need-to-know">Raspberry Pi Pico</a> and other microcontrollers.</p><p>In a recent <a href="https://blog.adafruit.com/2021/05/20/python-snakes-its-way-to-the-ti-84-plus-ce-python-graphing-calculator-by-texas-instruments-runs-circuitpython-ticalculators"><u>blog post</u></a>, Adafruit confirmed the news is official and CircuitPython is definitely coming with the new calculator. This confirmation was echoed by Texas Instruments in a follow-up <a href="https://twitter.com/TICalculators/status/1395774706695950336"><u>Tweet</u></a>.</p><p>The new development is referred to as TI-Python and it&apos;s based on CircuitPython. It functions as an interpreter for Python scripts that, according to Texas Instruments, run independently from the CE OS calculations.</p><p>Adafruit dug a little deeper and discovered a few modules that come with the new TI-Python application and verified seven ranging from random number generators to ones that integrate directly with the CE OS.</p><p>The TI-84 Plus CE Python Graphing Calculator is listed available for sale in the UK but has yet to make its way to the US—although, Adafruit managed to find a teacher with one on <a href="https://twitter.com/POSitive_MATH/status/1394667415880052743/photo/1"><u>Twitter</u></a>. In the meantime, interested parties can sign up for update notifications. Read more about the TI-84 Plus CE Python Graphing Calculator in the official <a href="https://education.ti.com/download/en/ed-tech/D278A0ACF2D448BC8FC2D94EF50DD8FD/5B7841F423E840ED8EA545DC372276DD/TI-84_Plus_CE-T_EN.pdf"><u>PDF</u></a> provided by Texas Instruments. </p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ CircuitPython Libraries Slither Into MicroPython on the Raspberry Pi Pico ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/circuitpython-libraries-come-to-micropython-on-pico</link>
                                                                            <description>
                            <![CDATA[ Adafruit's latest guide covers everything you need to use CircuitPython libraries with MicroPython on the Raspberry Pi Pico. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">8pFd388L6YJobZh2v3ZdbS</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/JhexAp7TbAz2ivnHD5t7o5-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Fri, 21 May 2021 09:35:46 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:27 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Ash Hill ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/p9HsnLCwBpTQYCBBhYXgrS.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Ash is a self-employed tech writer and illustrator with a serious affinity for the Raspberry Pi, 3D printing, retro gaming and finding the best tech deals and coupons. She has over a decade of IT experience and has been featured in the official Raspberry Pi magazine MagPi.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/JhexAp7TbAz2ivnHD5t7o5-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Raspberry Pi]]></media:description>                                                            <media:text><![CDATA[Raspberry Pi]]></media:text>
                                <media:title type="plain"><![CDATA[Raspberry Pi]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/JhexAp7TbAz2ivnHD5t7o5-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p><a href="https://learn.adafruit.com/circuitpython-libraries-on-micropython-using-the-raspberry-pi-pico">Adafruit has shared a new guide</a> detailing the process for using CircuitPython libraries with MicroPython using our favorite microcontroller, the <a href="https://www.tomshardware.com/news/raspberry-pi"><u>Raspberry Pi Pico</u></a>.</p><p>The layer between CircuitPython and MicroPython is known as Blinka. It&apos;s a compatibility library designed to work with Linux SBCs like the Raspberry Pi Pico and the <a href="https://www.tomshardware.com/how-to/use-circuitpython-raspberry-pi">Raspberry Pi</a>. However, the Raspberry Pi Pico microcontroller proved to be a unique challenge and hasn&apos;t been able to make use of this support until now.</p><p>Getting started is easy enough as Adafruit has supplied a full guide detailing everything you need to do. You will need the latest version of MicroPython. The instructions recommend using Thonny for this but when testing it ourselves, we opted to manually install MicroPython as Thonny had an out-of-date version listed. </p><p>Once you&apos;ve ensured your copy of MicroPython is truly the latest, you&apos;re free to go ahead and complete the guide steps which demonstrate how to use the libraries with a BME280 sensor. At this time not every library will work, we tested with a NeoPixel ring and found that it was not supported. <a href="https://twitter.com/adafruit/status/1395512650390458368">Adafruit advised us</a> that at the time of writing there is support for basic digital IO, I2C, SPI, UART but anything that needs a custom hardware API, including NeoPixels will not currently work. But this will change over time.</p><p>We&apos;re excited to see this new development bridge the gap between CircuitPython and MicroPython for the Pico which will hopefully save developers plenty of hassle going forward. Check out the full overview at the <a href="https://learn.adafruit.com/circuitpython-libraries-on-micropython-using-the-raspberry-pi-pico/overview"><u>Adafruit website</u></a> and guide to get an idea of how this new configuration works and start brainstorming your next microcontroller project. </p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How To Use CircuitPython on a Raspberry Pi ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/use-circuitpython-raspberry-pi</link>
                                                                            <description>
                            <![CDATA[ CircuitPython is not just for microcontrollers, it can also be used to control the GPIO of a Raspberry Pi. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">SFhfUjZxpcvCauhbVipEbK</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/EQWfPwLY4nbn4R5sYCeesW-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Tue, 27 Apr 2021 11:00:34 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:35 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/EQWfPwLY4nbn4R5sYCeesW-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[CircuitPython on Pi]]></media:description>                                                            <media:text><![CDATA[CircuitPython on Pi]]></media:text>
                                <media:title type="plain"><![CDATA[CircuitPython on Pi]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/EQWfPwLY4nbn4R5sYCeesW-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>CircuitPython is a programming language designed to simplify experimenting with low cost boards, typically microcontroller boards made by Adafruit. CircuitPython can also be used on the <a href="https://www.tomshardware.com/news/raspberry-pi"><u>Raspberry Pi</u></a> and via two projects we introduce how to use CircuitPython with the Raspberry Pi. The first project is the humble LED, controlling how to blink an LED enables us to understand how we communicate and control components. The second project involves using additional components connected to the GPIO via a jumper wire to <a href="https://www.tomshardware.com/features/stemma-vs-qwiic-vs-grove-connectors"><u>Stemma QT connector</u></a>.</p><p>CircuitPython on the Raspberry Pi is transferable to other devices, such as Adafruit’s <a href="https://www.tomshardware.com/reviews/adafruit-qt-py-rp2040-review"><u>QT Py RP2040</u></a>, <a href="https://www.tomshardware.com/reviews/adafruit-feather-rp2040"><u>Feather RP2040</u></a> and <a href="https://www.tomshardware.com/reviews/pimoroni-keybow-2040-review-programmable-keyboard-with-pi-silicon-inside"><u>Pimoroni’s Keybow 2040</u></a>, along with the Raspberry Pi Pico. So the skills learned here are applicable to any board that can run CircuitPython </p><h2 id="for-this-project-you-will-need-2">For This Project You Will Need</h2><ul><li>Any model of Raspberry Pi, but for best results use a 3 / 4</li><li>The latest Raspberry Pi OS</li></ul><p> <strong>Project 1</strong></p><p><br></p><ul><li>A breadboard</li><li>LED</li><li>330 Ohm Resistor (Orange-Orange-Brown-Gold is the <a href="https://www.tomshardware.com/how-to/resistor-color-codes">330 Ohm resistor color code</a>)</li><li>2x male to female jumper wires</li></ul><p> <strong>Project 2</strong></p><p><br></p><ul><li><a href="https://www.adafruit.com/product/4830"><u>Adafruit MPR121 Capacitive Touch Sensor</u></a></li><li>4x female to female jumper wires</li><li>2x crocodile clips</li><li>2x fruit</li><li><a href="https://www.adafruit.com/product/4209"><u>StemmaQT to breadboard leads</u></a></li></ul><h2 id="installing-circuitpython-xa0">Installing CircuitPython </h2><p>1. Open a terminal and <strong>update, then upgrade</strong> the software on your Raspberry Pi.</p><pre class="line-numbers language-python" language="python" ><code>$ sudo apt update$ sudo apt upgrade</code></pre><p>2.  <strong>Upgrade setuptools</strong>, a Python toolkit to manage Python package installations. </p><pre class="line-numbers language-python" language="python" ><code>$ sudo pip3 install --upgrade setuptools</code></pre><p>3. <strong>Change directory to your home directory</strong> and then use pip3 to <strong>install Adafruit’s Python Shell tool</strong>. The command “cd ~” is shorthand for the home directory. </p><pre class="line-numbers language-python" language="python" ><code>cd ~$ sudo pip3 install --upgrade adafruit-python-shell</code></pre><p>4. <strong>Download Adafruit’s installation script</strong> and then<strong> run the script</strong> to configure CircuitPython. During the installation it may state that you are using Python 2, it will prompt you to update, this is safe to say Yes to. </p><pre class="line-numbers language-python" language="python" ><code>$ wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/raspi-blinka.py$ sudo python3 raspi-blinka.py</code></pre><h2 id="blinking-an-led-xa0">Blinking an LED </h2><figure class="van-image-figure " data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1464px;"><p class="vanilla-image-block" style="padding-top:57.17%;"><img id="" name="Project 1_bb.png" alt="CircuitPython on Pi" src="https://cdn.mos.cms.futurecdn.net/h9RVvPiKdQfmHZjutAAPuV.png" mos="" align="middle" fullscreen="1" width="1464" height="837" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/h9RVvPiKdQfmHZjutAAPuV.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=""><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>The humble flashing LED is always the first test for a new electronics project. It enables us to be certain that our code is working and that our wiring is sound. For this project we shall wire up an LED to GPIO 17 via two jumper wires and a 330 Ohm resistor. The wiring for this project looks as follows. </p><p>1. <strong>Open the Thonny editor </strong>and <strong>import three libraries of code</strong>. The first is “time” and this is used to control the pace of our code. The next two, “board” and “digitalio” are CircuitPython specific libraries. Board enables us to interact with the GPIO, digitalio is used to control the state of a GPIO pin. </p><pre class="line-numbers language-python" language="python" ><code>import timeimport boardimport digitalio</code></pre><p>2. Using an object, led, we <strong>tell CircuitPython which GPIO pin</strong> we are using, and that it is an output. Our LED is connected to GPIO 17, which in CircuitPython is board.D17.</p><pre class="line-numbers language-python" language="python" ><code>led = digitalio.DigitalInOut(board.D17)led.direction = digitalio.Direction.OUTPUT</code></pre><p>3. <strong>Create a while True loop</strong> which will turn the LED on (led.value = True) and off (led.value = False) every 0.1 seconds. </p><pre class="line-numbers language-python" language="python" ><code>while True:    led.value = True    time.sleep(0.1)    led.value = False    time.sleep(0.1)</code></pre><p>Your code should look like this </p><pre class="line-numbers language-python" language="python" ><code>import timeimport boardimport digitalioled = digitalio.DigitalInOut(board.D17)led.direction = digitalio.Direction.OUTPUTwhile True:    led.value = True    time.sleep(0.1)    led.value = False    time.sleep(0.1)</code></pre><p><strong>Save the code</strong> and <strong>click Run </strong>to start it. The LED should now flash on and off every 0.1 seconds. With the test complete we can move on to Project 2.</p><h2 id="using-a-capacitive-touch-sensor-with-circuitpython-xa0">Using a Capacitive Touch Sensor With CircuitPython </h2><figure class="van-image-figure " data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:3225px;"><p class="vanilla-image-block" style="padding-top:56.25%;"><img id="" name="MPR121.JPG" alt="CircuitPython on Pi" src="https://cdn.mos.cms.futurecdn.net/n45QJpxx6cvLRk3PXYMFRW.jpg" mos="" align="middle" fullscreen="1" width="3225" height="1814" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/n45QJpxx6cvLRk3PXYMFRW.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=""><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>The next project requires a little more equipment, but it is no more difficult than controlling an LED. In this project we shall use an MPR121 capacitive touch sensor and a few crocodile clips to enable us to use conductive objects as inputs. </p><p>The MPR121 is designed for microcontroller boards that have a <a href="https://www.tomshardware.com/features/stemma-vs-qwiic-vs-grove-connectors"><u>Stemma QT connector</u></a>, but with a little ingenuity we can make it work on a Raspberry Pi. The classic MPR121 example project is a banana piano, where touching a banana triggers a note to be played. For our simplified version, we will have two pieces of fruit, and each will turn the LED from the previous project, on and off.</p><p>To use the MPR121 touch sensor we will need to install an additional piece of software. Open a terminal and enter the following command.</p><pre class="line-numbers language-python" language="python" ><code>$ sudo pip3 install adafruit-circuitpython-mpr121</code></pre><figure class="van-image-figure " data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1066px;"><p class="vanilla-image-block" style="padding-top:66.32%;"><img id="" name="P2.png" alt="CircuitPython on Pi" src="https://cdn.mos.cms.futurecdn.net/Xyf5M4DgdSudzWLj2rAinV.png" mos="" align="middle" fullscreen="1" width="1066" height="707" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/Xyf5M4DgdSudzWLj2rAinV.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=""><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>The MPR121 board uses a StemmaQT connector, to use with a Raspberry Pi we need to use the breakout lead that gives us four jumper wires. They are colour coded as follows. Red to 3V, Black to GND, Yellow to SCL (GPIO3) and Blue to SDA (GPIO2). Connect the MPR121 to the Raspberry Pi using female to female jumper wires.</p><figure class="van-image-figure " data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:3723px;"><p class="vanilla-image-block" style="padding-top:56.24%;"><img id="" name="Main.JPG" alt="CircuitPython on Pi" src="https://cdn.mos.cms.futurecdn.net/EQWfPwLY4nbn4R5sYCeesW.jpg" mos="" align="middle" fullscreen="" width="3723" height="2094" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=""><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>Using crocodile clips, connect a banana to input 0 of the MPR121, attach the other banana to input 1. Any conductive objects will work, aluminium foil and card is a cheap and easy way to make fun touch interfaces.</p><p>Open Thonny and create a new file.</p><p>1.  <strong>Import the three libraries of code</strong>. The first is “time” and this is used to control the pace of our code. The next two, “board” and “digitalio” are CircuitPython specific libraries. Board enables us to interact with the GPIO, digitalio is used to control the state of a GPIO pin.</p><pre class="line-numbers language-python" language="python" ><code>import timeimport boardimport digitalio</code></pre><p>2. <strong>Import two extra libraries</strong> for use with the MPR121 The first “busio” enables our code to access the I2C interface that the MPR121 uses for communication. The second clearly enables the use of the MPR121 in our code. </p><pre class="line-numbers language-python" language="python" ><code>import busioimport adafruit_mpr121</code></pre><p>3. Using an object, led, we<strong> tell CircuitPython which GPIO pin we are using</strong>, and that it is an output. Our LED is connected to GPIO 17, which in CircuitPython is board.D17.</p><pre class="line-numbers language-python" language="python" ><code>led = digitalio.DigitalInOut(board.D17)led.direction = digitalio.Direction.OUTPUT</code></pre><p>4. <strong>Create an object, i2c</strong>, that contains the GPIO pins that are used to connect the MPR121 via I2C. Then connect to the MPR121. CircuitPython has two references for the SCL (clock) and SDA (data) pins used in I2C. These references use the default pins for I2C no matter the device. So using these references on a Raspberry Pi, QT Py RP2040 and Raspberry Pi Pico all use the default I2C pins. </p><pre class="line-numbers language-python" language="python" ><code>i2c = busio.I2C(board.SCL, board.SDA)mpr121 = adafruit_mpr121.MPR121(i2c)</code></pre><p>5. <strong>Create a loop that will continually check the status of input 0</strong>, connected to a banana. If the banana is the function will return True, and then the code to print a message to the Python Shell and turn the LED on (led.value = True) will activate. </p><pre class="line-numbers language-python" language="python" ><code>while True:    if mpr121.is_touched(0) ==  True:        print("This banana turns light on")        led.value = True</code></pre><p>6. <strong>Enter a  second check </strong>to read the status of input 1 which is connected to the banana used to turn off the LED. If this is pressed the function returns True and triggers the code to print a message to the Python Shell and to turn the LED off. </p><pre class="line-numbers language-python" language="python" ><code> elif mpr121.is_touched(1) == True:        print("This banana turns the light off")        led.value = False    time.sleep(0.5)</code></pre><p>With the code complete we can save the file as touch-test.py and click on Run to start the code. Now press the bananas to turn the LED on and off.</p><p>Your code should look like this</p><pre class="line-numbers language-python" language="python" ><code>import timeimport boardimport digitalioimport busioimport adafruit_mpr121led = digitalio.DigitalInOut(board.D17)led.direction = digitalio.Direction.OUTPUTi2c = busio.I2C(board.SCL, board.SDA)mpr121 = adafruit_mpr121.MPR121(i2c)while True:    if mpr121.is_touched(0) ==  True:        print("This banana turns light on")        led.value = True    elif mpr121.is_touched(1) == True:        print("This banana turns the light off")        led.value = False    time.sleep(0.5)</code></pre><p>CircuitPython provides the easiest way to get started on a project, thanks to a large community of makers using the language and creating libraries for components. CircuitPython is available for over 200 boards, and despite only being with us since 2018, it has been the base of many projects.</p><p><em>This article originally appeared in an issue of </em><a href="https://www.linuxformat.com/"><u><em>Linux Format</em></u></a><em> magazine.</em></p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Raspberry Pi Pico Machine Boots Straight Into MicroPython ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/raspberry-pi-pico-orange-python-by-picosoft</link>
                                                                            <description>
                            <![CDATA[ Picosoft's newly designed Orange-Python machine boots straight into MicroPython, so you get started coding immediately. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">hQ7RBAaFrwn7P7P7Kde3d6</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/RehtrtXK5nEHsp5KQ4PthV-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Mon, 29 Mar 2021 16:40:08 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:31 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Ash Hill ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/p9HsnLCwBpTQYCBBhYXgrS.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Ash is a self-employed tech writer and illustrator with a serious affinity for the Raspberry Pi, 3D printing, retro gaming and finding the best tech deals and coupons. She has over a decade of IT experience and has been featured in the official Raspberry Pi magazine MagPi.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/RehtrtXK5nEHsp5KQ4PthV-1280-80.jpg">
                                                            <media:credit><![CDATA[Picosoft]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Raspberry Pi]]></media:description>                                                            <media:text><![CDATA[Raspberry Pi]]></media:text>
                                <media:title type="plain"><![CDATA[Raspberry Pi]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/RehtrtXK5nEHsp5KQ4PthV-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>This <a href="https://www.tomshardware.com/news/raspberry-pi"><u>Raspberry Pi Pico</u></a> creation comes to us from a company called Picosoft. The Japan-based dev team has designed a Python machine known as <a href="http://www.picosoft.co.jp/Python/index.html"><u>Orange-Python</u></a> that boots directly into a MicroPython interface.</p><p>Some of the <a href="https://www.tomshardware.com/features/best-raspberry-pi-projects"><u>best Raspberry Pi projects</u></a> we&apos;ve come across use a custom interface. The MicroPython program developed for the Orange-Python is very small—small enough to be flashed onto the Pico and stored locally.  </p><figure role="gallery"><figure><img src="https://cdn.mos.cms.futurecdn.net/9xrcH5tdVyqpnJxLaMwKKg.jpg" alt="Raspberry Pi" /><figcaption><small role="credit">Picosoft</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/uv4MehU2NdUoe5vzSnyiQh.jpg" alt="Raspberry Pi" /><figcaption><small role="credit">Picosoft</small></figcaption></figure><figure><img src="https://cdn.mos.cms.futurecdn.net/536UDme6xj9vaaBK6tATGj.jpg" alt="Raspberry Pi" /><figcaption><small role="credit">Picosoft</small></figcaption></figure></figure><p>The whole operation is powered by an RP2040 on a Raspberry Pi Pico. The only extra accessories you need are a keyboard, VGA monitor and something to supply power via microUSB.</p><p>When the Orange-Python system boots, it loads into a mode called Read Evaluate Print Loop (or REPL). This is an interactive interface that works like programming on an old BASIC computer. You can see it in action on <a href="https://twitter.com/picocircuit/status/1376361534041939969">Twitter</a>. The team even managed to program a Tetris-style demo.</p><figure class="van-image-figure " data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1786px;"><p class="vanilla-image-block" style="padding-top:60.47%;"><img id="" name="1617034936.jpg" alt="Raspberry Pi" src="https://cdn.mos.cms.futurecdn.net/vGQ3kTyxe9YTKnc8bFuPBm.jpg" mos="" align="middle" fullscreen="" width="1786" height="1080" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=""><span class="credit" itemprop="copyrightHolder">(Image credit: Picosoft)</span></figcaption></figure><p>The DIY kit is planned to retail for $34, ideal for makers who want to assemble the Orange-Python themselves. Pre-built kits will be sold for around $50. Check out the <a href="https://store.shopping.yahoo.co.jp/orangepicoshop">Orange Pico Shop</a> for more products and updates in this one.</p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ How to Use CircuitPython With GPIO Pins on a PC ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/how-to/gpio-pins-circuitpython-on-a-pc</link>
                                                                            <description>
                            <![CDATA[ Add a hardware interface to your computer and learn how to write CircuitPython to control components and devices attached to your machine. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">M9e6xZniyrLmzmYhkDFjXk</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/v8Vmv34ydQxprTZ5b7xoTL-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Sun, 28 Mar 2021 12:00:43 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:55:32 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Mike Bedford ]]></dc:creator>                                                                                                        <dc:description><![CDATA[ null ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/v8Vmv34ydQxprTZ5b7xoTL-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[CircuitPython]]></media:description>                                                            <media:text><![CDATA[CircuitPython]]></media:text>
                                <media:title type="plain"><![CDATA[CircuitPython]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/v8Vmv34ydQxprTZ5b7xoTL-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>Thanks to the Raspberry Pi and Arduino, we are familiar with the GPIO (general purpose input/output) that enable these boards to interface with real-world electronic devices. PCs are devoid of a GPIO but boards such as <a href="https://www.adafruit.com/product/2264"><u>Adafruit’s FT232H</u></a> are available that provide that functionality via a USB port.</p><h2 id="circuitpython-installation-xa0">CircuitPython Installation </h2><p>We’ll be using Python to work with these boards. Although this may already be installed on your system, there are supporting elements you’ll need to install. These come in the form of CircuitPython, a version of MicroPython for microcontrollers such as the <a href="https://www.tomshardware.com/news/raspberry-pi-pico-tutorials-pinout-everything-you-need-to-know"><u>Raspberry Pi Pico</u></a>. To setup the FT232H follow Adafruit’s installation instructions <a href="https://learn.adafruit.com/circuitpython-on-any-computer-with-ft232h/setup"><u>for your operating system</u></a>.</p><figure class="van-image-figure " data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:900px;"><p class="vanilla-image-block" style="padding-top:66.67%;"><img id="" name="image2.jpg" alt="CircuitPython" src="https://cdn.mos.cms.futurecdn.net/59tMFjqZTR2PZPTxxCgPBL.jpg" mos="" align="middle" fullscreen="1" width="900" height="600" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/59tMFjqZTR2PZPTxxCgPBL.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=""><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>Before you do anything more with your FT232H, you’ll need to solder on the headers provided. We have a great guide on how to <a href="https://www.tomshardware.com/how-to/solder-pins-raspberry-pi-pico"><u>solder header</u></a> pins to your board.</p><p>To write the code for this project you will need an editor. For example you can use Notepad++, Visual Studio Code, PyCharm or whatever you are comfortable with.</p><h2 id="controlling-the-gpio-xa0">Controlling the GPIO </h2><p>There’s a seemingly endless list of projects you can create when you add GPIO pins to a PC, but below we’ll show you how to code and wire a really simple one where a button causes an LED to illuminate.</p><p>1. <strong>Create a file and save it as FT232H-example.py</strong></p><p>2. <strong>Import two modules</strong> of pre-written code. The first “board” enables the code to talk to the FT232H, the second “digitalio” is how we control the configuration of GPIO pins. </p><pre class="line-numbers language-python" language="python" ><code>import board import digitalio </code></pre><p>3. <strong>Create an object “led”</strong> which will be used to reference the LED connected to GPIO C0. </p><pre class="line-numbers language-python" language="python" ><code>led = digitalio.DigitalInOut(board.C0)</code></pre><p>4. <strong>Set the LED object as an output</strong>, so that current flows to the LED from the GPIO pin </p><pre class="line-numbers language-python" language="python" ><code>led.direction = digitalio.Direction.OUTPUT</code></pre><p>5. <strong>Create another object, “button.” </strong>This is used to reference the push button connected to GPIO pin C1. </p><pre class="line-numbers language-python" language="python" ><code>button = digitalio.DigitalInOut(board.C1)</code></pre><p>6.  <strong>Set the button as an input</strong>. </p><pre class="line-numbers language-python" language="python" ><code>button.direction = digitalio.Direction.INPUT</code></pre><p>7. Inside of a loop, <strong>set the value of the LED to match that of the button</strong>. When the button is pressed, the LED will light, when released, the LED will turn off. </p><pre class="line-numbers language-python" language="python" ><code>while True:   led.value = button.value</code></pre><h2 id="complete-code-listing-7">Complete Code Listing</h2><pre class="line-numbers language-python" language="python" ><code>import board import digitalio  led = digitalio.DigitalInOut(board.C0) led.direction = digitalio.Direction.OUTPUT  button = digitalio.DigitalInOut(board.C1) button.direction = digitalio.Direction.INPUT  while True:   led.value = button.value</code></pre><h2 id="creating-the-circuit">Creating the Circuit</h2><figure class="van-image-figure " data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:900px;"><p class="vanilla-image-block" style="padding-top:77.11%;"><img id="" name="image3.jpg" alt="CircuitPython" src="https://cdn.mos.cms.futurecdn.net/v8Vmv34ydQxprTZ5b7xoTL.jpg" mos="" align="middle" fullscreen="1" width="900" height="694" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/v8Vmv34ydQxprTZ5b7xoTL.jpg' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=""><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><p>The circuit for this project is simple. We have an LED connected to C0, and to GND via a 100 Ohm resistor (see <a href="https://www.tomshardware.com/how-to/resistor-color-codes">resistor color codes</a> to identify). The push button is connected to 3.3V and C1. The resting state of C1 is OFF, and this state is the value used to turn off the LED.</p><p>To ensure that the push button resting state is OFF, a 10K Ohm resistor is used to pull C1 down to GND, effectively 0V. When the push button is pressed it connects 3.3V to C1, turning that pin ON and the value setting the LED to turn on. Please follow the diagram to correctly wire up your board.</p><figure class="van-image-figure " data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:909px;"><p class="vanilla-image-block" style="padding-top:77.23%;"><img id="" name="image1.png" alt="CircuitPython" src="https://cdn.mos.cms.futurecdn.net/Djd3PaNUbjpzGt6kBcG7tK.png" mos="" align="middle" fullscreen="1" width="909" height="702" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/Djd3PaNUbjpzGt6kBcG7tK.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=""><span class="credit" itemprop="copyrightHolder">(Image credit: Tom's Hardware)</span></figcaption></figure><h2 id="test-your-code">Test Your Code</h2><p>Open a terminal and start the code python3 FT232H-example.py press the push button to turn on the LED, release to turn off.</p><p><em>This story originally appeared in an issue of </em><a href="https://www.linuxformat.com/"><em>Linux Format Magazine</em></a><em>.</em></p>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Piper Make Is a Raspberry Pi Pico Drag and Drop Python Editor ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/raspberry-pi-pico-piper-make</link>
                                                                            <description>
                            <![CDATA[ While not the first block coding editor for the Raspberry Pi Pico, Piper Make is easy to use and comes with a series of engaging  lessons. ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">XosVvrj4NHxT8yuLPgjffC</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/scJr5ZbkjV7udLb9xMmEkQ-1280-80.png" type="image/png" length="0"></enclosure>
                                                                        <pubDate>Mon, 15 Mar 2021 12:47:24 +0000</pubDate>                                                                                                                                <updated>Wed, 05 Feb 2025 14:19:31 +0000</updated>
                                                                                                                                            <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/png" url="https://cdn.mos.cms.futurecdn.net/scJr5ZbkjV7udLb9xMmEkQ-1280-80.png">
                                                            <media:credit><![CDATA[Future]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Piper Make for the Raspberry Pi Pico]]></media:description>                                                            <media:text><![CDATA[Piper Make for the Raspberry Pi Pico]]></media:text>
                                <media:title type="plain"><![CDATA[Piper Make for the Raspberry Pi Pico]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/scJr5ZbkjV7udLb9xMmEkQ-1280-80.png" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>It may not be the <a href="https://www.tomshardware.com/news/raspberry-pi-pico-bipes">first block-based language</a> for the <a href="https://www.tomshardware.com/news/raspberry-pi-pico-tutorials-pinout-everything-you-need-to-know">Raspberry Pi Pico</a>, but Piper Make definitely takes the crown of the best looking. Released yesterday, <a href="https://make.playpiper.com/">Piper Make</a> is the latest project from Piper Learning, which previously created the <a href="https://www.playpiper.com/products/piper-computer-kit-1">Piper Computer Kit</a>. Piper Make comes as a free online service or as part of a monthly subscription service.</p><div class="see-more see-more--clipped"><blockquote class="twitter-tweet hawk-ignore" data-lang="en"><p lang="en" dir="ltr">IT'S HERE: Piper Make, available now in your browser on Mac, PCs, and @Google Chromebooks! Start inventing with the new @Raspberry_Pi Pico using our drag-and-drop coding platform! 🧑‍💻🥧Try it out at https://t.co/8wHaBMGg0T!#WhatWillYouCreate #STEMeducation #RaspberryPiDay pic.twitter.com/rm0Bi0dN1R<a href="https://twitter.com/StartWithPiper/status/1371237433623347200">March 14, 2021</a></p></blockquote><div class="see-more__filter"></div></div><p>Piper Make is a browser-based editor and scheme of lessons designed to introduce MicroPython via the Raspberry Pi Pico. The user interface is clearly designed for younger makers, with bright colors and large icons, but underneath all of this is a decent selection of lessons that introduce coding concepts and electronics via challenges and projects.</p><figure class="van-image-figure " data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:857px;"><p class="vanilla-image-block" style="padding-top:47.61%;"><img id="" name="Piper Make.gif" alt="Piper Make for Raspberry Pi Pico" src="https://cdn.mos.cms.futurecdn.net/Ryj7gm6Ubk3PXpJfb6QVWN.gif" mos="" align="middle" fullscreen="" width="857" height="408" attribution="" endorsement="" class=""></p></div></div><figcaption itemprop="caption description" class=""><span class="credit" itemprop="copyrightHolder">(Image credit: Future)</span></figcaption></figure><p>We went through the getting started process, first by flashing a custom firmware to our Raspberry Pi Pico and then following the first lesson to get a feel for the workflow. The block interface is extremely easy to use and automatically handles importing the libraries necessary for the blocks on offer. <br><br>Certain blocks, such as those found in Sensing, require extra components. For example, the temperature sensor block requires an I2C temperature sensor to be attached. You can purchase these sensors separately, but for a one-off payment of $30, you can purchase a starter kit with a Raspberry Pi Pico and basic components to get you started. The monthly subscription option is $20 and each month a new component is delivered to your door along with new Piper products.  </p><p>Despite this being a block-based coding platform, Piper Make is really Python. Via the Python tab on the bottom of the screen, we can switch to a view-only mode and see the project&apos;s code, which is useful for coders transitioning from blocks to text. </p><p><a href="https://make.playpiper.com/">Piper Make</a> is an impressive way to introduce coding, and the monthly subscription model usefully provides curated components and lessons to support your learning. </p><iframe src="https://content.jwplatform.com/players/YdWWS5dA.html" id="YdWWS5dA" title="Raspberry Pi 4 Review: The New Gold Standard for Single-Board Computing" width="1920" height="1080" frameborder="0" scrolling="auto" allowfullscreen></iframe>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
                                <item>
                                                            <title><![CDATA[ Block Based Coding Comes To the Raspberry Pi Pico ]]></title>
                                                                                                                                                                                                <link>https://www.tomshardware.com/news/raspberry-pi-pico-bipes</link>
                                                                            <description>
                            <![CDATA[ BIPES is an impressive and simple means to introduce coding to younger makers ]]>
                                                                                                            </description>
                                                                                                                                <guid isPermaLink="false">SwkcKgTL3g965wDDmbvGza</guid>
                                                                                                <enclosure url="https://cdn.mos.cms.futurecdn.net/8jZ6FYVAoYr9L2ajAEYB6o-1280-80.jpg" type="image/jpeg" length="0"></enclosure>
                                                                        <pubDate>Thu, 04 Mar 2021 18:48:22 +0000</pubDate>                                                                                                                                                                                                                                <category><![CDATA[Programming]]></category>
                                                    <category><![CDATA[Software]]></category>
                                                                                                                    <dc:creator><![CDATA[ Les Pounder ]]></dc:creator>                                                                                    <dc:source><![CDATA[ https://cdn.mos.cms.futurecdn.net/mZ2MebAz6hhKR6vLUDUbsc.jpg ]]></dc:source>
                                                                <dc:description><![CDATA[ &lt;p&gt;Les Pounder is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training programme &quot;Picademy&quot;.&lt;/p&gt; ]]></dc:description>
                                                                                                                                                                                                                                                <media:content type="image/jpeg" url="https://cdn.mos.cms.futurecdn.net/8jZ6FYVAoYr9L2ajAEYB6o-1280-80.jpg">
                                                            <media:credit><![CDATA[Tom&#039;s Hardware]]></media:credit>
                                                                                                                                                                                                                                    <media:description><![CDATA[Raspberry Pi Pico]]></media:description>                                                            <media:text><![CDATA[Raspberry Pi Pico]]></media:text>
                                <media:title type="plain"><![CDATA[Raspberry Pi Pico]]></media:title>
                                                    </media:content>
                                                    <media:thumbnail url="https://cdn.mos.cms.futurecdn.net/8jZ6FYVAoYr9L2ajAEYB6o-1280-80.jpg" />
                                                                                                                                                                    <content:encoded >
                            <![CDATA[
                            <article>
                                <p>The <a href="https://www.tomshardware.com/news/raspberry-pi-pico-tutorials-pinout-everything-you-need-to-know">Raspberry Pi Pico</a> has been with us for just over a month and in this short space of time, there have been many projects for every level of user. But for those just starting their journey with code it can be a little daunting, and this is where block based languages such as Scratch come in to their own. Block-based Integrated Platform for Embedded Systems (BIPES) is a block based coding environment for MicroPython devices and in the <a href="https://rafaelaroca.wordpress.com/2021/03/03/block-based-programming-on-raspberry-pi-pico-with-bipes/">latest release it now supports the Raspberry Pi Pico</a> and other RP2040 based boards.</p><div class="youtube-video" data-nosnippet ><div class="video-aspect-box"><iframe data-lazy-priority="low" data-lazy-src="https://www.youtube-nocookie.com/embed/Tl3IhwwoYqY" allowfullscreen></iframe></div></div><p>The BIPES project was created just over a year ago and it supports many boards such as the ESP8266, ESP32, BBC micro:bit and now the Raspberry Pi Pico and other RP2040 based boards. BIPES works with Google Chrome and writing code for a project is made easy via a <a href="https://bipes.net.br/beta2serial/ui/">web interface</a> which is written in Blockly. Before any code can be written, we first need to enable Experimental Web Platform features in chrome://flags so that we can use Web Serial to talk to the Raspberry Pi Pico, luckily we only have to do this once. </p><p>After setting the board to Raspberry Pi Pico and then connecting to the Pico via the Console tab we have a web REPL (Read Eval Print Loop) interface where we can write MicroPython in the browser and interact with the board. Moving to the Blocks tab we see a range of blocks categorized by their function, and there we can also see special blocks for use with the Raspberry Pi Pico. We took BIPES for a quick test and managed to flash the internal LED of the Pico in just a few minutes.</p><figure class="van-image-figure " data-bordeaux-image-check ><div class='image-full-width-wrapper'><div class='image-widthsetter' style="max-width:1919px;"><p class="vanilla-image-block" style="padding-top:31.53%;"><img id="" name="Screenshot from 2021-03-04 18-12-43.png" alt="BIPES Running on Ubuntu 18.04, flashing the onboard LED" src="https://cdn.mos.cms.futurecdn.net/XD52vcqP2FZL8KtgotLVFY.png" mos="" align="middle" fullscreen="1" width="1919" height="605" attribution="" endorsement="" class="expandable"><a href='https://cdn.mos.cms.futurecdn.net/XD52vcqP2FZL8KtgotLVFY.png' target='_blank' class='expand-button icon-expand-image icon' ></a></p></div></div><figcaption itemprop="caption description" class=""><span class="credit" itemprop="copyrightHolder">(Image credit: Future)</span></figcaption></figure><p>With BIPES we can write block based code, switch to Python to see the real code that makes our project and interact with REPL, all from one browser window. The BIPES blog has a selection of example project to read both digital and analog GPIO pin values, control LEDs with PWM and work with a temperature sensor. </p><p>It is still early days for Raspberry Pi Pico and BIPES, some key functionality, notably managing Python files on the Pico. Right now we can download our block based code as an XML file and share it with others who can upload it to the BIPES site which converts it back to blocks that can be written to another Pico.</p><p>If you&apos;ve already got a Raspberry Pi Pico and some eager makers in your home, then BIPES could be the tool to introduce the world of making to a younger audience.</p><iframe src="https://content.jwplatform.com/players/YdWWS5dA.html" id="YdWWS5dA" title="Raspberry Pi 4 Review: The New Gold Standard for Single-Board Computing" width="1920" height="1080" frameborder="0" scrolling="auto" allowfullscreen></iframe>
                                                            </article>
                            ]]>
                        </content:encoded>
                                                </item>
            </channel>
</rss>