sarnie Code
Status: Beta
Brought to you by:
ranec
| File | Date | Author | Commit |
|---|---|---|---|
| sarnie | 2009-01-28 | ranec | [r23] More re-org |
| LICENSE | 2009-01-05 | ranec | [r1] First cut |
| README | 2009-01-15 | ranec | [r20] Added a HOWTO section |
| THANKS | 2009-01-13 | ranec | [r13] Adding THANKS |
| setup.py | 2009-01-28 | ranec | [r23] More re-org |
INTRODUCTION:
Welcome to 'Sarnie'
For those who don't know, 'Sarnie' is a slang word in UK English for sandwich.
In my office at work, several vans selling pre-made sandwiches (and other lunch-oriented food) visit each day.
When they do, telling everyone in the office is awkward.
The receptionist has an account in many IM clients and randomly picks someone (one from each floor in the office) and
picks on them to shout out (literally shout: it's an open-plan office) that a certain van has arrived.
There are several people who vehemently dislike IM clients and thus never get picked, though lots of them actually want to get their lunch from one of these vans. :-|
So I've implemented an announcer, based on Python, Pyro and wxWidgets.
Pyro has an Event Server that works very well for this.
Each employee that wants lunch from said vans, runs the client and when a van arrives, the receptionist will use the server to announce it's arrival.
The server publishes the event and all the clients that are subscribed to that publishing will get told.
Then they simply have to tell the user.
I do not have access to an Apple Macintosh, but am trying to keep this code as platform neutral as possible.
Craig
HOWTO:
1) Install Python
The code is currently limited to a newest revision of 2.5
My Mac tester has 2.5 installed and I'm not going to make him uninstall that for 2.6
2) Install Pyro
For Win32, just use the installer
For MacOS, get the tarball, un-pack it and run
$ sudo python setup.py install
3) Install wxPython
4) Run the client
$ python sarnie_client.py
you either need to be on a sub-net that has a Pyro NS and ES running
OR
iff yon can reach a host with such, then set the environment variable
PYRO_NS_HOSTNAME to be that host
OR
run your own Pyro Name Server and Event Server (see the Pyro Docs)
5) Have an announcer make an announcement.
This will probably entail you running an announcer too
$ python sarnie.py
# vim:ts=4:sw=4