Posts

Showing posts with the label winforms

A Good Mix 26: Winforms in Arabic, xbuild, Mono on Mandriva, Scheme and Poker

Still working through the large collection of IronPython and DLR related articles that I've discovered in the last few weeks. Only a few more to go. Windows Forms with Mono and IronPython - in Arabic  This is a translation of the Winforms with Mono and IronPython Tutorial Series  into Arabic. It includes implementations of Snake and Tetris games as the final two parts of the tutorial showing how to create applications with IronPython on Mono or .NET.   xbuild and Mono 2.6p1 A blog entry on new features in Mono 2.6 which has just had a preview release . Included in the release is xbuild , the Mono implementation of the MSBuild tool. xbuild is now compatible enough that it is capable of building IronPython and IronRuby. Mandriva 2009.1 on mono and IronPython This is a Japanese blog entry on using IronPython 2.0 with the Mandriva Linux distro. From the same blogger who has also blogged about IronEditor ,  IronScheme - An R6RS conforming Scheme implementation ...

Guido van Rossum on IronPython in Action (he doesn't like Windows Forms but Davy Mitchell does)

Guido van Rossum is the creator of Python and its Benevolent Dictator for Life (BDFL). He is employed by google and not known for his love of the Windows platform. That aside I sent him a copy of IronPython in Action and he has reviewed it. As you can tell from the title of his blog entry it isn't a typical review, but he does say some very nice things about the book: IronPython in Action and the Decline of Windows Seeing a book like IronPython in Action, by Michael Foord and Christian Muirhead, is another milestone for IronPython. This is a solid work in every aspect, and something nobody using IronPython on .NET should be without. The book is chock full of useful information, presented along with a series of running examples, and covers almost every aspect of IronPython use imaginable. There are some introductory chapters -- some fluff about .NET and the CLR, an introduction to Python, and an introduction to with .NET objects from IronPython. The Python introduction has a slight ...

DateSelector and Excel COM Automation Examples

Greg Bray has been using IronPython since entering (and winning) a round of the Resolver Systems spreadsheet competition . Since then he has had fun experimenting with IronPython has posted a couple of fairly complex example programs to his blog. IronPython Excel Com Automation: Pivot this! I have been playing around with IronPython recently while creating spreadsheets in Resolver One . So far I have been having a lot of fun, but I haven't really been doing anything that would be useful in a work setting. The main reason for this is because most of the spreadsheet work that I do revolves around pivot tables and Auto Filter, which are immensely helpful for visually analyzing data. I thought I might try and use Excel's COM Automation to add Pivot Charts and Auto Filter to any system with IronPython, and here is the code that I have come up with so far. ... The code should be pretty straight forward. The Reload() method is helpful for reloading the whole module when testing from ...

Pygments for Windows Live Writer

Pygments is an extremely versatile Python library that does syntax highlighting. It not only supports many input languages , but can also output in many common markup formats (for wikis and so on). Windows Live Writer is a WYSIWYG Windows blogging tool by Microsoft. It allows you to write blog entries on your desktop (shock news - not everything needs to happen online), including adding images and videos. It integrates with blog services like Windows Live, Wordpress, Blogger, Live Journal, TypePad, and many more. I've never used it, but hear good things about it from developers I respect. Devhawk (Harry Pierson the Microsoft IronPython PM) uses live writer, and has written a plugin that uses IronPython and Pygments with a Windows Forms multi-line textbox as the code editor window. Pygments for Windows Live Writer Pygments for WL Writer is a smart content source. In WL Writer’s terminology, that means when you click inserted text in the editor window, it is treated as an atomic e...

Winforms with Mono and IronPython Tutorial Series

IronPython runs great on Mono, and if you use the official Mono installer then IronPython is included out of the box. (Although the version of IronPython 2 is quite old now and could really do with being updated - when I tried it the latest Windows binary worked fine on Mac OS X which isn't something you hear often. For Debian and Ubuntu users it is as easy as apt-get ironpython .) So cross platform application development with IronPython is really possible, and for client applications Windows Forms is the GUI toolkit to use. Although it looks ungainly by default on non-Windows operating systems, with customization it is possible to create applications that look great on Windows, Linux and the Mac. Up on ZetCode there is a 12 part tutorial on creating applications with IronPython and Windows Forms on Mono. It covers the basics, plus dialogs, advanced use of controls, drag and drop and handling painting yourself. It even creates Snake and Tetris applications as examples! Anyway - lo...

Blogpingr goes GUI

Blogpingr is a Python command line tool for pinging xml-rpc services when you write a new blog entry. Norman Kosmal has been playing with IronPython, so he decided to use it to give blogpingr a GUI: IronPython: Blogpingr goes GUI Now diving into IronPython I decided to give blogpingr a GUI. I am lazy, just so you know and using a shell to execute the programm got me bored. Also this probably is a good oportunity to check out how you can use window forms from within IronPython. Of course credit goes to Borislav Gizdov`s for coming up with blogpingr in the first place. I just hooked his code into IronPython structures. I still got to add threads to this programm so the methods won`t lockdown the textbox on execution. Maybe I will add some inplace editing functions to add, edit or remove rpc servers from the .conf file. Once that is down I will release the source on this blog. So stay tuned for updates.

GeckoFX (Firefox) WebBrowser Control from IronPython

A Japanese blogger shows off how to use the GeckoFX (Firefox) Windows Forms WebBrowser control from IronPython. This allows you to embed webpages in Windows Forms applications using the Gecko rendering engine. GeckoFX WebBrowser Control from IronPython The example code uses the winforms sample that comes with IronPython: import sys sys.path.append("(IronPythonTutorial") import winforms from System.Windows.Forms import * f = Form() f.Text = "GeckoFX" f.Show() import clr clr.AddReference("Skybound.Gecko.dll") from Skybound.Gecko import * Xpcom.Initialize("(Firefox 3") browser = GeckoWebBrowser() browser.Parent = f browser.Dock = DockStyle.Fill browser.Navigate("about:robots")

Functional Testing of Desktop Applications

I've published series of articles on the functional testing of GUI applications. It is based on a talk that I gave at PyCon UK . Functional Testing of Desktop Applications The user interface toolkit used for the examples is Windows Forms driven from IronPython. The examples are available for download, and test a small program called "MultiDoc", the example application from chapters 4-7 of IronPython in Action . The techniques and testing patterns used in the articles are not tied to IronPython at all. The topics and principles discussed are relevant to the testing of all desktop applications, whichever framework you are using (almost...). Topics covered include: The why and how of functional testing - including the processes and infrastructure you need around them Basic principles of practical testing Common problems and ways to overcome them

Custom Fixed Size ListBox Items in IronPython in 30 Seconds

Ross was one of the developers who attended our IronPython tutorial at PyCon UK. Prior to the tutorial he was experimenting with Windows Forms. This recipe is a snippet of code for drawing fixed height custom listbox items (by handling the ' DrawItem ' event): Custom Fixed Size ListBox Items in IronPython in 30 Seconds From another blog entry , he comments on working with Windows Forms from IronPython: "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. "

IronPython Tutorial and Twatter on Mono

Image
It's only a few days until PyCon UK . Christian, Menno and I have been preparing the IronPython tutorial and there is new information on the wiki about what you will need if you are attending. IronPython Tutorial on the PyCon UK Wiki Page We will support IronPython on Linux, Mac (both via Mono) or Windows - and you get to take your pick of four different databases. During the tutorial we will work through creating a windows forms based Twitter client called Twatter . There are more details on my blog, along with a screenshot of it running on the Mac and a screenshot of the example application for the early chapters of IronPython in Action . Twatter and MultiDoc on Mono Windows Forms Since I wrote that entry Christian has done some more work, and Twatter now fetches images of tweeters. Here's a screenshot of it running with IronPython 2 and Mono 2.0 preview 3 on the Mac:

GUI Automation: Building the Framework (1)

Lukas Cenovsky continues his series on the functional testing of GUI applications with IronPython on the GUI Automated Testing Blog. He has already covered the basics, how to access a winforms application that we want to test, run it in a separate thread, and simulate user input. In this entry he takes a more methodical look at some of the components involved in testing a winforms application and starts to build up a testing framework (source available): Building the Framework (1)

IronEditor: An Editor for Dynamic Languages on .NET

Ben Hall, a .NET developer from the UK, has announced a new project to create an IDE specifically targeting IronPython and IronRuby. In the future the project will also be extended to cover all languages that use the Dynamic Language Runtime. Announcing IronEditor - An Editor for IronRuby, IronPython and other DLR languages IronEditor Homepage and Download on Codeplex Ben's goal is to create an IDE for Dynamic Languages that is lighter-weight than Visual Studio. Out of the box the project already supports IronPython and IronRuby, including the creation of new projects or source files and executing code. IronEditor is based on Windows Forms and has a syntax highlighting code editor. Currently to build IronEditor you will need Visual Studio 2008 (Express is fine), but there is a binary available for download. The blog entry shows screenshots of IronEditor running on Mono. Mono compatibility is an important goal for IronEditor. Currently the only feature missing on Mono is syntax high...

Exploring Test Application - IronPython (2)

A new entry on the GUI Automated Testing blog. This furthers the exploration of how to functionally test Windows Forms applications with IronPython - using some clever (but simple) reflection techniques. Exploring Test Application - IronPython (2)

IronTextBox 2

IronTextBox is a project that puts an interactive IronPython interpreter into a Windows Forms textbox, for providing an interactive environment in .NET applications. IronTextBox 2 is an updated version that works with IronPython 2: IronTextBox 2

Catching Unhandled Exceptions in .NET

.NET provides two different APIs for handling two different types of 'program crashes'. The types of crashes both result in different dialogs; unhandled exceptions on the Windows Forms event loop are called "Thread Exceptions", and unhandled exceptions on a background thread are called "AppDomain Errors".  Menno finds his way through this confusion and shows how your program can exit gracefully in the event of either type of error: Catching Unhandled Exceptions in .NET

Accessing IronPython Objects from Javascript in the Winforms WebBrowser Control

Srivatsn has a blog entry showing how to expose IronPython objects to Javascript in the Windows Forms WebBrowser control. Accessing IronPython Objects from native Javascript This could be very useful combined with this technique for creating standalone desktop Silverlight applications .

A Front-end for an IronPython DSL

David Seruyange is experimenting with a windows forms front end for Twining , his IronPython DSL for working with databases: Twy, an experimental front-end for Twining

Flicker Free Syntax Highlighting

Chris Redford looks at the problem of implementing flicker free syntax highlighting in a rich textbox from IronPython: Flicker Free Syntax Highlighting - a .NET Solution

Python GUI Programming Platforms for Windows

The GITS blog has a great entry showing the code (and results) for quite a few of the alternatives for Windows GUI Programming. It includes all the usual suspects (well, most of them), as well as native-win32 with ctypes and IronPython and Windows Forms: Python GUI Programming Platforms for Windows

IronPython on eee PC and OLPC

I've just received my Asus eee PC (8GB/1GB). It's very nice, unbelievably cute. I would have bought an OLPC of course, but they won't ship to the UK... Anyway, I have no reports on IronPython running on either of these devices. There are reports of Mono running on both though, and as Mono comes with IronPython it should be straightforward: Mono on the OLPC Mono on the eee PC Those who don't believe that it is possible to create good looking desktop applications with Mono and its Windows Forms implementation need to check out Plastic SCM: Plastic SCM 2.0 Preview (Miguel has screenshots on the Mac and Linux .) Oh, one final thing. Second Life offers a fantastic three dimensional virtual reality to explore. What is the obvious geek thing to do then? Build a text based interface for it of course! If this sparks your interest, then you may want to checkout 'SLTalker' and help write it in IronPython: Call for IronPython Coders to Help with SLTalker