<<O>>  Difference Topic BirthAnnouncement (r1.2 - 22 Nov 2003 - KirkStrauser)
Changed:
<
<
META TOPICPARENT KirkStrauser?
I wrote the birth announcement for my daughter, Ariana, in the Python ProgrammingLanguage? for the amusement of my ComputerGeek friends. Note that this is a real program, and gives the time of her birth in the time zone of the person running the program. It is also technically correct in that the variable name really does live in different address spaces in the parent and child processes. Yeah, I'm a dork.
>
>
META TOPICPARENT KirkStrauser
I wrote the birth announcement for my daughter, Ariana, in the Python ProgrammingLanguage? for the amusement of my ComputerGeek friends. Note that this is a real program, and gives the time of her birth in the time zone of the person running the program. It is also technically correct in that the variable name really does live in different address spaces in the parent and child processes. Yeah, I'm a dork.

#!/usr/bin/python
Line: 17 to 17

# exclusively licensed to the authors for a period of up to eighteen # years.
Changed:
<
<
# $Id: baby.py,v 1.3 2003/04/06 06:12:04 kirk Exp $
>
>
# $Id: BirthAnnouncement.txt,v 1.2 2003/11/22 17:24:10 KirkStrauser? Exp www $

import time import os

Line: 40 to 40

-- KirkStrauser - 08 Apr 2003

Added:
>
>
META TOPICMOVED KirkStrauser? date="1069521877" from="Main.BirthAnnouncement" to="Computing.BirthAnnouncement"
 <<O>>  Difference Topic BirthAnnouncement (r1.1 - 08 Apr 2003 - KirkStrauser)
Line: 1 to 1
Added:
>
>
META TOPICPARENT KirkStrauser?
I wrote the birth announcement for my daughter, Ariana, in the Python ProgrammingLanguage? for the amusement of my ComputerGeek friends. Note that this is a real program, and gives the time of her birth in the time zone of the person running the program. It is also technically correct in that the variable name really does live in different address spaces in the parent and child processes. Yeah, I'm a dork.

#!/usr/bin/python

# This program forks().  That should be plenty for a few years' entertainment
# Copyright (C) 2003 Kirk & Jennifer Strauser

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# However, the output of this particular instance shall remain
# exclusively licensed to the authors for a period of up to eighteen
# years.

# $Id: baby.py,v 1.3 2003/04/06 06:12:04 kirk Exp $

import time
import os

eta = 1049547660
name = "Jennifer Strauser"

if eta > time.time():
    # Not done yet
    time.sleep(eta - time.time())

pid = os.fork()
if pid:
    print "%s: At %s, I got my own address space back!" % (name, time.ctime(eta))
else:
    length = 20.5   # inches
    weight = 5.4    # pounds.ounces
    name = "Ariana Nicole Strauser"
    print "%s: Hello, world!" % name

-- KirkStrauser - 08 Apr 2003

Revision r1.1 - 08 Apr 2003 - 04:40 - KirkStrauser
Revision r1.2 - 22 Nov 2003 - 17:26 - KirkStrauser