Posts

Showing posts with the label tutorial

Cheminformatics Tutorial Using Python and Silverlight

Try Python is an online interactive Python tutorial using IronPython and Silverlight. The source code is available and open source and the tutorial material is written in a subset of the ReStructured Text markup. Noel Baoilleach has taken this a step further by creating his own version, including the Webel library library and a tutorial on using it with interactive examples. Cheminformatics Tutorial using Python and Silverlight Try Python with Cheminformatics Tutorial Recently I introduced Webel, a Python cheminformatics module that runs entirely on web services. One of the advantages of such a module is that it can be used in places where it is difficult to install a traditional cheminformatics toolkit. Like in your browser. After some little work, I present Try Python...with Cheminformatics. This adds Webel as well as a short tutorial that introduces many of its features. With a few more tutorials that cover SMILES, InChI and so on in more detail, this could be useful for t...

Getting Started with IronPython and Embedding IronPython

Charlie Calvert is Community Program Manager for the C# group at Microsoft. He has posted a couple of blog entries on using IronPython. The first shows you how to get started with IronPython on Windows, including setting up your path to easily execute Python scripts with ipy.exe. The second entry shows how to execute a Python file from C# when embedding the IronPython engine. Getting Started with IronPython I recently spent some time getting IronPython up and running on my system; I will review what I learned in this post. Hosted inside an interpreter, Python belongs to the same family of scripting tools as VBScript, JavaScript, Perl and Ruby. You can fairly compare Python to a general purpose language such as C#. Developers praise this loosely typed, dynamic language for its ease of use and rapid development capabilities. IronPython is Microsoft’s free version of the open source Python language. IronPython can be hosted inside a C# program as a scripting language. Nonetheless, ...

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 ...

A Good Mix 25: The SharePoint Object Model, IronPython Tutorial, Crazy Snake and IronRuby

Yet another collection of IronPython and DLR related articles, projects and blog entries from the past few weeks. Using the SharePoint Object Model with IronPython  The iLove SharePoint blog recently posted an example of using the SharePoint object model from IronRuby . In the interests of balance he has posted the same example with IronPython. IronPython Tutorial: Basics IronPython Tutorial: Advanced (Events, Delegates, WinForms, WPF) IronPython Tutorial: Debugging (CLR Debugger)  The AvbWiki, a Russian developer wiki, has put online several IronPython tutorial pages. It looks like it is mainly based on the tutorial that comes with IronPython 2, but could be a useful online reference on IronPython. Intellisense for IronPython  Another release from the mysterious Japanese IronPython and Windows Forms project that we've covered before . crazysnake; ironpython and java, just monkeying around  This weekend I finally got around to downloading IronPython 2.6rc1 ...

Try Python: Interactive Python Tutorial with Silverlight (and rst2xaml)

Silverlight is the Microsoft browser plugin runs on the Mac and Windows and in Safari, IE and Firefox browsers. As an added bonus it also supports IronPython , making it an ideal tool to build an interactive Python tutorial with. Try Python is an open source project that takes the official Python tutorial and puts it alongside an interactive Python interpreter running in the browser. All of the code examples have a button to execute them in the interpreter, or you can just follow the tutorial trying out the examples yourself. Try Python: Interactive Python Tutorial in the Browser Try Python Page on the Silverlight.net Community Site Try Python Announcement with Screenshots Try Python Google Code Project Page with Source Repository The Mono team are working on an implementation of Silverlight for Linux called Moonlight . The version capable of running IronPython code is Moonlight 2, but unfortunately the preview release can't yet run Try Python. Hopefully that will be fixed...

Getting started with IronPython – Part 4: MiniMax algorithm

Dror Helper continues his series on getting started with IronPython programming. He has been creating an example game and after his last entry on unit testing he moves onto adding some simple AI logic: Getting started with IronPython – Part 4: MiniMax algorithm As part of my quest to learn how to program in Python I’ve decided to implement a simple Minimax algorithm. The algorithm is simple and relies on a elementary principle – each turn you will choose the best move and your opponent will choose the worst move for you. By building a search tree with a limited depth we can then choose each time either the maximum result possible or the minimum result according to the player’s turn. You can read more about Minimax algorithm in Wikipedia – or continue reading and learn it from my implementation.

The IronRuby Tutorial

