Sunday, February 25, 2007

Ctrl-D to Quit

As a programmer most of my time is currently spent working in C and DCL (on VMS), bash scripts, and PHP/Javascript/HTML, with a little CBuilder and Delphi thrown in.

Occasionally I use Python, but not for software development. I use Python as a calculator.

Here's a typical session:
# python
Python 2.4.4 (#2, Jan 13 2007, 17:50:26)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 3897 + 705
4602
>>> 4600 * 0.75
3450.0
>>> quit
'Use Ctrl-D (i.e. EOF) to exit.'
>>>

Python is really clever. Python knows that when I type "quit" I wish to exit from the interpreter. Python, however, refuses to accept this request, but instead suggests that I type Ctrl-D to exit. If Python knows what I mean by "quit", well, then, why not just, you know, do it. This cracks me up every time, which shows how easily amused I am.

22 comments:

Windfall Woman said...

This kind of technical prowess is so scintillating.

Ben said...

Hey, this is a geek zone. No hot movie star types allowed. Sorry.

Windfall Woman said...

MMMMm. Thank you for calling me hot. You are monopolized on your other blogs.

Ben said...

You're welcome :) I can handle more than one at a time you know. (Commenter I mean. Really)

Windfall Woman said...

I came in here just to get my geek fix.

Ben said...

Ah, well, that's all right then. Glad to be of service.

Windfall Woman said...

Does that service come with a smile??

Ben said...

I claim that it does, and who can tell? That's the great thing about the internet. Well, that and the porn.

Windfall Woman said...

It's so good so see someone who enjoys his work so much. Now, let me take a nap amongst all these ribbons in the tech closet.

Ben said...

You got it. Nap away. I will just wait here and definitely won't go staring at your breasts while you sleep or anything.

Because that would probably be creepy.

Windfall Woman said...

That's not creepy. That's manly. Don't y'all have some bunkbeds somewhere like doctors have in the hospital. Like maybe Grey's Anatomy? How about that?

Ben said...

In that case, I am the manliest ever.

Sadly, it is quite difficult to fit bunk beds in a weblog, but if I did I'm pretty sure they would be like the ones in Scrubs which are no doubt completely different even though I have not seen Grey's Anatomy so can't possibly know what I'm talking about but that never stopped me before...

Sorry, didn't mean to interrupt your nap. Go ahead...

Windfall Woman said...

No, no, I'm awake. Scrubs' bunks would do just fine. I kinda like that the "harem" hasn't discovered this weblog yet. Maybe they aren't as fucking good as I am.

Ben said...

Yes, that could be it.

It definitely could not have anything to do with the fact that this is all geeky and boring and hardly ever updated.

Windfall Woman said...

It's a good place to hide then. Or hide out.

Ben said...

I can see how that would be attractive to a famous movie star type such as yourself. Not to mention hot. Or did I already mention that?

Windfall Woman said...

No, I don't believe you did mention that. Hot. It is getting warm in here, isn't it CF?

Ben said...

Yes. Must be the weather. ;)

Windfall Woman said...

Well, I live in a hot climate. You live in a hot climate. Must be. The weather. CF.

Ben said...

Damn that summery weather.

Windfall Woman said...

After FREEZING weather today, I'll take the damn hot weather back again.

Ben said...

I feel for you. Really. :)