Strict Standards: Declaration of Walker_Comment::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/public/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/public/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::start_el() should be compatible with Walker::start_el(&$output) in /home/public/wp-includes/comment-template.php on line 1266

Strict Standards: Declaration of Walker_Comment::end_el() should be compatible with Walker::end_el(&$output) in /home/public/wp-includes/comment-template.php on line 1266

Strict Standards: Redefining already defined constructor for class WP_Dependencies in /home/public/wp-includes/class.wp-dependencies.php on line 31

Strict Standards: Redefining already defined constructor for class WP_Http in /home/public/wp-includes/http.php on line 61
Henry’s Python Programming Guide - Part 1 @ Henry the Adequate
My name is Henry the Adequate, and I am a superhero
RSS icon Home icon
  • Henry’s Python Programming Guide - Part 1

    Posted on May 22nd, 2006 Ben 123 comments

    My name is Henry the Adequate, and I am a Python programming Guru. I know all of their movies, and their TV shows, and can quote the dead parrot sketch in my sleep. In fact I do quote it in my sleep. That may explain why I am single, although it could also have something to do with the flamethrower.

    Naturally many old-timers want to know what this new-fangled Python thing is all about. “Henry,” they say, “What is this new-fangled Python thing all about?” See what i mean? So, here, at last, is the article you have all been waiting for…

    What is Python?
    Python is the really neat computer programming thingy, based heavily on Monty Python’s Flying Circus, which was invented by those really funny guys, Monty Python. Lucky for them it was called Monty Python’s Flying Circus, because it would have been really inconvenient and confusing if it were called John Howard’s Flying Circus, or something like that.

    Python is “Object Oriented”. This means that if you are from the far east you are probably going to object to using Python. Nobody knows why. It’s just one of those useless statistics.

    Python is an interpreted language, so you’re going to need to pay some guy who speaks lots of languages to hang around and tell you what it means.

    Python has dynamic typing, and dynamic binding, which means that not only does it make a great secretary, it is also pretty damn kinky. If you’re into that sort of thing.

    In Python indentation determines scope. This breaks with naval tradition, in which it is the captain decides who gets to use the periscope next. Python also breaks with recent computer programming convention, because apparently it is usually the guy with the braces gets to decide. Damn teenagers.

    Python has exception handling. I can’t think of anything funny to say about this.

    Apparently Python can do just about anything. I told it to “feed the cat”, but there was some kind of error. Perhaps if I’d told it to Cat.feed(now) things might have been better.

    Python does garbage collection. Well, it’s a job, you know.

    Getting Started
    The first, and most important, thing you need to do is race out right now and buy the entire Monty Python mega ultra box set and watch them all right away. Don’t sleep. Don’t eat. Just watch python until your eyes bulge out of their sockets like a really furious John Cleese impersonator, and your brain hurts. You can get it from Amazon. Do it now. I’ll wait a bit.

    The next thing, now that you really understand the philosophical and intellectual origins of Python, is to install the computer Python thingy on your computer. Actually many of you will already have it installed, because Python is really popular - especially Life of Brian. Oh, and Fawlty Towers. Yes, I know it was not a Python thing, but it’s still John Cleese, so shut up.

    Anyway, if you don’t have Python installed it is usually pretty easy to get. Depending on your distribution it’s just a matter of “apt-get install python” (Debian based distros), “yum install python”, “up2date python”, “emerge python”, “yast2 you are the worst installer ever. I hate you hate you hate you”. Sorry, you should probably disregard that last one. You could also install something called “idle”, which is named after one of the Monty Python guys - Graham Chapman I think it was.

    Using Python
    There are lots of good tutorials on the basics of programming in this unique and really funny language. I particularly liked the bit in “Live at the Hollywood Bowl” where Eric Idle goes on and on about his holiday. That was great. For other examples, you can look over on

    Instead of rehashing any of this stuff I am going to discuss the hidden features that make it so powerful for Python gurus like myself.

    1. Speeding up Python: Type the following command, or include it in your program, but without the quotes, “I didn’t ExPecT a kind of Spanish Inquisition”. This enables hyper turbo mode. An alternative command is “No time to lose”, but you need to say it in a really funny voice, and that requires voice recognition software, and a microphone.
    2. Turn on Auto Code: Python’s secret and highly experimental Auto Code feature allows the clever programmer to go to the pub while his computer does all the work. To enable Auto Code, just write a TODO list in plain English, and run the following command: “Manuel! < todo.txt”. Disable Auto Code with “He’s from Barcelona”. Yes, I know it’s from Fawlty Towers. Shut up.
    3. Microsoft Word: Python has an embedded version of Microsoft word. To Access this WYSIWYG text editor, just type “Dead Parrot” while running Python interractively.

    Sample code
    The following Python code is from a project I am working on. It is not fully debugged just yet, but is still pretty damn good, because I am Henry the Adequate, superhero, and python programming guru.

    if Henry wants coffee:
         make some coffee please,
         and also some of those yummy donuts.
    Or else maybe you could offer tea.

    It’s a work in progress. I’m sure the bugs will be sorted out soon.

    Python is a great and powerful computer thingy. It is fun to use, and allows the program making person to be really productive while at the same time watching some of those wacky pythonesque cartoons.

    Need help with computer stuff? Henry can help. I promise a timely and definitive response to any technical question asked in the comments here.

    promise - vaguely suggest that something might happen, if you’re really really lucky.
    timely - If it occurs at all it will be within the context of the space-time continuum.
    definitive - My response may contain some definitions, such as these.


    123 responses to “Henry’s Python Programming Guide - Part 1”

    1. I find Python far too dangerous to use. I prefer the much more user-friendly and less lethal Garter Snake.

    2. Does Henry give the Full Monty? ooops, can this be construed as a technical question, seeing on how you love Ms. Construe?

    3. are we boring you?

    4. This is part 1. This leave me to ask a couple questions -
      Where is part 2?
      Will part 2 be funny (like some other article), technical (like yet some other article), or neither (like this article)?

      spam, spam, spam, spam,
      spam, spam, spam, spam
      spaaaaaaam, wonderful spaaaaaaam

    5. Great article. Reminds me somehow of Mr. Bunny, the great programming language teacher.

    6. yeah, um.. this was not so funny.

    7. Dude you just made the front page of Prepare for a slashdotting.
      In other news: I’m afraid I don’t know anything more about either kind of python after reading your article… ;(
      Djeff out.

    8. Guru Programmer

      I don’t think you’re a guru programmer at all, because you’d be recommending Ruby. Ruby is a much better language, and even RubyOnRails beats any python based project at popularity.

    9. Man.. Even after reading your enlightening guide, every time I sit down and start writing a Python app, this !@#$!% white rabbit keeps going under my desk and biting my feet! I can’t explain it, but I *can* say that it’s got very large teeth. Stupid rabbit. Maybe I should just stick to QBasic. @$#@$%#!

    10. This was useless. Utterly useless and not funny. I apologize for being blunt, but please learn to write better, longer articles before submitting them to slashdot and wasting everyone’s time. KTHXBYE. =D

    11. Exception handling in Python has to be very good, because nobody expects the Spanish Inquisition. If “feed cat” doesn’t work, you need to go to the room with the large rock and say “y2″ or “plover”.

    12. Perhaps I can lend some assistance with the nuances of Python’s exception handling. Since every “exception proves the rule,” languages that allow exceptions obviously have rules. They enforce contrived and unnecesarily strict syntactical requirements. Python, however, handles the exceptions, so there aren’t any rules. This is why commands like the one from your example:

      make some coffee please

      are perfectly acceptable.

    13. Dear Henry,

      Your article “Henry’s Python Programming Guide - Part 1″ infringes our parties patent on zany comedic norms. You will be hearing from our lawyers in due course.

      – The office of Sir John Cleese

    14. you are a tard

    15. Itomeshi Hitoma

      Can we calculate the airspeed velocity of an unladen swallow using Python? Some example code, please.

    16. To sort out the bugs, cover the donuts and dispense with the coffee.
      I’ll have lemon with my tea please…fresh cup!

      And a very merry unbirthday to me!

    17. NOBODY expects a funny python review.

    18. Why sell snake oil when you can sell the snake

    19. What a complete and utter pile of tripe. You should go write a Hollywood movie now, you obviously know how to turn one 30-second SNL skit into a 2-hour epic.

    20. SlashdotReader

      Not funny, guy.

    21. I heard that Python did some cool stuff, and now my fears are realized. I’m going to silly-walk my way down to the Office and get on the dole.

    22. you suck at jokes.

    23. this is a sad waste of online space, the only usable information i found in that article( i already knew…sigh

    24. We already got one!

    25. I love getting conned by Slashdot.

    26. [...] Henry the Adequate’s Python Programming Guide - Part 1: My name is Henry the Adequate, and I am a Python programming Guru. I know all of their movies, and their TV shows, and can quote the dead parrot sketch in my sleep. In fact I do quote it in my sleep. That may explain why I am single, although it could also have something to do with the flamethrower. [...]

    27. I found this article refreshing. Yes, I learned quite a lot from reading this rubbish. Now for something completely different.

    28. Robby Ricardo Ruiz Sanchez

      Python Schmython…

    29. Saw the Python and got really sea sick. So I slipped on my Ruby slippers and now I dance all day long.

    30. Laugh? I nearly shat…

    31. What do you mean? An African or European python?

    32. Was this supposed to be funny?

    33. Looking forward to your series on Python++

    34. So suddenly, it all makes sense:

      Bjarne Stroustrup was the black sheep of the Python crew, was sent to exile and created a spin-off to bring pain to million of people’s life!

      Now I finally do understand the real meaning of partial template specialization and diamond-shaped multiple inheritance!

    35. In python, how do you call functions? Also, is there an ni function?

    36. Something you may want to note, is that after doing some definitive testing, while it is not mentioned in the above text, when using the alternative text for ‘No time to lose’ contrary to popular belief, you do not need two turn tables and a microphone, the microphone itself suffices.

    37. not funny

    38. But how can Python do a funny walk with no feet?

    39. “You’re not fooling anyone, you know.”

    40. He who approacheth the bridge of death must answer me these questions 3..ere the other side he see.

      1. What is a Parrot?
      2. What is a Python?
      3. What is the air speed of an unladen Swallow?

    41. you suck as does your article.

    42. Well, looks like you’re all about to get unbored, seeing how you’re featured on slashdot.

      Read on I will.

    43. this was pretty confusing, like the “I didn’t ExPecT a kind of Spanish Inquisition” part, thats not real, same with auto code, your just confusing the newbie

    44. [...] Henry’s Python Programming Guide seems to be getting some buzz. [...]

    45. ignore this slashdot dorks!

      keep your good work henry ;)

      let them get a LIFE!

    46. worst post evar

    47. Thanks for wasting my time!

    48. Imagine my surprise upon returning from my cross-country ascent of U.S. Hwy 80 to find this completely useful and now unnecessy guide, since I’ve already made the ascent and now no longer need a guide. Unfortunately, fresh fruit is not good enough for some readers of /. Oh no, no, no. Well, when some hack with a handful of undeclared variables jumps out at them in a dark alley, they won’t know what hit them. Pointed sticks, eh? Don’t come crying to me.

      “Yes? Karl Marx?”

      “The programmers control the means of injection.”

      “No, I’m afraid you are incorrect. The correct answer is, of course, Bill Clinton.”

      Of course, if some /.ers had real lives, they might find something useful in something as simple and ordinary as a good laugh. A nice shrubbery. Or a prolonged squawk. Instead, they come here looking for a good argument.

      “This isn’t an argument, it’s just an exposition.”

      I, for one, found Henry the Adequate’s descriptives most adequate for a Monday afternoon.

      “The Knights Who Say Ni! have nothing left to say to you …. Now! Go!”

    49. Thank goodness you’ve posted this, I’ve needed to improve my python skillz for sometime now.

    50. UnbiasedReviewer

      Lame and unamusing. Curse /. for wasting my time with a link to this.

    51. That was hilarious! XD
      Ignore the sarcasm and flaming of some other posters, just do your thing.
      Eagerly awaiting part 2 of this nonsensical “guide”! :D

    52. let’s start using python!

    53. Well, that was hilarious. And if people can’t, don’t or won’t get the joke, then they’re either too young, too old or too stupid.

      Thanks for the laughs.

    54. blame slashdot and tuxmachines for tagging your blog :)
      It’s funny though :)

    55. Hey slashdorks, Always look on the bright side of life, do do…, when is the last time you did anything creative. Oh yeah other than complaining about sites going down after getting posted on “/.” I am really getting tired of nerd egos running rampant on the internet.

    56. ./judochop

    57. Johann Gambolputty.... von Hautkopf of Ulm

      Do you eh…write these things often eh? Know what I mean? Know what I mean? Nudge nudge. Nudge nudge. Know what I mean? Say no more…know what I mean? Eh? Eh?

      this was most definitely a highly informative in quite comical discourse. Rember, you can’t fool me, because I’m Dim.

      to all flamers: you’re no fun anymore!

      And now, the news for gibbons…

    58. MY HERO !

    59. Hi,

      I was planning to become a python guru. Now I’m enlighted to follow the path :-D


    60. Im gay, and I really like your story. Please write another one…PLEASE, I BEG YOU, I HAVE NO LIFE. THIS IS ALL I HAVE. Thank you for part 1, my life has meaning for another 5 seconds.

    61. Graham Chapman

      And now for something completely different
      A man with a tape recorder in his nose

    62. I found the article to be quite amusing, though I was disapointed by the shortness and lack of technical information. That doesn’t mean the article is horrible/terrible/the black plague/etc…(Bring out CHer dead!!). The last couple lines state “work in progress” and the “part 1″ (at the top) would lend credence to an unfinished work…Combine that with the article oviously being geared more towards comedy than technicalities and you get an amusing read.

    63. /. tricked me to come to this site

    64. Nice read, however, my feet are cold and my brain is nicely toasted.

    65. I have six words for you…

    66. Man, you slay me. I may add your rss feed to my google start page. Keep it up!


    67. 1) The article is funny.
      2) This article belongs on slashdot, it is no trick.
      3) There is NOOOOOOOOOOOOOOO … number 3.
      4) Busy day!
      4.5) Busy? I just spent 4 hours burying the cat.
      5) Four hours to bury the cat?
      6) Yes, wouldn’t keep still, howlin’ about ‘n all.
      7) Oh it wasn’t quite dead then?
      8) No, no. Goin away a fortnight, thought we’d bury it just to be sure.
      9) Quite right, don’t want to be coming home from vaction to a dead cat.

    68. Trust the ruby fan to miss the point…

    69. I rewrote your sample program in Perl:


      you’re welcome.

    70. eh?

    71. Hilarious … thanks! :D

    72. Disregard the naysayers - that was dead funny :)

    73. crash, burn.

    74. Fuck. Not funny, *and* a complete waste of time. I don’t blame you, but ScuttleMonkey’s an asshole for posting this link on slashdot.

    75. Why Henry? Why???

    76. inane article

    77. NotBill Gates

      African or European?

    78. Now I hold the key to the mighty python.
      all slashdotters, be afraid, be very afraid,

      you punts

    79. Bryan of Nazareth

      Aaaah, python, a nice woody sort of word …

    80. 77 responses in 7 hours? henry you are my hero!
      maybe you should also have here a pdf copy of your guide, for download.

      yast2 rulez

    81. As a longtime slashdot reader, Monty python fan and python programmer I must say that I found your piece funny. As for the lot here who appear not to appreciate your jokes It may be that they bought my Hungarian phrase book.

    82. Please remove yourself from the internet.

    83. There should be room in this wonderful world of ours for both Ruby and Python. And whatever makes you laugh can only make you stronger.

    84. Ah don’ wanna talk to you no more, you empty-headed animal food-trough wiper! Ah fart in your general direction! Your mother was a hamster, and your father smelt of elderberries!

      Now go away, or I shall taunt you a second time!

      Defeat at the castle seems to have utterly disheartened King Arthur. The ferocity of the French taunting took him completely by suprise

    85. Well, you have made me snicker, and then giggle like a little pack of schoolgirls. (mmmm, schoolgirls…).

      Tough biscuits for the pontz’s that “wasted their time” coming here or were diddled by the great Dot of Slash to come to a site, which, from the short intro shown on said Dot, was obviously going to be more lighthearted than technical. I mean, it doesn’t take a genius to figure that out — a child could (and you can buy them for very little these days from down-and-out hookers, so no-one has an excuse).

      Yes, I would like this to be developed into a full book-type-thingy, with a lot more technical reference (because I find the language fascinating), but with no less diversion from the straight road of rigid language specification — a little laugh makes the facts so much easier to swallow. Mary Poppins had something similar to say.

      Good work, eh. And big “up-yours” to (1) people who have nothing better to do than post a complaint about how the site wasn’t up to their level of technicality (when it was obviously at least part spoof from a mere glance), and (2) people who assume that just because I came here from The Dot, I am a “slashdork”. I, for one, am quite glad that the MonkeyScuttler did post this site on The Dot, since it provided me with a mini-laugh or three, or seven.

      And finally: pants.

    86. “\o/” :-)

    87. I don’t use Python, but Monty. Monty has the advantage that it is comepletely sex-object-oriented. It doesn’t run on a PC for the simple reason that it is not PC. There are a few different versions: Tiny Monty, Full Monty and the ‘Oh my dear god’ Monty. The latter one makes Python look like a peeled shrimp.

      I know that scoping is a weak point with Python. Scoping is a strength of Mon ty (so called ‘micro-scoping’). Scoping can also be done from a remote computer (so called ‘tele-scoping’). Most computer languages aim to make small and speedy programs. Since Monty is SOO, it makes BIG and SLOW programs.

      We don’t like interpreters. Interpreters are imprecise and too verbose. Monty makes a compilation of every single Monty program on the computer (or elsewhere, when this computer is connected to the internet). At runtime, the user can choose what he wants to do exactly, from running a word processor to ‘Hello world’. If that isn’t a KISS, what is.

      Monty is a very personal language. Every variable has a first name, e.g. I always start my programs with ‘My Dick’. You may also include remote variables, even if they bear the same name, e.g. ‘Your Dick’. Of course there are a number of operators, e.g. for comparison, e.g.

      If (Your Dick > My Dick) then {}

      After having been indented too many times, Monty now needs braces.

    88. My hovercraft is full of eels!!!!!

      My nipples explode with delight!!!!

    89. Well, I laughed. FU to the /. peeps. ;)

    90. Oh, the ridiculousness of it all:

      “Apparently Python can do just about anything. I told it to “feed the cat”, but there was some kind of error. Perhaps if I’d told it to Cat.feed(now) things might have been better.”

      *rolls eyes*

    91. That’s a few more comments than I am used to. Sadly I am unable to respond to all of you individually. Instead I will divide you into a few arbitrary categories, as follows.

      My regulars:
      You give me wind.

      “Lame” “Not funny” “You suck”, etc:
      I am humbled by both your eloquence and your creativity. You guys should be word writing thingy persons.

      This is funny:

      Where is part two:
      Uh… Not written yet. There may be a part two. Or… this may help.

      Finally, there is the larger group who make me look bad (Ok, that’s not difficult) by suggesting much funnier Monty Python references:
      ***SOB*** I hope you chooks turn into emus and kick your dunny down.

    92. Uh… sorry… I mean

      My regulars:
      You are the wind beneath my wings. Sorry.

    93. From reading your interesting document, I could not understand if and which things python have which are better than in ALGOL60 what I use until now, can you explain this better ? My progs likeÜbersetzer/jff-a2c-2.1.1/test/ex2.alg
      would also run with python ?


    94. corrected the link in my question:Übersetzer/jff-a2c-2.1.1/test/ex2.alg

    95. I’m touched, and speaking on behalf of Mr. Fab - because the vast number of technoviolent responses will scare him deep in his deep womanly soft squeeshy space - I know he’ll be touched too, that we were remembered through this maelstrom of comments to Henry’s Python Programming Guide - Part 1.

      Did I mention I dread Part 2?

    96. corrected link in my question:Übersetzer/jff-a2c-2.1.1/test/ex2.alg
      (The link is OK but when the browser dont reach there, pls go to root and then click the next subdirs)

    97. Wow. This certainly caused a commotion. I read through the whole thing with a chuckle every now and then, which is quite a feat since tech guides usually bore me to tears. Some peeps need to lighten up and get out of geek mode.

    98. To all ye Nah say’ers

      All I have to say is “Ni!!!”

      Wounderfull article , keep it comming, however the swallows may need to bring in the next one

    99. OldGuyClosingOnCamera


    100. what a complete waste of time!

      wink wink, nudge nudge.

    101. Mr Whoooosh!!!!!

      My Hovercraft is Full of EEls.

      What about VB 2005 (Express Edition).

      I will not buy this record it is scratched!

    102. are you serious?

      To someone who has no clue what Python is, they wouldn’t be able to distinguish between language references and Monty Python references. Not cool.

      I hope you were wishing to get a myriad of replies from Henry fanboys and unimpressed first-timers… cause you have.

    103. fishinyourdrink

      - I wish to complain about this slashdotter what I purchased not half an hour ago from this very boutique.

      + Oh yes, the, uh, the Smelly Troll… What’s,uh…What’s wrong with it?

      - I’ll tell you what’s wrong with it, my lad. ‘E doesn’t have a life, that’s what’s wrong with it!

    104. African or European?

    105. A couple of observations…
      1. About half of all computer geeks must have done “remdir ./Humor”.
      Probably needed the sotrage for more program code.
      2. This was the most fun I’ve had with programming…ever.

      I sincerely do hope there is a Part 2.

    106. For this worthless article, may you be charged unreasonable and unfair amounts of money for your bandwidth…

    107. Well you just have to know these things when you’re king


    109. Best “computer thingy” article I’ve ever read. I am soooo going to start using python - thanx for sending me here /.

      To the haters:
      Get over yourselves, no one cares what you think.

      To the “Monty” guy:
      uhhhhh… what?!

    110. I love the /. ‘ers who bitch that their time was wasted *yet* they had time to write and complain about it. How can one go through life being so unhappy and pathetic? Smile people and enjoy your life, its the only one you get.

    111. 110 comments that’s disgusting. Want a coffee?

    112. Perhaps if you built a large wooden badger . ..

    113. Can you show me how to write a python script to CONFUSE A CAT?

    114. [...] Henry’s Python Programming Guide is a humourous guide to the Python programming language. [...]

    115. I learned absolutely nothing about programming from reading your so-called guide. Go jump in a lake you twit.

    116. [...] [...]

    117. ‘Go jump in a lake you twit’, Some guy named Steve said that… LOL

    118. Can I share some resources with you?

    119. What?

    120. tenuate…

      Also on censorship, Welease Bwian is an interesting piece about the making and censoring of Monty Python’s Life of Brian…

    121. This site is a lot of fun very well designed.

    122. Henry the Adequate is obviously smarter than the nincompoops who left disparaging comments about his work. Leave him alone. I program with Python and was close to my wits end on what should have been an easy bit of code. Believe it or not, while belly-laughing at HTA’s exposition, the answer came to me.

      Go on with your bad self Henry and to all the other ‘haters’:

      I fart in your general direction.

    123. Ruby Ruby Ruby, whoops sorry I love Python now - forgot.