Skip to main content

🐍 - Write Python with Emojis

Project description

🐍 - Write Python with Emojis

Write Python code using emojis 🐍


Marc Garcia gave a wonderful lightning talk at EuroSciPy 2018 in Trento, where he pointed out some obvious deficiencies in Python's handling of unicode. For instance, code like the following is not supported:

import pandas as 🐼


🐍 is available on PyPI. Install it with pip:

$ python -m pip install pythonji

Using 🐍

🐍 installs as pythonji. 🐍 code files have the suffix .🐍. You can run a 🐍 code file as follows:

$ pythonji file.🐍


Save the following code to the file 🐼.🐍:

import pandas as 🐼

# Define a dataframe and print it to the console
🐍 = 🐼.DataFrame(
        "animal": ["Panda", "Python", "Lion"],
        "πŸ˜€": ["🐼", "🐍", "🦁"],
        "number": [1, 2, 3],

# Do some arithmetic with the dataframe
πŸ”€ = f" Pythonji {' '.join(🐍.index)}"
πŸ”’ = 🐍.loc["🐍"].number + 🐍.loc["🐼"].number
print(πŸ”€ * πŸ”’)

You can run the code as follows:

$ pythonji 🐼.🐍 
   animal  number
🐼   Panda       1
🐍  Python       2
🦁    Lion       3
 Pythonji 🐼 🐍 🦁 Pythonji 🐼 🐍 🦁 Pythonji 🐼 🐍 🦁


  • 🐍 currently only handles single script files. It can import any regular Python module, but unfortunately not 🐍 modules.
  • Sadly, pip does not currently handle unicode command names. Ideally, we want the executable to be named 🐍 instead of pythonji.
  • Black unfortunately can not handle 🐍 code. Does anybody want to contribute to ⬛, a formatter for 🐍?

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pythonji, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size pythonji-0.1.1-py3-none-any.whl (5.3 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size pythonji-0.1.1.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page