Is Python Compiled or Interpreted?
Posted by Al Sweigart in misc
Posted by Al Sweigart in misc
Posted by Al Sweigart in misc
Installing Python modules with the pip tool is surprisingly hard to describe to beginners learning to code. There are several potential issues: multiple Python installations, virtual environments, PATH environment variable settings. You have to introduce command-line terminals and file system navigation, and the differences between Windows and Mac/Linux. However, there is a line of code you can run from the interactive shell to handle all this for you: import pip; pip.main(['install', 'MODULE_NAME_HERE'])
Posted by Al Sweigart in misc
Regular expressions (aka regexes) are a mini-language to specify a pattern of text to look for. However, regex syntax is composed of various punctuation marks that can be hard to remember. Humre is a Python module that gives a more human-readable syntax that works better with code editing tools. You can install Humre just like any other Python module with pip install humre and the full documentation is available in the git repo's README file.
Posted by Al Sweigart in misc
I've been writing programming books for beginners since 2009. All of them are free to read online at InventWithPython.com Many people email me asking which of my books they should read, so I wrote this guide to help beginners get started with my free learning materials.
Posted by Al Sweigart in misc
My new programming book, the Recursive Book of Recursion, is released in August 2022. The book covers several classic recursive algorithms and breaks down recursion's fearsome reputation as a programming technique. The book has the code for its numerous programs in both Python and JavaScript. When you buy it direct from the publisher, No Starch Press, you'll receive a DRM-free ebook copy with your print book order.
Posted by Al Sweigart in misc
Let's look at a simple example of a recursive function to see what it needs at minimum.
Posted by Al Sweigart in misc
Here's the boilerplate that you can copy and paste when creating a new web page with Bootstrap 5.
Posted by Al Sweigart in misc
Fractal Art Maker has been upgraded and is now covered in this new blog post.
Posted by Al Sweigart in misc
Python 3.11 will include a TOML parsing module called tomllib. Let's learn what TOML files are (they're similar to JSON), how they're useful for configuration files, and how you can write Python code to read them.
Posted by Al Sweigart in misc