There are many graphical user interface (GUI) toolkits that you can use with the Python programming language. The big three are Tkinter, wxPython, and PyQt. Each of these toolkits will work with Windows, macOS, and Linux, with PyQt having the additional capability of working on mobile. A graphical user interface is an application that has […]
Understanding the Python Mock Object Library
When you’re writing robust code, tests are essential for verifying that your application logic is correct, reliable, and efficient. However, the value of your tests depends on how well they demonstrate these criteria. Obstacles such as complex logic and unpredictable dependencies make writing valuable tests difficult. The Python mock object library, unittest.mock, can help you […]
Managing Multiple Python Versions With pyenv
Have you ever wanted to contribute to a project that supports multiple versions of Python but aren’t sure how you would easily test all the versions? Are you ever curious about the latest and greatest versions of Python? Maybe you’d like to try out these new features, but you don’t want to worry about messing […]
Writing Comments in Python
Learn how to write Python comments that are clean, concise, and useful. Quickly get up to speed on what the best practices are, which types of comments it’s best to avoid, and how you can practice writing cleaner comments. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python […]
Making HTTP Requests With Python
The requests library is the de facto standard for making HTTP requests in Python. It abstracts the complexities of making requests behind a beautiful, simple API so that you can focus on interacting with services and consuming data in your application. Throughout this course, you’ll see some of the most useful features that requests has […]
Using PyInstaller to Easily Distribute Python Applications
Are you jealous of Go developers building an executable and easily shipping it to users? Wouldn’t it be great if your users could run your application without installing anything? That is the dream, and PyInstaller is one way to get there in the Python ecosystem. There are countless tutorials on how to set up virtual […]
Introduction to Python Exceptions
A Python program terminates as soon as it encounters an error. In Python, an error can be a syntax error or an exception. In this course, you will see what an exception is and how it differs from a syntax error. After that, you will learn about raising exceptions and making assertions. Then, you’ll finish […]
Writing Beautiful Pythonic Code With PEP 8
Learn how to write high-quality, readable code by using the Python style guidelines laid out in PEP 8. Following these guidelines helps you make a great impression when sharing your work with potential employers and collaborators. This course outlines the key guidelines laid out in PEP 8. It’s aimed at beginner to intermediate programmers. [ […]
Python 3’s f-Strings: An Improved String Formatting Syntax
As of Python 3.6, f-strings are a great new way to format strings. Not only are they more readable, more concise, and less prone to error than other ways of formatting, but they are also faster! By the end of this course, you’ll know how and why to start using f-strings today. [ Improve Your […]
psutil 5.6.0 with Process.parents() is out
Hello world, =) It was a long time since my last blog post (over 1 year and a half). During this time I moved between Italy, Prague and Shenzhen (China), and also contributed a couple of nice patches for Python I want to blog about when Python 3.8 will be out: zero-copy for shutil.copy*() functions […]
Refactoring Python Applications for Simplicity
Do you want simpler Python code? You always start a project with the best intentions, a clean codebase, and a nice structure. But over time, there are changes to your apps, and things can get a little messy. If you can write and maintain clean, simple Python code, then it’ll save you lots of time […]
Idiomatic Python 101
Python Idioms for people coming from other languages and how to improve your idiomatic practices with Python. We will cover things to do with string concatenation, dictionary look ups, dealing with Python scripts, encoding, and for loops. Note: This course uses Python 2.7 in its coding examples. Resources: Writing Idiomatic Python Python Guide [ Improve […]
Pythonic OOP String Conversion: __repr__ vs __str__
In this tutorial series you’ll do a deep dive on how Python’s to-string conversion using the __repr__ and __str__ “magic methods” works and how you can add implement them in your own classes and objects. When you define a custom class in Python and then try to print one of its instances to the console […]
Test-Driven Development With PyTest
In this hands-on course, you’ll see how to create Python unit tests, execute them, and find the bugs before your users do. You’ll learn about the tools available to write and execute tests, check your application’s performance, and even look for security issues. Resources TDD Project Sample Code [ Improve Your Python With 🐍 Python Tricks 💌 […]
Introduction to Pandas and Vincent
Get an introduction to Pandas and its two main data structures as well as how to visualize your data using Vincent once you are done munging it with Pandas. Note: This course uses Python 2.7 in its coding examples. [ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python […]