Image
Jimmy Schementi, program manager for the dynamic languages and Silverlight integration plus IronRuby developer, has pushed a new update to the IronRuby github repository . One of the major changes is improvements to the IronRuby tutorial app . "The" IronRuby Tutorial As you can see from the screenshot this is a WPF (Windows Presentation Foundation - which means it won't run on Mono) application which combines a tutorial with an integrated interpreter (REPL) for actually trying out the code: Isn’t he/she/it a bute!? This app makes Ruby-based tutorials interactive, guiding you through the material with a IronRuby REPL console and other visual aids such as another window, or whatever the tutorial writer sees fit. There is also a tutorial runner for the command-line, and a exporter for static HTML. The IronRuby tutorial included covers topics such as using the interactive window, built-in libraries, exploring .NET libraries, generics, events, Windows Forms, and Windows Prese...

Getting started with IronPython - Part 3: unit testing

This is the third part of Dror Helper's series on getting started with IronPython. Part 1 was on first steps , including useful references. Part 2 focused on the Python programming language , introducing an example game project that Dror is using to learn IronPython. As promised part 3 is on testing the game with the Python unittest module. Getting started with IronPython - Part 3: unit testing Being a TDD’er (Test Driven Developer) one of the first things I’ve searched for when I started learning IronPython is a unit testing framework, luckily for me I didn’t need to search too long. IronPython has a good unit testing framework inherited from Python called PyUnit. Writing unit tests using PyUnit is simple: import unittest class Create a class that inherits unittest.TestCase (test fixture) Write test methods using assertions methods

Getting Started with IronPython - Part 2: Let's write some code

A follow up from Part 1: where to start , this is a blog entry by Dror Helper on starting programming with IronPython. This entry mainly explores Python the language; including exceptions, classes, methods and magic methods. He has set himself the task of implementing a version of the Mancala board game . Getting Started with IronPython - Part 2: Let's write some code Playing Mancala is easy: The board has two stores (also called Mancala) one for each player and the goal of the game is to collect as many stones as possible. remark – if you don’t see the stores in the board above don’t worry my board doesn’t have any. instead I keep the seeds/stones won at the sides of the board . Each player has six pots he can play from (the ones closer to his side) in the board above my side is the six lower pots. Players alternate turns, in his turn a player choose one of his pots, takes all of the stones from that pot and places them one by one on every pot he passes in counter clockwise order....

Getting a Jump Start with IronPython

Darrell Hawley is a Microsoft C# MVP and .NET developer with an interest in IronPython. He has written an article for Packt Publishing on getting started with IronPython: Getting a Jump Start with IronPython As a .NET developer, you’ve probably heard IronPython mentioned in a blog post or an article, but do you know what it is? IronPython is Microsoft’s implementation of the Python language. Python is known for readability and its’ proponents claim that applications written with Python are done faster, use fewer lines of code and are more maintainable than those written using more traditional languages. The great thing about IronPython is that you get the advantages of the language, while being able to leverage your knowledge of the .NET framework. In this article by Darrell Hawley, we will cover a few basic aspects of IronPython and use them to create a Windows Form. The article covers using IronPython from the command line and with a code editor like Scite, working with .NET regular...

Getting Started with IronPython - Part 1 where to start

A blog entry by Dror Helper on how to get started with IronPython. Getting Started with IronPython - Part 1 where to start It seems to me that there is a lot of talk about the new .NET Dynamic Languages lately. Because I wanted to see what the DLR was all about I will learn IronPython as part of my quest to learn new programming languages. When I learn a new programming language I look up three “ingredients”: a Book, tutorials/code examples and a project. It also helps if to have a “programmer friendly” IDE that helps writing and debugging. Learning from examples scattered around the internet is possible, but I found that I learn new technology quicker when these ingredients are available. Luckily with IronPython there was not shortage of resources. He recommends Dive into Python for learning Python and the SharpDevelop IDE . He also links to several online resources for learning IronPython.

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...

Rob Oakes: Learning IronPython

Rob Oakes has set about learning Python through IronPython, and has written a series of articles that both document his progress and serve as a tutorial for others following in his footsteps. He starts with a confession and a manifesto: Learning IronPython - Part 1 - A Halfhearted Manifesto There are certain times for confessions, and now seems like such a time so … here goes: My name is Rob, and I’m an addict. I am addicted to Matlab. If I didn’t have Matlab, my productivity would go to near-zero. For this reason, like any good junkie, I tolerate its expensive fees, obnoxious quirks and serious limitations. That is, until recently. Some recent events, however, have forced me to start looking for alternatives. [...] I have made a serious decision: I am going to learn Python! And why Python? Like Matlab, it is a dynamic (or scripting) language. Like Matlab, it has an enormous number of existing libraries and functions available. Indeed, after a bit of surface scratching, I’ve come to t...

Introduction to XAML and WPF with IronPython : Part Four

After a long break Davy Mitchell continues his tutorial series on using WPF (the Windows Presentation Foundation UI library - new in .NET 3) from IronPython. This fourth entry creates a user interface with a stack panel, listbox and button. It creates the UI at runtime by reading in the XAML (an XML dialect for describing WPF UIs) and then hooking up the event handlers. Introduction to XAML and WPF with IronPython : Part Four Blog entry with links to all four parts of the tutorial " This article gives a bite size introduction to WPF (Windows Presentation Foundation) programming with IronPython. It is assumed you have a working knowledge of Python and can run IronPython programs from the command line. Please note that .Net 3.0 is required for WPF applications. "

ASP.NET: Beginning IronPython - Creating an Update Form (Part 4)

Part 4 of the IronPython on ASP.NET tutorial is out. This one works with the databases and Python classes from the previous tutorials, and creates a form along with the machinery to receive form submissions from the user. As always the code is available to download: Beginning IronPython - Creating an Update Form (Part 4) " In the next tutorial, we'll look at some dynamic features of Python to reduce code and decrease the time it takes to create a form. You can download both the IronPython and C# source codes below. "

Beginning IronPython - Creating a class (Part 3)

ASP.NET IronPython Resource continues the IronPython and ASP.NET tutorial with an introduction to creating Python classes and using them from within ASP.NET. Beginning IronPython - Creating a class (Part 3) " In this tutorial we will be creating a sql table based class for a simple form. It will demonstrate how to create a class and reference it from a form. " " That's it for this tutorial. The next tutorial will go into something practical - creating and updating live data on a form. The code files can be downloaded below. Remember to change the connection string to point to an AdventureWorks database. "

IronPython Projects, IronPython IDEs and Python in the Browser with Silverlight

Image
IronPython in Action is nearly complete, and once it really is finished I will have more time to work on projects that have been waiting in the wings. This includes several IronPython related projects (including a documentation tool that runs under IronPython, user controls specified in XAML for dynamic languages for WPF and Silverlight, and an IronPython IDE): Too Many Projects, Too Little Time The IronPython IDE of course is IronEditor , a project by Ben Hall to create an IDE for Dynamic Language Runtime languages and to run on Mono and .NET. The Industrialization of Software blog has a great roundup of (.NET) dynamic language IDEs and interactive environments. He is particularly focussed on web based environments: Web Based IDE's and Dynamic Languages on .NET His blog entry mentions Silvershell , a Python interpreter that runs inside Silverlight 2. It is written by Dan Eloff and has nice features like auto-indentation and completion. Currently it only works on IE, but Dan wil...

Try Python: Python in the Browser with IronPython & Silverlight

A while ago I experimented with an interactive Python interpreter that ran in the browser using Silverlight. Unfortunately a couple of bugs with the version of IronPython for Silverlight prevented it from working properly. Now that Silverlight 2 Beta 2 is out, along with an updated version of IronPython for Silverlight , those bugs have been fixed. "Python in the Browser" is an interactive Python interpreter that runs in the browser, using Silverlight 2 and IronPython. The project is hosted on google code, and although there is no packaged release you can download all the code and docs on customizing it from: Python in the Browser Home Page As well as being ideal for providing live examples in documentation, my goal is to (eventually) provide an online tutorial for learning Python that runs entirely in the browser. Currently all that is on the site is a live example of "Python in the Browser": Try Python It requires Silverlight 2 Beta 2, and the Python version is 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

IronPython - Classes within separate files

Ben Hall comes to IronPython from 'traditional' .NET languages like C# and VB.NET, which have a different way of structuring applications into namespaces. In this blog entry he explores how Python uses files to arrange classes into modules: IronPython - Classes within separate files