Using IronPython in Umbraco – tools and links

Python syntax

The official place to go for Python info is www.python.org

For a compressed Synax description I really like codesyntax.netfirms.com/lang-python.htm (great one!).

Editing Python files : IronPython tools for Visual Studio

It’s very conveniant to be able to edit Python files in the Umbraco UI code editor. For longer coding sessions however – we soon long for the comfy Visual Studio editor. But can VS do Python? Not by default, but there’s a very good add in avaliable: IronPython Tools for Visual Studio. http://ironpython.net/tools/ Install it and you edit your Python files in VS (almost) as if you were editing C# / VB.Net. (The tools is really a part of full IronPython installation so you’ll get the whole cake with the piece.)

A quick nice way to edit your Umbraco site Python scripts:

  1. Create a new Web application in Visual Studio.
  2. Add references to current versions of umbraco.dll. cms.dll and businesslogic.dll.
  3. Add a /python folder.
  4. Start adding and editing py-files to that /python folder.

Tada! You have Python syntax check and highlight plus Umbraco classes intellisense at your fingertips – and some Python intellisense aswell. You can of course extend your app with with a /xslt folder for xslts and /usercontrols for ascx’es if you like.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s