The Voidspace Techie Blog

Python Programming, News on the Voidspace Python Projects and All Things Techie. Multi-coloured Me
For my more personal blog, go to the Voidspace Blog. This also has links to the old Techie Blog, God rest its soul.
Reviews by consumers and price comparison In need of a new and cool mobile phone? At Ciao you find great prices on lots of products. We have software for a PDA or a computer. Do not hesitate, make a bargain today!

 

Loading ...

 

Most Popular Blog Entries

emoticon:halt Feedburner allows me to monitor my RSS feed and see how many people are clicking through from my blog entry summaries to read the full entry [1]. Feedburner reports that I have a current average of about 830 subscribers. I have no idea whether this reflects the extent of my readership, as I've always assumed that the majority of the people who read this blog through Planet Python [2].

I can track the number of people who click through from each item, which does show the number of people who are interested enough in the title / summary to read the full entry. Here's a list of the most popular entries (everything with more than 500 clicks). It isn't completely representative as I only switched my feed fully over to Feedburner in December 2007, and I sometimes have several entries on the same page - so people can click through to one and then read several. Still, I find it interesting. Wink

As this list in some way reflects the interests of the Python community [3], it's nice to see some IronPython and Resolver related entries amongst the popular ones. Smile

Also interesting that the most popular entry is the recent (controversial) one I wrote on testing...

[1]I realise that many people would prefer a full feed rather than a partial feed. That would mean hacking on my Desktop Blog Client Tool: Firedrop2. I really like this program and am not willing to switch away - at some point I will experiment with enabling full feeds, but not yet.
[2]Or the Unofficial Planet Python.
[3]Or the part of the Python community that reads Planet Python anyway, which almost certainly doesn't include the 'silent majority' of Python users and programmers.

Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.

Posted by Fuzzyman on 2008-04-26 14:27:27 | |

Categories: , , Tags: ,


Resolverforge: Download Modules on Demand for IronPython and Resolver One

emoticon:men I've implemented a client-side module that allows you to specify what modules your code 'requires'. After user-confirmation, a required module that isn't available will be downloaded and on the import path. This is intended for use with Resolver One, but should work with any IronPython code where Windows Forms is available (just the message box is used currently).

Modules are downloaded from whichever repository you specify, which defaults to www.resolverhacks.net/resolverforge.

Requiring the "helloworld" Module

The code to use Resolverforge looks like:

from Resolverforge import require
require('helloworld')
import helloworld

helloworld.sayhello()

You can specify your own repository, so that you can make modules available on the internet or an intranet instead of having to keep dependencies with your spreadsheets. This is an early implementation (which works of course!). Resolverforge downloads modules that are individual Python files and doesn't support versioning. It will also one day gain a website counterpart that will allow users to create projects and make them available for download. For the moment you will have to make do with the modules I've put up, which are mainly aimed at Resolver One.

Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.

Posted by Fuzzyman on 2008-02-11 00:28:36 | |

Categories: , , , Tags: , ,


Resolver Hacks Updates

emoticon:exclaim Resolver One is a great program, but it can be hard to explain to people why it is radically different from existing spreadsheets. Giles Thomas recently presented Resolver One at the Lang.NET 2008 conference, and we got some great feedback as a result. They are summarised in Resolver Systems News. My favourite is this one from Laurence A. Lee. It starts "FINALLY! Someone from a Company that truly "gets it"!! YES, YES, YESSSS", and continues:

we were using Excel Spreadsheets to mock up all sorts of Business Logic for the Financial Sector, and we noticed a huge gap in our development process. It took a week to mock up all that business logic in Excel, and then it took 6 MONTHS for a software development team to take that spreadsheet, play with it for a while, and try to implement that Business Logic Module in hand-written code.

This is exactly the space that Resolver One fills.

Anyway, I added three new pages to Resolver Hacks. The first two are snippets:

  • Spreadsheet Module Directory - Resolver One obeys the IRONPYTHONPATH environment variable, which can be very useful.
  • The Main Module - a hack that gives you access to the spreadsheet objects from inside module code.

