PyData Boston 2025

Fun With Python and Emoji: What Might Adding Pictures to Text Programming Languages Look Like?
2025-12-10 , Thomas Paul

We all mix pictures, emojis and text freely in our communications. So, why not in our code? This session takes a whimsical look at what mixing emoji with Python and SQL might look like (spoiler alert: a lot like those "rebus" stories in Highlights Magazine for Kids!). We'll discuss the benefits of doing so, challenges that emoji present, and demo a rudimentary Python preprocessor that intercepts Python and SQL code containing emojis submitted from Jupyter notebooks and translates it back into text-only code using an emoji-to-text dictionary before passing it on to Python for execution. This session is intended for all levels of programmers.


A WORKING OUTLINE
Fun With Python and Emoji: What Might Adding Pictures to Text Programming Languages Look Like?

Intro
• Highlights For Kids - Rebus Stories
• Pictograms in Our Everyday World - Texting, I Love NY Logo, Apple Macintosh UI (Susan Hare)
• Symbols in Programming Languages - APL, IBM Dialog Manager
• Benefits Offered by Emojis - System and User-Defined Abbreviations (One-Character "Macros"), Syntax Highlighting, More Approachable Coding & Fun!

What Might Emoji-Flavored Python/SQL Code Look Like?
• A User-Definable Emoji-to-Text Dictionary (Maps Emoji to Statements/Keywords, Variables/Functions, Other General Text)
• Sample Python + Emoji Code Snippets
• Sample SQL-In-Python + Emoji Code Snippets (DuckDB)

A Quick Unicode/Emoji Primer
• Unicode
• Emoji/Graphemes
• Built-In Python Unicode Support and Limitations

A Simple Jupyter Notebook-Based Prototype Using a Python-Based Emoji Preprocessor
• Parsing Graphemes Using the regex Package
• Using Jupyter Input Transformers to Translate Emoji to Text at Code Submission Time
• Let's See It In Action! (Recorded or Live Demo)

Conclusion, Q&A


Prior Knowledge Expected: No previous knowledge expected

Ted Conway is a Data Analyst working in the financial sector. Ted studied Computer Science at the University of Illinois and DePaul University.