Easter eggs that bring smile on your face

An Easter egg is an intentional inside joke, hidden message or feature in an interactive work such as computer program or video game or DVD menu screen. Easter_Egg_Hunt

The name has been said to evoke the idea of a traditional Easter egg hunt wherein the  decorated eggs, real hard-boiled ones or artificial, filled with or made of chocolate candies, of various sizes, are hidden in various places for children to find. The game may be both indoors and outdoors.


In computer software, Easter eggs are secret responses that occur as a result of an undocumented set of commands.


The ZEN of Python

This is probably the most well-known Python Easter egg. Written by the early core developer of Python Tim Peters, the Easter egg can be invoked by running import this in the Python’s interactive prompt which will list the 19 aphorisms of Python.
import this


The python ‘__future__’ module is meant to list the features that are likely to be added to the python’s future versions but are not ready yet. One of the most asked requests is to have the C-style brace-wrapped scope delimiters instead of the Python’s white-space delimiters. If you try to see the braces are added to Python’s future module, here’s what happens

from __future__ import braces
File "", line 1
SyntaxError: not a chance

Hello World …
There’s a Hello world Easter egg in Python.

import __hello__
Hello world...

This references an XKCD comic. It actually opens a browser and loads the XKCD comic when you run it.

import antigravity


Robots page

Enter About:robots in the URL bar of Firefox and the “Gort! Klaatu barada nikto” page opens.

The Book of Mozilla
About:mozilla is the old Biblical of Firefox and has been changing along with it. As of now it reads:
The twins of Mammon quarrelled. Their warring plunged the world into a new darkness, and the beast abhorred the darkness. So it began to move swiftly, and grew more powerful, and went forth and multiplied. And the beasts brought fire and light to the darkness.

To be quite honest with you, I can’t figure out what it implies.

Linux has some surprisingly funny Easter eggs which I absolutely adore. Some require you to install a package but it’s worth it.


Help to find the meaning of life, the universe and everything

Inside VIM enter the command ‘:help 42’ (without quotes) to get the following

What is the meaning of life, the universe and everything? *42*
Douglas Adams, the only person who knew what this question really was about is
now dead, unfortunately. So now you might wonder what the meaning of death


Next chapter: |usr_43.txt| Using filetypes

Cow of apt-get and aptitude

Apt-get has super cow powers

If you don’t believe me then run the apt-get help.

apt-get help
apt 0.8.16~exp12ubuntu10.15 for i386 compiled on Oct 3 2013 15:03:32
Usage: apt-get [options] command
apt-get [options] install|remove pkg1 [pkg2 ...]
apt-get [options] source pkg1 [pkg2 ...]
See the apt-get(8), sources.list(5) and apt.conf(5) manual
pages for more information and options.
This APT has Super Cow Powers.

That means the it can moo, right?

$apt-get moo

apt-get moo

What about aptitude, the improved version of apt-get? If we ask the aptitude help, we get the following.

aptitude help
aptitude 0.6.6
Usage: aptitude [-S fname] [-u|-i]
aptitude [options] ...
This aptitude does not have Super Cow Powers.

Hmmm… so aptitude claims that it doesn’t have the super cow powers. But what if we ask it to moo?

$ aptitude moo
There are no Easter Eggs in this program.

OK. Maybe we need to ask correctly.

$ sudo aptitude moo
[sudo] password for deepakd:
There are no Easter Eggs in this program.
$ aptitude -v moo
There really are no Easter Eggs in this program.

Now, most people would just stop here. But, a real Easter egg isn’t found by stopping. What if we keep asking for more verbosity?

$ aptitude -vv moo
Didn't I already tell you that there are no Easter Eggs in this program?
$ aptitude -vvv moo
Stop it!
$ aptitude -vvvv moo
Okay, okay, if I give you an Easter Egg, will you go away?
$ aptitude -vvvvv moo
All right, you win.
$ aptitude -vvvvvv moo
What is it? It's an elephant being eaten by a snake, of course.
$ aptitude -vvvvvvv moo
What is it? It's an elephant being eaten by a snake, of course.

aptitude moo

Moral of the story: No is not necessarily no!

About Deepak Devanand

Seeker of knowledge
This entry was posted in Python and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s