The third article is so special it deserves its own blog entry...

Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.

Posted by Fuzzyman on 2008-02-11 00:27:39 | |

Categories: , Tags: ,


Resolver and Resolver Hacks Updates

emoticon:tooth Well I did it, a whole week without blogging! This is mainly because I have just moved house. Because of the move I didn't get into work until Thursday. I like going into work, not just because I enjoy my job (which I do), but so that I can grab a bleeding-edge version of Resolver One. We always keep subversion head 'releasable', so it usually has features not yet released. We're working towards a 1.0.1 release in about three weeks. This will mainly be a bugfix release (focussing on usability), but we already have at least one new feature - a dialog for setting the back colour of cells. We're also planning the new features for version 1.1 which should follow about a month after 1.0.1.

I've just added two new articles to Resolver Hacks:

  • Persistent Cells and Worksheets

    Two example spreadsheets showing how to save and load values to the disk, to be reloaded with a spreadsheet. This is useful for storing the results of calculations that take a long time, so that they only need to be done once rather than every recalc or every time the spreadsheet is loaded. The first example shows how to persist individual cells and the second extends this to storing every value in a worksheet.

  • Virtual Worksheets

    Virtual worksheets are worksheets that only exist in code, and are not shown in the grid. This technique allows you to create 'scratchpad' worksheets, for storing intermediate values, without exposing them to the user. Once created we can use a cellrange and the CopyRange function to copy data back to a visible worksheet.

In the meantime, several useful new pages have been added to the online Resolver One documentation:

Giles Thomas has also created another one minute screencast, this time on using the Resolver One Web Server:

My understanding is that a trial version of the server will be available for you to experiment with soon...

Next week Giles will be presenting on Resolver One at the Lang.NET Symposium.

Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.

Posted by Fuzzyman on 2008-01-26 16:51:02 | |

Categories: , Tags: , ,


Twittering and Aggregating RSS Streams

emoticon:judge I've finally succumbed: http://www.twitter.com/voidspace

I played around with Pownce, and I really liked the Adobe Air client, but I don't think anyone was listening to me. Smile There are several people I know using twitter.

I'm using the Windows Twiteroo client and it's pretty good.

What I'd really like to do is combine onto this website [1] (with a single feed of course) my RSS feeds from places like Twitter, del.icio.us, Flickr, my Google Reader Shared Items and so on. I could just use the Planet aggregator with a template, but a UI to add notes would be nice. (Even with all these feeds combined it would still only be a few items a day.) Feedparser is so easy to use that it would be a nice simple project, but I keep getting distracted by having to write a book...

I blogged about Onaswarm recently, which does aggregate these 'social feeds' into a single 'lifestream'. It even does Facebok feeds and uses OpenID - both of which are cool. I want it on my website and looking like my website though...

[1]Actually I'd like to create a separate 'link blog' which would include my Twitter feed and any del.icio.us bookmarks I mark with a 'shared' tag.

Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.

Posted by Fuzzyman on 2007-12-27 20:19:07 | |

Categories: ,


Resolver Tips: Using Compiled Modules and Integration with Google Spreadsheets

emoticon:eggs Now that Resolver is in the hands of a larger number of people, we are starting to see some interesting use cases and tips and tricks emerge. These are a couple of recent ones:

  • How to Import Google Spreadsheets into Resolver

    This example uses the Google Spreadsheet API to import google spreadsheets into Resolver worksheets.

  • Using Compiled Python With Resolver

    Using byte-compiled Python code is one way of preventing your end users from tampering with the source code and creating maintenance nightmares. One user wanted to do this with Python modules used by his spreadsheets. This entry walks through using the ability of IronPython 1.1 to create compiled assemblies from Python modules with Resolver spreadsheets.

For more tricks and tips, Resolver Hacks is the place to go of course. Smile

Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.

Posted by Fuzzyman on 2007-12-17 14:07:36 | |

Categories: , ,


