Anygui Redux

Years ago, I was involved in the development of Anygui, a GUI development wrapper designed for python. Basically, it was supposed to be like anydbm is for accessing database modules from python. That is, it was intended to make it into the standard library, and use the best GUI available from it’s list on a given system. I was responsible for the BeOS components, using Donn Cave’s excellent Bethon package. Today, I noticed a referer in my backend from someone searching for PyMail on Google. I had a look on Google as to what else is found on this search, and came across a site with the following content (I’ve reformatted it, since the site was gone, and this is from the cache):

    #!/usr/bin/env python
    #pyMail 0.1 
    #my first program with python and anygui interface 
    #coded by teknux ~ teknux@ustc.edu 
    #2002/11/4 
    #copyright 2002 under GPL
    
    from anygui import *
    import smtplib 
    from email.MIMEText import MIMEText 
    import sys as sys
    
    #edit these fields with your informations
    mail_sender = "teknux@localhost"
    mail_from = "teknux@localhost" 
    
    #initialize window 
    app = Application() 
    win = Window(title="pyMail 0.1",size=(460,385)) 
    app.add(win) 
    opt = Options(left=5, width=21, height=30) 
    banner = Label(size=(70,25), position=(385,10), text="pyMail 0.1") 
    to = Label(opt, text="To:") 
    to_text = TextField(size=(230,25)) 
    win.add((to,to_text), position=(0,10), direction="right", space=5) 
    win.add(banner) subject = Label(size=(51,25), text="Subject:") 
    subject_text = TextField(size=(398,25)) 
    win.add((subject,subject_text), position=(0,45), direction="right", space=5) 
    body = TextArea(size=(450,250)) 
    win.add(body, position=(5,80)) 
    btn_send = Button(left=5, size=(100,30), text="Send message") 
    btn_exit = Button(left=5, size=(100,30), text="Exit") 
    status = Label(size=(240,25), text="...status...") 
    win.add((btn_send,btn_exit,status), position=(5,350), space=6) 
    
    def statbar(stat_msg):
        status.text = stat_msg status.refresh() 
    
    def sendmail(**args): 
        msg = MIMEText(body.text) 
        msg["Subject"] = subject_text.text 
        msg["From"] = mail_from 
        msg["To"] = to_text.text 
        mail_to = to_text.text 
        mail = smtplib.SMTP() 
        statbar("connecting to SMTP") 
        mail.connect() 
        statbar("sendin message") 
        mail.sendmail(mail_sender, mail_to, msg.as_string()) 
        statbar("done")
        mail.close() 
        
    def exit(**args): 
        sys.exit(2) 
        
    link(btn_exit, exit) 
    link(btn_send, sendmail) 
    app.run()

I don’t have Anygui anymore, and the old site appears to be gone, so I can’t test this out! I do love the cleanliness of this system, however. It’s almost as easy to create a UI in this as in Interface Builder. Amd the coolest thing from my perspective was that this was so easy to implement in BeOS/Bethon. I did write a few of the modules for Donn, and these two bits were probably the first bits of Open Source code I wrote, and that other people might have used.

Boing Boing: Wirelessly-enabled wine glasses

Boing Boing: Wirelessly-enabled wine glasses

MIT Media Lab students Jackie Lee and Hyemin Chung have designed wireless-enabled wine glasses (actually, big tumblers) so couples can imbibe “together,” even when they’re geographically apart. From New Scientist: When either person picks up a glass, red LEDs on their partner’s glass glow gently. And when either puts the glass to their lips, sensors make white LEDs on the rim of the other glass glow brightly, so you can tell when your other half takes a sip. Following tests in separate labs, Lee says the wireless glasses really do “help people feel as if they are sharing a drinking experience together”.

Man, I can’t believe it took this long to invent!

Blog name as Page name

Nardac, a new Blogsome user, tried out my Page Templates hack, and asked the following question:

Gravatar Image

I’m having a hard time getting the pages to work. I think I’ve followed your instructions to a tee… but well… hmmm… can you take a look?
the page in question is http://nardac.blogsome.com/nardac/

I looked, and what is occurring is that his normal blog index page is appearing. So I tried the same with my blog: http://schinckel.net/schinckel/ - I know I don’t have a Page with this name, so I was interested to see what occurred. It too showed my index page. Looking down the bottom, I see the arguments that are passed to the server, and in this case, only the blog name is being sent (wpblog=schinckel). So, it seems that a page with the same name as the blog name cannot be used. I suspect this has something to do with the HTTP Rewrite Rules, but I’m not sure. I don’t see it as a big issue, anyway. Workaround: Don’t use your blog’s name as a Page name.

Mail.app Chokes on HTML Email

I’ve noticed that Mail.app really takes ages to render HTML emails, or those with images in them. Seconds elapse between clicking on a message, and it fully rendering in the preview pane.

Mini-review: The First Casualty

Ben Elton is pretty fantastic. He wrote for The Young Ones, and Blackadder, and has since written several books, most of which are pretty good. His latest is The First Casualty, a historical fiction (?) piece set during the Great War. I was gripped, and read it in one sitting. No comedy here, guys, but well worth the effort. The guts of the story: in 1917, a war hero and poet is killed, not in action, but while recuperating after being injured, and shellshocked. A disgraced police officer, who was sent to jail for refusing to fight in the war (not a conchie, as his grounds were “purely intellectual”) is ‘recruited’ to find the identity of the killer.

Killer Kitten

From Scot Hacker’s blog:

iPod Software 3.1.1 Crashes

If you have a 4G (Clickwheel) iPod, and you use it, don’t install iPod Software 3.1.1. This version of the firmware causes the iPod to crash sometimes, even often, when going to sleep or waking up. You then need to do a force-reset (hold MENU & SELECT for 6-10 secs) in order to cause it to spin up, losing your place in a bookmarkable file, and possibly play counts for other tracks. I downgraded (using the Restore feature from iPod Updater 2005-09-23.app), and haven’t had a single crash since.

Blogsome Mention

creativepro.com - Putting Your Best Blog Forward Smith Jackson, over on creativepro.com, has written a nice article on how and why to blog: it’s fairly heavily pointed towards Blogger, but there is a mention of Blogsome, and more importantly, my site is the example of a Blogsome blog linked to. I only noticed because of a referer hit, so, welcome to all of my new visitors who came from that direction! If you are keen on signing up with Blogsome, please do so. It costs nothing, but be sure to sign up in the Forums too, and have a look at some of the features (and caveats) of this service. I’m a very happy customer with Blogsome.

Everything is 197KB

The other day, when trying to find the old episodes of The Ricky Gervais Podcast (Series 1), I noticed something rather strange. Lots of items in the list of hits were 197KB. This made me very suspicious, as normally the podcasts were in the order of 13MB. A fairly significant difference. So I did a couple of other searches, and guess what. About 50% of everything I searched for (and I only did a couple) were 197KB. Interested, I downloaded one, and had a look inside. Aha! Setup.exe - someone is playing funny buggers. I didn’t even try to find out exactly what this file does - I’m fairly sure it isn’t really a Setup thing, just some malware. Good thing I’m on a Mac.

Birthday Dilbert

Since today is my birthday, I thought I’d post today’s dilbert. It kinda rings true: