Programming 

PyCoder’s Weekly: Issue #405 (Jan. 28, 2020)

#405 – JANUARY 28, 2020 View in Browser » Python GUI Programming With Tkinter In this article, you’ll learn the basics of GUI programming with Tkinter, the de-facto Python GUI framework. Master GUI programming concepts such as widgets, geometry managers, and event handlers. Then, put it all together by building two applications: a temperature converter and a text editor. REAL PYTHON Pythonic Code Review [2016] “In this article I’ll focus on my personal experience in authoring and reviewing Python code from both psychological and technical perspectives. And I’ll do so…

Read More
Programming 

PyCharm: PyCharm 2020.1 EAP starts now

There are two types of people in the world: those who can wait to open a package they’ve received, and people like me, who need to see what’s inside this very second. PyCharm isn’t delivered in the mail though, and that’s why we have something even better for impatient people. The early access program (EAP) shows you what’s in the package a couple months before you get it. Take a sneak peek, and get PyCharm’s first EAP now! New in PyCharm JetBrains Mono We recently announced our font designed especially…

Read More
Programming 

Python GUI Programming With Tkinter

Python has a lot of GUI frameworks, but Tkinter is the only framework that’s built into the Python standard library. Tkinter has several strengths. It’s cross-platform, so the same code works on Windows, macOS, and Linux. Visual elements are rendered using native operating system elements, so applications built with Tkinter look like they belong on the platform where they’re run. Although Tkinter is considered the de-facto Python GUI framework, it’s not without criticism. One notable criticism is that GUIs built with Tkinter look outdated. If you want a shiny, modern…

Read More
Programming 

Python Re Dot

You’re about to learn one of the most frequently used regex operators: the dot regex . in Python’s re library. What’s the Dot Regex in Python’s Re Library? The dot regex . matches all characters except the newline character. For example, the regular expression ‘…’ matches strings ‘hey’ and ‘tom’. But it does not match the string ‘yo\ntom’ which contains the newline character ‘\n’. Let’s study some basic examples to help you gain a deeper understanding. >>> import re >>> >>> text = ”’But then I saw no harm, and…

Read More
Programming 

Python Re ? Quantifier

Congratulations, you’re about to learn one of the most frequently used regex operators: the question mark quantifier A?. In particular, this article is all about the ? quantifier in Python’s re library. What’s the Python Re ? Quantifier When applied to regular expression A, Python’s A? quantifier matches either zero or one occurrences of A. The ? quantifier always applies only to the preceding regular expression. For example, the regular expression ‘hey?’ matches both strings ‘he’ and ‘hey’. But it does not match the empty string because the ? quantifier does…

Read More

Python Regex Sub

Do you want to replace all occurrences of a pattern in a string? You’re in the right place! This article is all about the re.sub(pattern, string) method of Python’s re library. Let’s answer the following question: How Does re.sub() Work in Python? The re.sub(pattern, repl, string, count=0, flags=0) method returns a new string where all occurrences of the pattern in the old string are replaced by repl. Here’s a minimal example: >>> import re >>> text = ‘C++ is the best language. C++ rocks!’ >>> re.sub(‘C\+\+’, ‘Python’, text) ‘Python is the…

Read More
Programming 

PyCoder’s Weekly: Issue #403 (Jan. 14, 2020)

#403 – JANUARY 14, 2020 View in Browser » A coverage.py Debugging Story Ned was getting reports for a mysterious disk I/O bug in the latest coverage.py release and asked the community for help. Read the crowd-sourced diagnosis on Hacker News and Ned’s follow-up post next. What a journey… NED BATCHELDER The “No Code” Delusion “2020 is going to be the year of ‘no code’: the movement that say you can write business logic and even entire applications without having the training of a software developer. I empathise with people…

Read More
Programming 

PyDev of the Week: Tyler Reddy

This week we welcome Tyler Reddy (@Tyler_Reddy) as our PyDev of the Week! Tyler is a core developer of Scipy and Numpy. He has also worked on the MDAnalysis library, which is for particle physics simulation analysis. If you’re interested in seeing some of his contributions, you can check out his Github profile. Let’s spend some time getting to know Tyler better! Can you tell us a little about yourself (hobbies, education, etc): I grew up in Dartmouth, Nova Scotia, Canada and stayed there until my late twenties. My Bachelor…

Read More
Programming 

Using Pandas and Python to Explore Your Dataset

Do you have a large dataset that’s full of interesting insights, but you’re not sure where to start exploring it? Has your boss asked you to generate some statistics from it, but they’re not so easy to extract? These are precisely the use cases where Pandas and Python can help you! With these tools, you’ll be able to slice a large dataset down into manageable parts and glean insight from that information. In this tutorial, you’ll learn how to: Calculate metrics about your data Perform basic queries and aggregations Discover…

Read More

PyDev of the Week: Bryan Weber

This week we welcome Bryan Weber (@darthbith) as our PyDev of the Week! Bryan is a contributor for Real Python and a core developer for Cantera. If you’d like to learn more about Bryan, you can check out his website or his Github profile. Let’s take a few moment to get to know him better! Can you tell us a little about yourself (hobbies, education, etc): I am a teaching professor at the University of Connecticut, as well as the Director of Undergraduate Studies for Mechanical Engineering. This means that…

Read More