Resolver Hacks Update

emoticon:rogue Last week the Resolver Beta was released. Since then we've had several hundred (3-400 currently) downloads, which is great.

The version released was 1.0 beta 4 [1]. This includes quite a few major changes since I last updated you about progress with Resolver. One of the major changes was that we made the API for working with spreadsheet objects simpler from user code [2]. This was a lot of work, but I think it was worth it. The very worst side effect was that it broke most of my examples on the Resolver Hacks website.

Today I have finally got around to updating it and putting new screenshots in (Resolver got prettier):

There are around thirty pages of articles and examples to get you going with Resolver. Some of the most useful ones are:

Some of the features that are new in Resolver in the last few months include:

  • Undo and redo for all spreadsheet actions (that took a long time)
  • Unpacking Arrays into Selection (an array or cellrange in a cell can be unpacked into a selected area with Ctrl-Shift-Enter - this took even longer than Undo and Redo!)
  • Cell references and ranges can be inserted into formulae using the cursor keys
  • Pasting 'patterns' into selection when selection is a multiple of clipboard contents
  • Drop down lists of items in cells
  • Performance improvements for large spreadsheets (several very nice optimisations here - but there is still plenty to work on)
  • View by type (date, number, string etc) and origin (constant, formula or set from user code) - a basic auditing mode to see what types cells contain and where the values come from
  • Exception tracebacks are printed to the output view (including exceptions raised in cells and worksheet formulae - fiddly to get right but very useful)
  • The directory of the current file is added to 'sys.path'
  • Pretty (!?!) coloring of the different user code sections in the code box (I didn't specify this user story!)

Plus of course lots of other minor features and bug fixes, almost too numerous to mention. Smile

Even since the beta we have added several new features (once a couple of big changes were finished a few weeks ago we really got on a roll). Hopefully these will be available in beta 5 later this week. If you have already downloaded Resolver you should get notified when the update is available.

[1]This first three betas went to our private beta testers.
[2]You can now set values in cells with user code like: workbook['Sheet1'].A1 = 3. Previously this would have returned a cell object and you would have had to set the Value attribute on it. You can still get access to the cell objects now through the Cells indexer on worksheets, cellranges, rows and cols.

Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.

Posted by Fuzzyman on 2007-12-11 00:06:17 | |

Categories: ,


Python Interactive Interpreter in a Browser

emoticon:cat Ok, so I lied. One more entry on Silverlight. I've got a proof of concept 'Interactive Interpreter in the Browser' working with IronPython & Silverlight. There are lots of ways it could be improved (I'll discuss these in a minute), but it is still quite fun.

Python interactive interpreter in your browser!

This could be embedded into web based tutorials (like Crunchy) to provide live examples. Because the Python code executes in the browser (not on the server) there are no security issues to worry about. It doesn't actually use the Silverlight canvas, just an HTML textarea and text input field, so you could have several in a page if you wanted. You could also prepopulate the namespace(s) with live objects.

It has several limitations, most of which someone (you?) could fix and one of which will have to wait for the next update to Silverlight. If you fancy downloading it as it is, head over to my IronPython & Silverlight Page.

  1. It would be greatly improved by being in a single textarea field. Only the last line after the prompt should be editable. This is fiddly to do in a cross-browser way, but not very difficult [1].
  2. Evaluated expressions aren't shown as they are in the 'normal' interactive interpreter (you have to use print to see the result). This is actually due to a bug in IronPython 2, which will be fixed in the next release (basically a one line fix!) [2]!.
  3. You have to provide the standard library if you want it to be available!
  4. In Silverlight the file type doesn't exist (for a good reason), so more stuff than usual is broken. Smile

Note that this does use some standard library modules, which I've modified slightly to work with IronPython & Silverlight. These are included in the download.

[1]Some of the editing code could be borrowed from PyShell which is a wxPython interpreter widget that operates in a control very similar in appearance to a textarea. It also uses the Python standard library code module.
[2]There is code in the DLRConsole IronPython example which could be used if you are desperate to get a working version of this. It takes a very different approach and so would be a lot more code - but the source code is very readable if you are prepared to work with the DLR API.

Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.

