[python-uk] Tell us what you did with Python this year....
Jonathan Hartley
tartley at tartley.com
Mon Dec 20 16:41:03 CET 2010
OK, I'll bite, because what we're doing is exciting and new to me, so
maybe to others also:
Here at Resolver a couple of years ago we wrote a spreadsheet-like
desktop application entirely in Python. Cell formulae are also full
Python expressions, with a slightly augmented grammar to allow the use
of common spreadsheet-isms, such as 'A1:C4' to refer to a cell range.
This was specifically written in IronPython, with a Windows Forms GUI,
because a number of our financial industry clients wanted .Net
interoperability. We had a little trepidation about using IronPython,
but in practice it turned out to work really well for us - the
IronPython team did a really good job. Conversion between .Net and
Python types is unobtrusively and automatically done, so that, for
example, you don't have to worry about creating a .Net mapping type to
pass to a static-typed C# API - you can simply pass it a regular Python
dict, and everything magically 'just works' beautifully. In theory, we
should have been able to run cross-platform using Mono, but to get
started quickly, we used a third-party GUI component which made win32
calls. This made it impossible to run on other platforms, and with
hindsight we should have fixed this already, by replacing that GUI
component, but that's still to be done.
This year we converted that desktop application into a web application
called Dirigible. Think 'Google Docs' spreadsheet, but again with full
Python expressions in cells, plus the ability for users to inject their
own code into the recalculation process, for example to define
functions, import third-party modules, iterate over cells, etc. This is
running in CPython, as a Django app, on Amazon EC2 instances. We have
already made it possible for clients with extremely large spreadsheets
(which take hours to recalculate on Excel) to manually partition
calculations to run in parallel across several EC2 instances. Soon we
hope to make this process automatic, by examining the dependency graph
(which cells depend on which other cells) and passing large stand-alone
chunks of the graph to be recalculated on other machines.
A lot of our core code, such as formula parsing and dependency
calculation, didn't use any .Net at all, and so getting Dirigible
running under CPython using code from Resolver One was straightforward.
Nevertheless, personally I'd never done any Django nor Javascript, nor
EC2 before, and the other guys on the team weren't massively experienced
in these things either, so there was a concern about how quickly we
could make progress. Happily, we managed to go from first conception
('mkdir Dirigible') to first beta release of Dirigible in two and a half
months, and have been releasing updates every couple of days since,
which is something I'm very proud of.
Going forward, we hope that the two products will compliment each other
(web apps aren't the right solution for everyone), and that code-sharing
between the projects will mean that improvements in one (e.g. in
providing robust statistical functions, or more Excel-compatible
functions) will also improve the other.
Interested to hear anyone else's stories.
Jonathan Hartley
Resolver Systems
On 20/12/2010 12:18, Andy Robinson wrote:
> As an attempt to generate some content and balance out the "jobs" discussion....
>
> Why don't a few people here tell us what they got up to this year?
> Neat projects at work, things you learned about Python in 2010, things
> you've been playing with....
>
> I'm having a mad day but will try to post mine tonight or tomorrow...
>
> - Andy
> _______________________________________________
> python-uk mailing list
> python-uk at python.org
> http://mail.python.org/mailman/listinfo/python-uk
--
Jonathan Hartley Made of meat. http://tartley.com
tartley at tartley.com +44 7737 062 225 twitter/skype: tartley
More information about the python-uk
mailing list