The Coding Weasel

Tuesday, January 02, 2007

Bruce 1.2

Bruce 1.2 is out. This is the version resulting from the work Richard and I both did while preparing our talks for OSDC a month ago, and means you can run the presentations I linked to earlier, without needing to grab the SVN version of the code.

It works on MacOS X, Unix, and Windows - but note that some bits, such as SpawnPage and ShellInterpreterPage won't work currently on Windows. If someone wants to contribute patches to make these work (it shouldn't be hard - I just don't have a need or motivation to do it right now) they'll be gratefully accepted.

I've begun the work on what will become Bruce 2.0 - this will be a merge of the IronKant code, allowing Bruce to run on IronPython with SdlDotNet, and should hopefully also include a pyglet backend. Pyglet should allow for a whole host of shiny new possibilities.

Next up is a talk at LCA 2007's Speaker's Dinner in 2 weeks.

Labels: , ,

Monday, December 11, 2006

talk #2: futurepython

The final talk from the three I did at OSDC is up now. This was the end of day talk on Thursday, "futurepython". I talked about IronPython and Python 3.0. Unlike the other two talks, this one wasn't done using Bruce. Instead, I did an extremely quick port of Bruce to run on top of IronPython and SdlDotNet. In keeping with the philosopher's naming scheme of Bruce, I called it "ironkant".

The talk is here, including the ironkant code. I should point out that ironkant almost certainly has bugs - I started it late Wednesday night after the conference dinner and finished it (and the talk) a good 5 minutes before I presented it the next afternoon. What can I say, I just thrive on the stress. Having the presentation running on top of IronPython was a pretty good demonstration of just how far along IronPython has come.

And sorry Jim for calling you a crazy man - I mean that with love and respect :-)

I was extremely impressed with how easy it is to grab a C# assembly, read the C# docs and get coding. I also only had to make one fix to a CPython standard library module to get the code to work - in this case, I had to fix codeop.py to not pass the DONT_IMPLY_DEDENT flag to the builtin compile() method. This flag is both undocumented and implemented in codeop.py in a most foul way - I've opened Python bug 1612012 about it. The fixed version of codeop.py is now in the SVN version of IPCE.

I started porting popen2 as well, that's not finished yet (but will be this week). For the moment, I'm just using os.spawnl() directly inside IronKant for spawning external programs.

The longer Windows.Forms example in the talk is from Michael Foord's excellent tutorial on the subject. If you're at all interested in producing native GUIs on both Windows and Unix, you should definitely check the tutorial out. And buy his book about IronPython when it's done!

Labels: , ,

Sunday, December 10, 2006

talk #3 - gstreamer and python

The third talk from OSDC is up as well, now. This was "GStreamer and Python". The talk itself can be found here, or via SVN with
"svn co http://codingweasel.googlecode.com/svn/trunk/talks/2006/gstpy"
Once again, it uses the current SVN version of Bruce, which you can get with
"svn co http://svn.bruce.python-hosting.com/trunk"
Unlike the previous talk, it's unlikely you'll be able to run it in it's full glory, because
a) it needs 3 sound cards :-)
b) I haven't checked in the many, many sound files (and single video file) I used for the talk, as they're all copyrighted to the original owners. The text and code should still be useful, though.


The goal is to turn the various examples from this talk into individual blog posts, with explanatory text. I mentioned during the talk a couple of posts by Jono Bacon that provide a good introduction - they can be found here and here.

Labels: , ,

Wednesday, December 06, 2006

What's New In Python, 2006

I've put the first of my OSDC 2006 talks up - What's New In Python 2006 Edition.

It can be fetched from http://codingweasel.googlecode.com/svn/trunk/talks/2006/whatsnew/
(or svn co thaturl)

This talk uses the Bruce presentation software, in particular the new 'socrates.py' script that takes a simple text file describing the presentation. At the moment, you'll need the current SVN version of Bruce. There will be a new release of that soon.

Alternately, you can just read the 'whatsnew.soc' file - it's a simple text file.

Update: You can get Bruce's current SVN with
"svn co http://svn.bruce.python-hosting.com/trunk"

Labels: ,