Posted by Fuzzyman on 2007-09-19 21:08:20 | |

Categories: , , ,


Silverlight Talk: Quick Links

emoticon:waffle I've now done my talk on Silverlight at PyCon UK, and to my great relief it went OK. (In fact I was much more nervous doing a practise run to the Resolver developers yesterday).

I've put the talks and the examples online. I'd like to split the talk into a series of pages, but here are some quick links to the presentation and examples:

The main talk is an S5 slideshow. If you view the talk as a single page (go to the bottom left of the page and click on the '0' link) then there are a lot of notes embedded explaining the code examples.

The Web IDE has been updated to include some Silverlight examples built into it. These illustrate using different parts of the Silverlight APIs.

Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.

Posted by Fuzzyman on 2007-09-08 15:49:27 | |

Categories: , , ,


Silverlight Web IDE 0.2.0

emoticon:note What good is an IDE that can't save and load files? Exactly!

I've updated my example Silverlight Web IDE to allow you to load and save Python files.

Silverlight IronPython IDE with Load and Save

The project download includes a Python CGI file which is needed for saving the file. I'll explain how the loading and saving is done in the next two entries...

Warning! When you click save in IE for the first time, it will block the download. When you allow the download it will reload the page and you will lose your code! Either click save once before you start editing or make sure you save you code on the clipboard... Smile

Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.

Posted by Fuzzyman on 2007-08-19 19:49:51 | |

Categories: , ,


Silverlight IronPython Example: Experimental 'IDE'

emoticon:pencil I've put together a simple IronPython Silverlight project. It's an experimental mini-IDE that has a Python editor window and lets you execute arbitrary Python code in the browser.

Silverlight IronPython IDE

You can also download the project: IronPython Silverlight IDE Project.

Note

If you have multiple tabs open or multiple extensions installed this can be unstable with Firefox I'm afraid. Silverlight 1.1 is still in alpha, so don't be too harsh. Smile

If you serve this project from Apache then don't forget to set it to serve Python files as source rather than running them. This will save you some of the headbanging that I just went through!

The project is pretty much a barebones IronPython Silverlight project which should get you started if you want to experiment. It uses the EditArea syntax highlighting code editor.

  • It requires Silverlight 1.1 Alpha Refresh
  • Pressing the 'Execute' button, or focussing outside the code editor after a code change will cause it to be executed
  • print statements go to the debugging pane
  • There is a DOM element with the id 'experimental'. You can manipulate this from IronPython code (see the example code that the code editor has on startup)
  • You can import from the CoreCLR but I haven't made the Python standard library available
  • Exceptions (stacktraces) should be reported correctly (but are sent to the debugging pane)
  • It's only 90 lines of Python, so it is very simple!
  • AFAIK Firefox only works at all with Silverlight if the files are served rather than fetched from the filesystem

I haven't explained all the details yet, nor provided the source code to the little bit of C# that lets the javascript call the Python code. This will all be posted after my PyCon and Mix UK presentations.

Comments, bug reports and code contributions welcomed. Smile

Like this post? Digg it or Del.icio.us it. Looking for a great tech job? Visit the Hidden Network Jobs Board.

Posted by Fuzzyman on 2007-08-12 19:23:46 | |

Categories: , , ,


For buying techie books, science fiction, computer hardware or the latest gadgets: visit The Voidspace Amazon Store. If you're looking for a new techie job, try the Voidspace Tech Job Board. This is part of the Hidden Network of technology and programming jobs.


Hosted by Webfaction

Counter...


Voidspace: Cyberpunk, Technology, Fiction and More
Search this Site:
 
Web Site

IronPython in ActionIronPython in Action

Blogads

Follow me on:

Twitter

Pownce

Jaiku

Del.icio.us

Shared Feeds

Tech Jobs

Hidden Network

Tech Jobs Board

Hosting for an agile web