I just can’t seem to keep still, I’ve re-installed a blog back at the original place, and hopefully I’ll be blogging more there, and twittering less.
I just can’t seem to keep still, I’ve re-installed a blog back at the original place, and hopefully I’ll be blogging more there, and twittering less.
Of the many jokes that Estelle gets sent, this is the funniest we’ve had for a long while and I thought I’d share :)
Nicolas Sarkozy dîne avec la reine d’Angleterre. Soudain, il lui demande:
‘Votre Majesté, vous m’impressionnez, vous êtes toujours entourée de
Gens intelligents, comment faites-vous ?’
La reine lui répond: ‘C’est très simple. Je les tiens constamment en
Alerte. Je leur fais passer régulièrement des petits tests pour être bien sûre
Que leur intelligence reste vive.’
Nicolas est stupéfait: ‘Ah oui ? Comment faites-vous ça ?’
La reine s’empare du téléphone: ‘C’est très simple. Je vais vous montrer.
Elle appelle Tony Blair:
- Bonjour Tony !
- Bonjour Votre Majesté !
« Tony, j’ai un petit test d’intelligence pour vous.
- C’est l’enfant de votre père et de votre mère mais ce n’est ni votre
frère ni votre soeur. Qui est-ce?
- C’est moi !
- Bravo, c’est juste ! Merci Tony. A la prochaine.
La reine raccroche. Nicolas est impressionné: ‘Wow !’
De retour à Paris, Nico décide de mettre en pratique la technique de la
Reine d’Angleterre.Il téléphone à Carla Bruni:
« Bonjour Carla, c’est Nicolas ! J’ai un petit test d’intelligence pour toi !
- O.K. Vas-y.
- C’est l’enfant de ton père et de ta mère mais ce n’est ni ton frère,ni ta soeur. Qui est-ce ?
- Oh! Attends un petit peu. Je n’étais pas préparée à ça.Je note .
Laisse-moi quelques minutes pour réféchir . Je te rappelle. D’accord ?
- Pas de problème ! »
Carla Bruni s’empresse alors d’appeler Rachida Dati :
- Bonjour Rachida, c’est Carla . Je ne sais pas ce qui lui prend mais
Nico vient de me faire passer un test. Est-ce que tu veux bien m’aider ?
- Pas de problème, énonce-moi la question .
- C’est l’enfant de ton père et de ta mère mais ce n’est ni ton frère,ni ta soeur. Qui est-ce ?
- C’est moi !
- Aaah, Ok, merci !
Carla Bruni s’empresse de rappeler Nicolas .
- Nicolas , tu peux me reposer ton énigme ?
- Ok. C’est l’enfant de ton père et de ta mère mais ce n’est pas ni ton frère,ni ta soeur. Qui est-ce ?
- C’est Rachida Dati !
- Perdu ! C’est Tony Blair.
I finally got my laptop ready last night, so I should be ready for a weekend of Python at PyCon UK. Really, really looking forward to learning some new stuff. Unfortunately I didn’t get a chance to check out PyObjc before I go, so I won’t have anything to really compare IronPython and PyQT to in terms of Python GUI toolkits - but I have spent a small amount of time with both of them so at least I’ve a rough idea of how they work
One thing I did notice whilst playing with IronPython and System.Windows.Forms was how relevant any S.W.F. experience you already have is likely to be. Yes, you’ll be writing a lot less code, but apart from the fact you’re using a much nicer language, the way that the UI works is obviously the same - which for some reason wasn’t as obvious to me as it should have been.
So pending a failure to wake up at 6AM tomorrow to pick up Darren, I’m ready. Ish. Once I’ve packed.
Note to self:
Some things I haven’t tried with IronPython yet that I intend to (i.e. need to remember to try)
1. self.listbox.Items.AddRange( [“item”, “item”, “item” ] ) - I so want this to work, and suspect that it might.
2. P/Invoke
3. Handling class attributes
4. What, if any, support there is for System.Collections.Generic
Just a reminder so I can remember how to draw fixed height custom listbox items. Syntax highlighting would be nice … ho hum.
class MyForm(Form):
def __init__(self):
self.listbox = ListBox( Location=... )
self.listbox.DrawMode = DrawMode.OwnerDrawFixed
self.listbox.ItemHeight = 80
self.listbox.DrawItem += self.drawListboxItem
# Add your items as necessary, remembering they don't need to be strings
self.Controls.Add( self.listbox )
""" Called when an item needs drawing
evt is a DrawItemEventArgs """
def drawListboxItem(self, sender, evt):
# Draw the default background
evt.DrawBackground()
# Get the item that is being drawn
item = self.listbox.Items[evt.Index]
# Use the Graphics object to draw your item using evt.Bounds to
# determine where to draw (pay attention to the evt.Bounds.X and
# evt.Bounds.Y
evt.Graphics.Draw...
# Draw the selection rectangle
evt.DrawFocusRectangle()
3 years ago
Off to see La Machine tonight, and probably again tomorrow afternoon whilst E is watching High School Musical. I couldn’t work out where it was going to be tomorrow, as it is apparently getting a bit temperamental so I’ve put together a quick map.
I managed to see the Sultan’s Elephant at les machines de l’ile when I was in Nantes last, and it was pretty impressive. We didn’t manage to get a ride on the elephant, but did follow it around for a short while before checking out the other ‘creations’.
Looking forward to seeing what they (flash heavy site warning) do next.
3 years agoI feel like this.
3 years agoIt has just suddenly dawned on me that PyCon UK is coming up fairly soon, so I’ve taken a bit of time to take a look at IronPython before Michael Foord’s tutorial on the 12th. Hopefully I’ll have some time to check out PyQt too before we go, and PyObjC just out of interest.
So far, and apart from the painful startup time, its looking good, pretty easy to write WinForm apps and managed to get my first IronPython user control written in a half hour or so (should be quicker from now on). Apparently there is an IDE for it, but seeing as I’ll be doing the tutorial on a Mac I may as well get used to writing without one.
I am just debating at what point I should import * instead of import (Point, Color, Rectangle, Size, Brushes, Font, FontStyle, StringFormat, StringFormatFlags, Image). I guess around about now is probably a good time :)
There is still this niggling little feeling at the back of my mind though asking what the point of IronPython is - is it *just* for .Net integration? Is it supposed to have much better performance? How long will I have to wait for Python on V8? So many questions…
3 years agoI’ve decided that trying to brush off the rust wrt Expert Systems, on a weekend when I’ve been taken out drinking (as a non-drinker it wasn’t a pleasant sight) is generally not a good idea.
More and more over recent weeks I’ve been thinking about ES again, and thought that after a break of a couple of years, maybe I should take another look, but maybe I should wait until I’ve got rid of this hangover first.
And definitely, no more drinking.
3 years agoStarting on a new diet today - hopefully I can last out on this one long enough for it to make a difference.
3 years ago