tag:blogger.com,1999:blog-36045154387874088422024-03-13T00:39:28.962+00:00IronPython URLsIronPython URLs is an aggregator for articles, news and links on IronPython and the Dynamic Language Runtime.
<br><br>
IronPython is an implementation of Python, the popular dynamic programming language. It is built on the DLR, and runs on the Microsoft .NET framework and Mono.hexdump42http://www.blogger.com/profile/13884562284992556003noreply@blogger.comBlogger977125tag:blogger.com,1999:blog-3604515438787408842.post-75552036313206180652010-07-17T13:59:00.001+01:002010-07-17T13:59:38.870+01:00IronPython 2.7 Alpha 1 release (and license change)The IronPython team have just announced the first release of IronPython 2.7, an alpha 1 release. This targets compatibility with Python 2.7, and comes with interesting news about the license that IronPython is released under. There is also more of Python's standard library included; specifically two more C extension libraries previously unavailable with IronPython.<br />
<br />
The next release of IronPython will probably be a bugfix release of IronPython 2.6: 2.6.2. Once 2.7 is complete the IronPython team will move onto IronPython 3, targeting compatibility with 3.2 - which is likely to be the current version of Python 3 when IronPython 3 is completed.<br />
<br />
<ul><li><a href="http://lists.ironpython.com/pipermail/users-ironpython.com/2010-July/013310.html">IronPython 2.7 alpha 1 release announcement</a></li>
<li><a href="http://ironpython.codeplex.com/releases/view/42434">Download IronPython 2.7 alpha 1</a></li>
<li><a href="http://ironpython.codeplex.com/wikipage?title=IP27A1VsCPy27Perf">IronPython 2.7a1 compared to CPython 2.7: Performance report</a></li>
</ul><blockquote><blockquote>We’re pleased to announce the Alpha release of IronPython 2.7 which can be downloaded at http://ironpython.codeplex.com/releases/view/42434. This is a major new version of IronPython with a number of significant updates. Because this is an Alpha release it is not yet feature complete nor fully compatible with CPython 2.7. Changes thus far include:</blockquote><blockquote><ul><li>Updates the language to be compatible with CPython 2.7</li>
<li>Adds integrated Visual Studio support (IronPython Tools for Visual Studio)</li>
<li>Extends CPython 2.7’s documentation with useful information pertaining to IronPython</li>
<li>Adds the mmap and signal modules</li>
<li>Includes a number of performance updates and bug fixes</li>
<li>Switches the license to Apache License, Version 2.0</li>
<li>Requires .NET 4.0 and Silverlight 4.0</li>
</ul></blockquote><blockquote>Python 2.7 includes a number of features backported from the Python 3.0 series. This release implements the new builtin _io module, includes dictionary and set comprehensions, set literals, supports multiple context managers in the with statement, and adds several new functions to the itertools methods, and auto indexing for the new string formatting. There are also numerous updates to the standard library such as ordered dictionaries and the new argparse module.</blockquote><blockquote>This release also includes a “IronPython Tools for Visual Studio” option within the IronPython installer. This enables one install to get both IronPython and IronPython Visual Studio support assuming you have an existing installation of Visual Studio 2010. This version of IronPython Tools includes a number of bug fixes as well as the start of improved WPF designer support. We discovered very late that the WPF designer support may crash VS when not running under the debugger. If you’d like to try the WPF designer support and give us feedback, just launch another Visual Studio instance and attach to the instance in which you are using the WPF designer support.</blockquote><blockquote>We’ve also updated the IronPython installer to include documentation based upon the CPython documentation. This new .chm file includes documentation on the Python language and standard library. It’s been extended from the normal Python documentation to include IronPython specific topics such as the DLR hosting APIs and extending IronPython from statically typed .NET languages. </blockquote><blockquote>We flushed out more support for missing built-in modules which CPython includes. This release includes the mmap and signal modules bringing better support for interoperating with unmanaged code.</blockquote><blockquote>As usual there are a number of bug fixes and performance improvements. This release includes major performance improvements in cPickle, the sum built-in function, and includes support for fast exceptions which do not use the .NET exception mechanism. There have also been improvements to significantly reduce memory usage of the IronPython ASTs. One of the end results of these numerous improvements is that IronPython’s startup time has decreased by 10% when compared to IronPython 2.6.1.</blockquote><blockquote>Finally, with this release we have changed the license from the Microsoft Public License to the Apache License, Version 2.0. We’ve made this change based upon continual feedback and questions from the community. The Apache License will be more familiar while remaining an open source license.</blockquote><blockquote>- The IronPython Team</blockquote></blockquote>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-54856814933971149282010-07-10T00:30:00.000+01:002010-07-10T00:30:34.007+01:00NumPy and SciPy for IronPython and .NETThe genius of IronPython is that it provides great integration with .NET libraries. The cost of this is that you no longer have access to Python extensions implemented in C unless the IronPython team, or a third party, has created an equivalent version in C# or wrapping an existing .NET library.<br />
<br />
One very powerful and widely used set of Python extensions come in the form of <a href="http://numpy.scipy.org/">NumPy and SciPy</a>. This is a particular problem for those interested in IronPython as there is nothing of equivalent functionality and quality in the .NET world.<br />
<br />
There is an existing way of accessing Python C extensions from IronPython in the form of <a href="http://www.resolversystems.com/products/ironclad/">Ironclad</a>. Ironclad was <i>specifically</i> designed to work with NumPy, and it works astonishingly well, but it can never be as good as a native library.<br />
<br />
Microsoft are obviously very interested in NumPy as they have just announced an interesting partnership with <a href="http://www.enthought.com/">Enthought</a>, a company who are active in the Scientific Python community. The partnership is specifically to bring a .NET implementation of NumPy to IronPython. The announcement was made at the <a href="https://conference.scipy.org/scipy2010/index.html">SciPy 2010 conference</a>.<br />
<br />
<ul><li><a href="http://www.enthought.com/media/SciPyNumPyDotNet.pdf">Enthought Announces Plans to Extend SciPy/NumPy to Microsoft's .Net (pdf)</a></li>
<li><a href="http://www.prnewswire.com/news-releases/enthought-announces-plans-to-extend-scipynumpy-to-microsofts-net-97601984.html">Enthought Announces Plans to Extend SciPy/NumPy to Microsoft's .Net (press release)</a></li>
<li><a href="http://www.johndcook.com/blog/2010/07/01/scipy-and-numpy-for-net/">SciPy and Numpy for .NET (blog entry by John Cook)</a></li>
</ul><div><blockquote>Enthought, Inc., a leading Python and Scientific Computing technology provider announces plans to extend the SciPy and NumPy libraries to IronPython and the .Net Framework. Availability of these libraries on .Net provides advanced technical computing tools to the flexible, fully-featured Microsoft Windows software environment.</blockquote><blockquote>"These libraries are fundamental building blocks for technical computing applications, and we are very excited to see them become available to IronPython and the .Net community," said Shahrokh Mortazavi, Architect in Microsoft's High Performance Computing Group.</blockquote><blockquote>"It is exciting to witness the impact SciPy and NumPy have had on the technical computing community over the last decade. We are excited to unleash the power of these tools to a whole new group of users on the .Net platform," said Travis Oliphant, president of Enthought, addressing the attendees of the SciPy 2010 conference in Austin, TX. </blockquote><blockquote>SciPy and NumPy are a suite of high-performance statistical and numerical tools for the Python programming language. They are used primarily for rapid data processing and analysis in scientific and quantitative applications. Enthought principals, Eric Jones and Travis Oliphant, were the initial authors of SciPy, and Travis was the primary author of NumPy. Both tools are actively maintained and enhanced by a large open-source community, and have been widely adopted by leading researchers, institutions, and commercial enterprises worldwide. </blockquote><blockquote>The .Net Framework consists of a Common Language Runtime (CLR) abstraction layer over the operating system, pre-built class libraries for low-level programming tasks, and a range of specialized development frameworks and technologies that enable reusable custom applications. The collaborative effort announced today will enable existing Python applications utilizing NumPy and SciPy to run un-modified on IronPython and to take advantage of the high-performance Just-In-Time (JIT) compiler technology built into the .Net framework. </blockquote></div><div><br />
</div><div><br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-76964361945381919462010-07-10T00:15:00.001+01:002010-07-10T00:17:53.943+01:00IronPython Tools for Visual Studio CTP3At PyCon this year Dino Veihland announced IronPython Tools for Visual Studio, an extension to Visual Studio 2010 for working with IronPython. It features Python syntax highlighting, awesome auto-complete (intellisense) and a host of other features for working with IronPython code in Visual Studio. It can be used with the free Visual Studio shell and doesn't require you to own a full copy of Visual Studio.<br />
<br />
The third CTP (Community Technology Preview) has been made available for download.<br />
<br />
<ul><li><a href="http://ironpython.net/ironpython/tools/">IronPython Tools for Visual Studio</a></li>
</ul><div><blockquote>We are happy to announce a minor update to the IronPython Tools for Visual Studio. IronPython Tools for Visual Studio (IPyTools) is a set of extensions available for Visual Studio 2010 which supports development of IronPython applications. This release is our 3rd Community Technical Preview (CTP) and builds upon the previous two releases. The release is a minor update which includes bug fixes and a number of small features. You can download the latest release at http://www.ironpython.net/ironpython/tools/</blockquote><blockquote>There is also one major change in that the project system is no longer based upon the files which live on disk. Instead we now follow the normal VS project model. This means files must be explicitly added to the project and files which you don’t want in the project won’t automatically show up. We made this change based upon feedback from people using the tool and think it will make it more familiar for normal Visual Studio users. Despite this change there is still support for an “implicit” project when working without a project.</blockquote><blockquote>Like the previous release this release includes support for Intellisense including member completion, signature help, find all references, and goto definition. It enables quick browsing of your code using the object browser and the editor navigation bar. It has an interactive (REPL) window that enables the development of applications in an interactive way. IPyTools supports lightweight development without a project as well as working with project files in the tradition of Visual Studio . Opening a .py file causes IronPython Tools to model the code in the containing directory as an implicit project for Intellisense features. There are project templates for console, WPF, WinForms, and Silverlight applications. WPF applications support drag-and-drop UI development. Debugging of Python applications works just like you debug other languages in Visual Studio.</blockquote><blockquote>We are still working on our final licensing terms for IronPython Tools, and as such this release is licensed under a temporary limited use license. While we weren’t able to finalize this for this release we expect to have this finalized for the next release.</blockquote><blockquote>The full list of changes includes a number of bug fixes:</blockquote><blockquote><ul><li>Interactive window now respects VS color settings</li>
<li>Fixed default settings for insert tabs, enter completing options, list of characters to complete to</li>
<li>Fixed auto-indent inserting extra tabs on a blank line</li>
<li>Enables usage of VS common settings for smart indentation and tabs and respects those options.</li>
<li>Escape in REPL cancels both the intellisense session and the current input</li>
<li>REPL: When a completion item is focused but not selective enter should not complete it</li>
<li>REPL: We should respect the various intellisense completion options</li>
<li>REPL: We should be using IronPython’s auto intending</li>
<li>Fix repl not respecting smart up/down on startup if the window was set to be open</li>
<li>REPL: Don’t allow history if the current command is still running – instead navigate the buffer</li>
<li>REPL: Enable syntax highlighting even if a command throws an exception</li>
<li>REPL: Remove trailing new lines from REPL history so we go back to the last line of input</li>
<li>REPL: When pasting ensure there’s a new line</li>
<li>REPL: Auto indent should delete selected lines when pressing enter</li>
</ul></blockquote><blockquote>There are also a few new features:</blockquote><blockquote><ul><li>New Fill Comment Paragraph feature</li>
<li>Implemented auto-dedent so it will backspace # of tabs</li>
<li>Support for disabling intellisense via normal VS mechanism</li>
<li>Support for hiding “advanced” members in intellisense (currently defined as __abc__ members)</li>
</ul></blockquote><blockquote>There is one major change:</blockquote><blockquote><ul><li>Removes directory based projects in favor of normal VS style projects</li>
</ul></blockquote><blockquote>- The IronPython Team</blockquote></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-91487178116097833352010-06-19T21:21:00.000+01:002010-06-19T21:21:49.437+01:00Iron Web Analyzer and Scripting TIBCO SpotfireIronPython is a great language for application development, but also provides a readymade scripting engine for adding to .NET applications.<br />
<br />
A fresh example of the first, an application written in IronPython, is the open source "Iron Web Analyzer" (Windows only I believe):<br />
<br />
<ul><li><a href="http://ironwebanalyzer.sourceforge.net/">Iron Web Analyzer - Analyze Web Sites with Iron Python</a></li>
</ul><blockquote>Iron Web Analyzer is an open source application for web masters to analyze web sites content. Iron Web analyzer employ Iron Python to analyze server responed data. Iron Web Analyzer downloads data from server and dispatches them between Iron Python Analyzer installed on application and collect analyze results produced by Python applications.</blockquote><div>An example of the second use case for IronPython is the recently announced support for IronPython scripting in TIBCO Spotfire:</div><div><ul><li><a href="http://spotfire.tibco.com/community/blogs/tips/archive/2010/03/27/using-script-controls-to-automate-tasks-in-tibco-spotfire-and-tibco-spotfire-web-player.aspx">Using Script Controls to automate tasks in TIBCO Spotfire and TIBCO Spotfire Web Player</a></li>
</ul><blockquote>In TIBCO Spotfire version 3.1, TIBCO introduces the concept of Script Controls. Scripts Controls provide the ability to add IronPython scripts into a Text Area inside a Spotfire Analysis file. The script has access to the full Client API (from the SDK), and its goal is to perform common automation tasks.</blockquote></div><div><br />
</div><div><br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-33403485307247947912010-06-19T20:52:00.001+01:002010-06-19T20:52:24.382+01:00SharpDevelop 4 and unittest2Two weeks ago I reported on the latest news from SharpDevelop, the <a href="http://ironpython-urls.blogspot.com/2010/06/unit-testing-with-ironpython-in.html">integration of unittest into SharpDevelop 4</a> for testing with IronPython. In my report I suggested that supporting <a href="http://pypi.python.org/pypi/unittest2">unittest2</a> would be even better and Matt Ward has risen to the challenge.<br />
<br />
Matt's latest blog entry shows how to use unittest2 to run IronPython unit tests in the forthcoming SharpDevelop 4 IDE:<br />
<br />
<ul><li><a href="http://community.sharpdevelop.net/blogs/mattward/archive/2010/06/02/SharpDevelopAndPythonUnitTest2.aspx">SharpDevelop and unittest2 for Python</a></li>
</ul><div><blockquote>SharpDevelop 4 has been updated to support running IronPython unit tests that use the unittest2 library.</blockquote><blockquote>Make sure unittest2 is on the Python path before running the unit tests.</blockquote><blockquote>Out of the box SharpDevelop will actually use the unittest library's test runner. This seems to work however if you actually need to use the unittest2 test runner then you can modify the following two files in the folder: <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">AddIns\AddIns\BackendBindings\PythonBinding\TestRunner</span>.</blockquote><blockquote><ul><li>sdtest.py </li>
</ul></blockquote><blockquote><ul><li>sdtestrunner.py</li>
</ul></blockquote></div><div><br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-8824554785280629142010-06-15T11:53:00.000+01:002010-06-15T11:53:41.453+01:00IronPython at TechEd<a href="http://www.microsoft.com/events/techednorthamerica/">TechEd 2010</a> has just finished, one of Microsoft's biggest developer conferences. Lisa Feigenbaum, who is program manager for the Visual Studio Languages Community, has posted a blog entry with links to all the <a href="http://blogs.msdn.com/b/lisa/archive/2010/06/14/visual-studio-language-amp-ide-resources-from-teched-north-america-2010-c-vb-f-ironpython-ironruby.aspx">Visual Studio Language & IDE Resources from TechEd North America 2010</a> (C#, VB, F#, IronPython, IronRuby).<br />
<br />
Our own inestimable Dino Viehland, the IronPython workhorse and genius, was there and gave two presentations on IronPython:<br />
<br />
<ul><li><a href="http://microsoftpdc.com/Sessions/FT30">USING DYNAMIC LANGUAGES TO BUILD SCRIPTABLE APPLICATIONS</a></li>
</ul><blockquote>Abstract: The Dynamic Language Runtime (DLR) brings the power of dynamic languages to Microsoft .NET. It provides the plumbing for IronPython and IronRuby, a shared language hosting API, and also enables interoperability with static languages like C# and Visual Basic. Come hear how you can leverage these technologies in your own applications, and learn why dynamic languages deserve a spot in your toolbox!</blockquote><div><ul><li><a href="http://us.pycon.org/2010/conference/schedule/event/9/">IRONPYTHON TOOLS</a></li>
</ul><blockquote> Abstract: IronPython Tools for Visual Studio is an extension for Microsoft Visual Studio which provides Python programmers with a great development experience inside of Visual Studio. It supports all of the usual Visual Studio features such as editing including rich Intellisense, debugging, light weight Python projects, and participating in Visual Studio solutions. In addition to the usual Visual Studio features it also supports a REPL window for a lightweight development experience which Python developers are accustomed to. Come and see IronPython Tools in action and see some new and exciting ways to work in Visual Studio.</blockquote></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-14972833816604993492010-06-09T13:29:00.000+01:002010-06-09T13:29:09.438+01:00Finding lyrics and converting Word files to textTwo fun, and possibly useful, recipes using IronPython have surfaced in blog entries recently.<br />
<br />
<ul><li><a href="http://remark.wordpress.com/2010/06/04/finding-lyrics/">Re.Mark: Finding Lyrics</a></li>
</ul><div>This first recipe is from Mark Bloodworth, a Microsoft architect with a fondness for Python and IronPython:</div><div><blockquote>I was looking some lyrics up online this week, so I wondered how hard to would be to write a simple application to find lyrics to your favourite song. Or to your least favourite song. Or, in fact, to any arbritrary song. Via <a href="http://www.programmableweb.com/">programmableweb</a>, I found the <a href="http://lyricsfly.com/api/">API</a> to <a href="http://lyricsfly.com/">lyricsfly</a>, which looked easy to use. Another IronPython console app beckoned.</blockquote><blockquote>Keeping it simple, I decided to use optparse to parse the command-line options and urllib to make the http calls. This way the program can be called with the user_id that lyricsfly requires (head to their website and you can get a temporary weekly key to try this out) along with the artist name and song title. What I decided not to do at this stage was to process the resulting XML. Or handle any errors. Or handle cases where the user_id, artist or title is not supplied. But, although rudimentary, it works. ...</blockquote></div><div><ul><li><a href="http://zen4ever.posterous.com/converting-word-files-to-plain-text-with-iron">Converting Word files to plain text with IronPython</a></li>
</ul><div><blockquote>While S<a href="http://msdn.microsoft.com/en-us/library/microsoft.office.tools.word.document.saveas.aspx">aveAs method in Word has Encoding parameter</a>, it wasn’t quite clear, how would I specify it from pywin32.</blockquote><blockquote>So, my next attempt was to use IronPython, since it has native .NET interface with Office. The biggest advantage of this approach was the fact that you can do dir() on all objects and methods in IronPython shell.</blockquote><blockquote>After some googling on encodings, and IronPython Word scripting, here is the script I came up with. ...</blockquote></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-86146584508319287532010-06-02T18:00:00.001+01:002010-06-02T18:02:02.623+01:00Unit Testing with IronPython in SharpDevelop 4Microsoft may have finally pulled out their collective thumbs and started to <a href="http://ironpython-urls.blogspot.com/2010/05/ironpython-tools-for-visual-studio.html">support IronPython in Visual Studio</a>, but SharpDevelop has always led the way <a href="http://ironpython-urls.blogspot.com/2007/10/ironpython-support-in-sharpdevelop.html">as far back as 2007</a> in supporting IronPython.<br />
<br />
SharpDevelop 4 is now under development and integrates with the <a href="http://docs.python.org/library/unittest.html">unittest module</a> to support unit testing with IronPython. This feature requires Python 2.6 to be installed, and IronPython debugging is not currently working with SharpDevelop 4, but it looks like it will a great release.<br />
<br />
Matt Ward gives us the details in his latest entry on the SharpDevelop community blog:<br />
<br />
<ul><li><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: 'Lucida Grande'; font-size: 13px; white-space: pre;"><a href="http://community.sharpdevelop.net/blogs/mattward/archive/2010/06/01/UnitTestingWithIronPython.aspx">Unit Testing with IronPython</a></span></li>
</ul><div><span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 13px; white-space: pre;"></span></span><br />
<span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 13px; white-space: pre;"><blockquote>SharpDevelop 4 has been updated to support unit testing with IronPython.</blockquote><blockquote>First you will need to install Python 2.6. SharpDevelop uses the standard Python unit test library (unittest.py) to run the unit tests.</blockquote><blockquote>...</blockquote><div><blockquote>Once the project reference is added the unit tests can be run in the normal way by right clicking in the Unit Tests window and selecting Run tests. You can run all the tests in a project, all tests in a class or a single test method.</blockquote><blockquote>The output generated when running the unit tests is shown in the Output window.</blockquote><blockquote>Test failures are displayed in the Errors window. Clicking an error will open the corresponding code in the editor.</blockquote><br />
Of course support for <a href="http://pypi.python.org/pypi/unittest2">unittest2</a> would be even better... </div></span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-3478208869891109612010-05-25T19:21:00.000+01:002010-05-25T19:21:25.832+01:00A Good Mix 36: Jim Hugunin, Selenium Two, Embedding IronPython & IronPython with Expression Blend<span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"><span class="Apple-style-span" style="font-size: 11px;"><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: 13px; line-height: 16px;">Another collection of IronPython and DLR related articles from recent weeks.</span></span></span><br />
<br />
<ul><li><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><a href="http://www.modelingtheworld.com/#s=%2F3%2F12">Jim Hugunin: Modelling the World</a></span></span></li>
</ul><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;">Jim Hugunin is a <i>bit</i> of a Python veteran. As well as being the creator of two implementations of Python (Jython and IronPython), he also started the Numpy project (back when it was called Numeric). Not long ago he was swallowed by Microsoft, who also took on the development of IronPython and turning it into the Dynamic Language Runtime.</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><br />
</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;">In this video interview Jim explains not only how he got involved in Python, but also what he has been up to recently.</span></span></div><div><ul><li><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><a href="http://www.simonsegal.net/blog/2010/05/09/ironpython-tools-for-visual-studio-with-expression-blend/">IronPython Tools for Visual Studio with Expression Blend</a></span></span></li>
</ul><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;">One of the ways that .NET helps you separate your visual design from your application logic is through XAML; an XML based declarative language that can be used with both Windows Presentation Foundation (WPF) and Silverlight.</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><br />
</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;">Naturally there are design tools that will generate XAML. Visual Studio is one of them, but the best one is Expression Blend. XAML has features that make it particularly suited for integration with statically typed languages (statically binding events to your code in your XAML for example), but it can still be used with IronPython - slurping up the XAML dynamically at runtime (including generating or transforming XAML) with the <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">XamlReader</span>.</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><br />
</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;">Simon Segal has been looking at how he can use both Expression Blend and Visual Studio with his IronPython projects:</span></span></div><blockquote>Finally I decided to synchronize two separate .XAML files in each of the two different projects, so the challenge was to find the most unobtrusive way of working in both IDE’s and easily syncing the the .XAML files after edits had been made. Given that one of the IDE’s was running a dynamic language with a REPL built in, I thought it shouldn’t prove too difficult.</blockquote><blockquote>...</blockquote><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><blockquote>Like I said its far from a perfect solution and to be frank it’s somewhat annoying however my frustration is another thing altogether if I’m faced with doing all my layout and design in Visual Studio – so I will live with it for the moment. Hopefully the IronPython team and or the Expression Blend Team can find a solution that flows changes through more seamlessly in the short term and the perhaps in the long term allow us to open IronPython and IronRuby projects in Blend.</blockquote><blockquote>By the way if your wondering about the codename of the project that drove this adventure (PONGO) – the answer is yes if you guessed that it’s something that revolves around IronPython and MongoDB and I will be blogging about that more in the coming weeks.</blockquote><br />
<br />
<ul><li><a href="http://www.theautomatedtester.co.uk/tutorials/selenium/selenium_two_ironpython.htm">Selenium Two Tutorial using IronPython and InternetExplorerDriver</a> </li>
</ul><div><br />
</div><div>Selenium is probably the best known / most widely used web testing tools and it supports a host of different languages. At Resolver Systems we've used the .NET Remote Control for Selenium from IronPython for quite a while. This article is a tutorial on using Selenium 2 with IronPython and Internet Exploder:</div><div><blockquote>This tutorial is to show how to use the .NET Selenium 2 with dynamic languages that run on the .NET Common Language Runtime. This tutorial uses IronPython.</blockquote><blockquote>To complete this tutorial you will need to have IronPython installed and you will also need to download the .NET Bindings from Google Code</blockquote><blockquote>This tutorial will not be using the Remote Driver and it will be using the InternetExplorerDriver as this is the only complete browser at the moment that doesn't need to be built from the Repository.</blockquote></div><div><ul><li><a href="http://blog.peterlesliemorris.com/archive/2010/05/19/embedding-ironpython-into-a-c-application.aspx">Embedding IronPython into a C# application</a></li>
</ul></div><div>Yes, over the years I've been making entries in this blog we've seen a whole host of blog entries showing examples of embedding IronPython in .NET applications, but it is always fun when another developer discovers just how easy it is:</div><div><blockquote>A requirement I have in an app I am writing is to allow the administrator to set up formulas which can be calculated at runtime. The client app is completely disconnected from Enterprise Core Objects, it uses a (query/command)->response approach so I didn’t want to expose OCL on the client, I also didn’t want to use OCL because I didn’t want arbitrary browsing of the model.</blockquote><blockquote>So I have been looking at IronPython – and I like it! I’m not going to go into details of what this code does, I’m just going to paste it so that you may take a look. In short the requirement is for the Admin to be able to retrieve values from the DB by name and perform whatever logic they wish in order to return a decimal result.</blockquote></div><div><br />
</div><div><br />
</div></span></span></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-14510207220620931092010-05-22T14:20:00.000+01:002010-05-22T14:20:25.380+01:00MonoDroid: IronPython on Android?MonoTouch is a cross-compiler IDE and toolchain for the iPhone OS series. It allows you to write iPhone / iPod Touch / iPad applications with .NET languages like C# and take advantage of nice features of the .NET framework (actually Mono) like the extensive class libraries, proper garbage collection and so on.<br />
<br />
Because of the rules against interpreters and code generators MonoTouch didn't include the <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">System.Reflection.Emit</span> apis that are needed for Dynamic Language Runtime languages like IronPython and IronRuby. Despite this restriction MonoTouch was a victim of the controversial <a href="http://daringfireball.net/2010/04/why_apple_changed_section_331">Section 3.3.1</a> of the iPhone developer agreement that <i>requires</i> iPhone apps to be written in objective-C, C or C++. (Modern developers who prefer the reliability of garbage collection based languages need not apply...)<br />
<br />
Apple's main goal seems to be sticking two fingers up to Adobe and banning their Flash cross compiler, but other tools like MonoTouch are collateral damage. If there was ever any doubt about whether you could write iPhone apps in Python (Python and objective-C are both running fine on jailbroken iPhones) that question has been decisively answered. The Adobe Flash cross-compiler <i>does</i> introduce an intermediate layer between your application and the device - the UI won't look and feel native and using any new APIs introduced in OS updates will be dependent on Adobe updating the tool. This is the reason that has been cited as the motivating factor for section 3.3.1. Although MonoTouch has a "runtime" providing some of the .NET features you still compile directly against the iPhone OS APIs: your UI can be native and there is no intermediate layer. Despite section 3.3.1 MonoTouch is still allowed for companies distributing internal apps and not using the app store (something that became possible in a recent OS update), but it's use is now doubtful for general app creation.<br />
<br />
Fortunately the iPhone isn't the only game in town, you may <i>possibly</i> have heard of the google mobile OS called Android. Novell, the folks behind Mono and MonoTouch, have been creating an equivalent tool for Android and Miguel de Icaza announced it in a recent blog entry:<br />
<br />
<ul><li><a href="http://tirania.org/blog/archive/2010/May-21.html">MonoDroid - Mono for Android Beta Program</a></li>
</ul><blockquote>We are hard at work on MonoDroid -- Mono for Android -- and we have created a survey that will help us prioritize our tooling story and our binding story.</blockquote><div>Most interesting is their feature list:</div><div><br />
</div><div> Here is what you can expect from Mono on Android:</div><div><ul><li>C#-ified bindings to the Android APIs. </li>
<li>Full JIT compiler: this means full LINQ, <tt>dynamic</tt>, and support for the Dynamic Language Runtime (IronPython, IronRuby and others). </li>
<li>Linker tools to ship only the bits that you need from Mono. </li>
<li>Ahead-of-Time compilation on install: when you install a Monodroid application, you can have Mono precompile the code to avoid any startup performance hit from your application. </li>
</ul><div>So, it looks like it will "soon" be possible to write applications for Android using IronPython - great!</div></div>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-3604515438787408842.post-26609210000224357532010-05-03T11:52:00.000+01:002010-05-03T11:52:20.963+01:00adodbapi 2.3.0 (the django version) releasedVernon Cole has announced the release of a new version of adodbapi, a Windows database driver that works with both CPython and IronPython.<br />
<br />
This version is all about django support. There are two targets:<br />
A) MS SQL database connections for mainstream django.<br />
B) running django on IronPython<br />
Thanks to Adam Vandenberg for the django modifications.<br />
<br />
<br />
<ul><li><a href="http://sourceforge.net/projects/adodbapi">adodbapi home page on sourceforge</a></li>
</ul><blockquote>A Python DB-API 2.0 module that makes it easy to use Microsoft ADO for connecting with databases and other data sources using either CPython or IronPython.</blockquote><blockquote>This version is highly refactored following the work of Adam Vandenberg, and also has all of the current user suggested patches. Both the Mercurial tree and the downloadable zip files are updated. (There is no fancy installer, just copy the folder in your site-packages folder.) This has been tested using CPython 2.3, CPython 2.6, IronPython 2.6 (.NET 2) and IronPython 2.6(.NET 4), accessing .mdb, MS-SQL and MySQL databases. There is a separate .zip for Python 3.1.</blockquote><div><br />
</div><div><div>Features:</div><div>* 100% DB-API 2.0 compliant.</div><div>* Includes pyunit testcases that describe how to use the module. </div><div>* Fully implemented in Python.</div><div>* Licensed under the LGPL license.</div><div>* Supports eGenix mxDateTime, Python 2.3 datetime module and Python time module.</div><div>* Supports multiple paramstyles: 'qmark' 'named' 'format'</div><div>............</div><div>Whats new in version 2.3.0 # note: breaking changes and default changes!</div><div> This version is all about django support. There are two targets:</div><div> A) MS SQL database connections for mainstream django.</div><div> B) running django on IronPython</div><div> Thanks to Adam Vandenberg for the django modifications.</div><div> The changes are:</div><div><br />
</div><div>1. the ado constants are moved into their own module: ado_consts</div><div> This may break some old code, but Adam did it on his version and I like the improvement in readability.</div><div> Also, you get better documentation of some results, like convertion of MS data type codes to strings:</div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> >>> ado_consts.adTypeNames[202]</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> 'adVarWChar'</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> >>> ado_consts.adTypeNames[cursr.description[0][1]]</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> 'adWChar'</span></div><div> ** deprecation warning: access to these constants as adodbapi.ad* will be removed in the future **</div><div><br />
</div><div>2. will now default to client-side cursors. To get the old default, use something like:</div><div> adodbapi.adodbapi.defaultCursorLocation = ado_consts.adUseServer </div><div> ** change in default warning **</div><div><br />
</div><div>3. Added ability to change paramstyle on the connection or the cursor: (An extension to the db api)</div><div> Possible values for paramstyle are: 'qmark', 'named', 'format'. The default remains 'qmark'.</div><div> (SQL language in '%s' format or ':namedParameter' format will be converted to '?' internally.)</div><div> when 'named' format is used, the parameters must be in a dict, rather than a sequence.</div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> >>>c = adodbapi.connect('someConnectionString',timeout=30)</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> >>>c.paramstyle = 'spam'</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"> <<<will adodbapi.notsupportederror:="" format')="" in:('qmark',="" in:="" named',="" not="" paramstyle="spam" result="">>></will></span></div><div> ** new extension feature **</div><div><br />
</div><div>4. Added abality to change the default paramstyle for adodbapi: (for django)</div><div> >>> import adodbapi as Database</div><div> >>> Database.paramstyle = 'format'</div><div> ** new extension feature **</div><div> </div><div>Whats new in version 2.2.7</div><div>1. Does not automagically change to mx.DateTime when mx package is installed. (This by popular demand.)</div><div> to get results in mx.DateTime format, use:</div><div> <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">adodbapi.adodbapi.dateconverter = adodbapi.adodbapi.mxDateTimeConverter</span></div><div>2. implements cursor.next()</div><div><br />
</div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-72522764609179008692010-05-01T18:04:00.000+01:002010-05-01T18:04:28.121+01:00SQLite, zlib and XNAJeff Hardy has been at it again, and has just done releases of both <a href="http://bitbucket.org/jdhardy/ironpython.sqlite/">IronPython.SQLite</a> and <a href="http://bitbucket.org/jdhardy/ironpythonzlib/">IronPython.Zlib</a> - ports of the Python <a href="http://docs.python.org/library/zlib.html">zlib</a> and <a href="http://pysqlite.googlecode.com/">pysqlite</a> modules to IronPython.<div><ul><li><a href="http://jdhardy.blogspot.com/2010/05/ironpython-sqlite-and-zlib.html">IronPython: SQLite and Zlib</a></li>
</ul><div><blockquote>IronPython.Zlib implements the zlib module for IronPython using ComponentAce’s zlib.net, which is a purely managed implementation of the zlib library. IronPython.Zlib is entirely managed code and works with both 32-bit and 64-bit IronPython. It passes all of the Python 2.6 zlib and gzip tests and most of the zipfile tests.</blockquote><blockquote>IronPython.SQLite is a port of pysqlite to IronPython using C#-SQLite, which, similar to zlib.net, is a managed implementation of SQLite. Thus, IronPython.SQLite is also 100% managed code. It passes about 87% of the Python 2.6 sqlite3 tests; the remaining ones are mostly corner cases or rarely used functionality.</blockquote><div>Carl Trachte also emailed me about a Japanese blog post on using <a href="http://xna.com/">XNA</a> with IronPython. XNA is the Microsoft game creation framework that runs on the XBox 360 and Windows. </div><div><br />
</div><div>To run the example code you'll at least need the <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=53867a2a-e249-4560-8011-98eb3e799ef2">Microsoft XNA Framework Redistributable</a> installed.</div><div><ul><li><a href="http://d.hatena.ne.jp/kadotanimitsuru/20100429/ironpythonxna">IronPython XNA</a></li>
</ul><div>This blog entry is almost entirely a translation of a C# XNA example to IronPython. The C# code is shown commented out alongside the IronPython equivalent. All it does it create a window with a cornflower blue background, but could be a useful introduction to programming XNA.</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZj0KfsePEgZ7zVc7ZC8cFmXWP4eGroof6CQmupHB8ioPtz0LQcpDJwyNBqssXLx3TLjVtlCUg6xOzLObtm9o5-XGQbhVdRgs72lfmofQwraddsuy8O90oh4ddigv65uWvFh_EBH8aGzU/s1600/xna.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZj0KfsePEgZ7zVc7ZC8cFmXWP4eGroof6CQmupHB8ioPtz0LQcpDJwyNBqssXLx3TLjVtlCUg6xOzLObtm9o5-XGQbhVdRgs72lfmofQwraddsuy8O90oh4ddigv65uWvFh_EBH8aGzU/s400/xna.jpg" width="400" /></a></div><div><br />
</div></div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-72395596536151469432010-05-01T17:25:00.000+01:002010-05-01T17:25:14.199+01:00IronPython Tools for Visual StudioVisual Studio is the Microsoft IDE for Windows and is virtually ubiquitous as a Windows development tool. Unfortunately Visual Studio has never had good support for languages like Python, which became more of a problem for Microsoft when they developed and released a distribution of Python themselves (IronPython).<br />
<br />
Whilst there have been <a href="http://www.voidspace.org.uk/ironpython/tools-and-ides.shtml">many good IDEs</a> with IronPython support there has until now been lacking from Visual Studio - and adding support has been the highest voted <a href="https://connect.microsoft.com/VisualStudio/feedback/details/475830/ironpython-integration">Visual Studio feature request</a> for some time.<br />
<br />
Adding good support for a dynamic language to an IDE is very different from supporting statically typed languages. The internals of Visual Studio rely on the static type information for the intellisense, designers, refactoring and so on. However, the IronPython team themselves have come to the rescue and built IronPython integration into Visual Studio 2010:<br />
<br />
<ul><li><a href="http://www.ironpython.net/tools/">IronPython Tools for Visual Studio</a></li>
</ul><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhztZXU3qDY3bEZ8Up6m474nD2P5P0oOuAZlZD67dTDcErLWE_hJsH5KDhHe1xiPR3gvKol63k7UIbuJ1cZWWz61vHPvbblb3XmRCCStS2T6ASEXGI34wqo3gMJ-0jzEBZ6iG9WiOTZIiw/s1600/ironpython-interactive.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhztZXU3qDY3bEZ8Up6m474nD2P5P0oOuAZlZD67dTDcErLWE_hJsH5KDhHe1xiPR3gvKol63k7UIbuJ1cZWWz61vHPvbblb3XmRCCStS2T6ASEXGI34wqo3gMJ-0jzEBZ6iG9WiOTZIiw/s200/ironpython-interactive.png" width="183" /></a></div><div><br />
</div><div><div>We are happy to announce the first broadly available release of IronPython Tools for Visual Studio. IronPython Tools for Visual Studio (IPyTools) is a set of extensions available for Visual Studio 2010 which supports development of IronPython applications. This release is still an early Community Technical Preview (CTP) and builds upon the preview release that we gave exclusively to attendees of PyCon 2010. The release has been updated to run on the final version of Visual Studio 2010 and includes many bug fixes, performance improvements, and new features.</div><div><br />
</div><div>This release includes support for Intellisense including member completion, signature help, find all references, and goto definition. It enables quick browsing of your code using the object browser and the editor navigation bar. It has an interactive (REPL) window that enables the development of applications in an interactive way. IPyTools supports lightweight development without a project as well as working with project files in the tradition of Visual Studio . Opening a .py file causes IronPython Tools to model the code in the containing directory as an implicit project for Intellisense features. There are project templates for console, WPF, WinForms, and Silverlight applications. WPF applications support drag-and-drop UI development. Debugging of Python applications works just like you debug other languages in Visual Studio.</div><div><br />
</div><div>Changes in this release touch on all the major features of IpyTools. This includes updates to the interactive window, intellisense, the editor, and solutions and projects. We’ve also made other small tweaks to improve the development experience.</div><div><br />
</div><div>The interactive window is one key focus of IpyTools. This release continues to flush out the feature set of the interactive window. We’ve added a new command to send a snippet of code from the editor into the file context containing the module's code. We’ve added options to control evaluation of partial expressions for live-object intellisense in the REPL. We’ve updated the key bindings to for explicitly navigating history in addition to the smart behavior of the arrow keys. Also, the interactive window now supports calls to raw_input() and input(). Finding text in the REPL works now,in addition to a number of other bugs fixed to improve the overall experience.</div><div><br />
</div><div>This release also has many updates to intellisense. We’ve increased the customization options for intellisense so you can now commit completions using enter. There is an option to show the intersection or union of applicable members when multiple types can flow through the code where you are using completion. Related to this, None no longer is considered to be in the intersection of members. We’ve improved the analysis engine so that it now understands generators, yield expressions, calls to send on a generator, improved analysis of generic method calls, improved tracking of types through calls to list.append/pop/extend/insert, added support for * and ** args, improved analysis of imports, and significantly improved the performance of the analysis engine. We’ve also cleaned up the display of a number of tooltips including more consistent display of signature completion. We also better track calls on types vs. calls on instances. Finally reference tracking has been improved to include accessing methods (not just calls), tracking references to built-in functions, and added support for some protocol methods such as __getattr__. In addition to this a number of bugs have been fixed.</div><div><br />
</div><div>We’ve also improved the editing experience in this latest release. This includes support for new commands such as comment/uncomment selection, goto matching brace, support for auto indentation, and highlighting matching braces based upon the current caret location. We’ve added finer control over the editor experience, adding support for disabling outlining on file open. And there are a number of small cleanups such as improving goto definition, making goto definition center the target line on the screen, and fixing method outlining which was improperly collapsing in some cases.</div><div><br />
</div><div>Finally we’ve made some small improvements to the solution and project experience. This includes fixing basic issues such as double clicking on image files now opens them in the VS image editor, project and solutions no longer prompt for saving if they haven’t been modified, and we now properly hide hidden files in the solution explorer. We’ve also improved the experience when invalid values are entered into project settings. For the Silverlight templates we’ve fixed the issue where Firefox would be launched when IE was the default browser, and we now search for an empty port when launching Chiron for web projects.</div><div><br />
</div><div>Altogether this represents a significant improvement over the PyCon release in quality and functionality. But this is still an early preview and as such you may run into issues, and we are looking forward to your feedback both on issues you encounter and the overall feature set. Please see the spec doc for our current and planned features and feel free to comment on any of the contents.</div><div><br />
</div><div>We are still working on our final licensing terms for IronPython Tools, and as such this release is licensed under a temporary limited use license. We hope to have nailed down the final licensing terms for the next CTP release.</div><div><br />
</div><div>- The IronPython Team</div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-28821592149820924352010-05-01T17:08:00.004+01:002010-05-01T17:12:16.479+01:00Updated Dynamic Languages in Silverlight PageSilverlight is the Microsoft browser plugin that, amongst other things, allows you to run Python and Ruby in the browser with full access to the browser DOM. This is all through the magic of the Dynamic Language Runtime. With either Silverlight or Moonlight installed, the simplest DLR-based application can be contained in a single HTML file:<br />
<br />
<code class="code_block"> <script src="http://gestalt.ironruby.net/dlr-latest.js" type="text/javascript"><br />
</script></code><br />
<div><code class="code_block"> <script type="text/ruby"><br />
window.alert "Ruby in the browser!"<br />
</script></code></div><div><code class="code_block"> <script type="text/python"><br />
window.Alert("Python works too!")<br />
</script></code><br />
The introduction page on the silverlight.net site has now been updated.<br />
<br />
<ul><li><a href="http://www.silverlight.net/learn/dynamic-languages/">Dynamic Languages in Silverlight</a></li>
</ul><blockquote>Writing Silverlight applications in Ruby, Python, and other DLR-based languages only requires a local web server, a text editor, and a browser which supports Silverlight on <a href="http://go.microsoft.com/fwlink/?LinkID=188039" target="_blank"><span class="Apple-style-span" style="color: black;"><span class="Apple-style-span" style="text-decoration: none;">Windows</span></span></a> or <a href="http://go.microsoft.com/fwlink/?LinkID=188040" target="_blank"><span class="Apple-style-span" style="color: black;"><span class="Apple-style-span" style="text-decoration: none;">Mac OS</span></span></a>, or <a href="http://www.go-mono.com/moonlight/" target="_blank"><span class="Apple-style-span" style="color: black;"><span class="Apple-style-span" style="text-decoration: none;">Moonlight on Linux systems</span></span></a>.</blockquote><div>The page has full details of how to get started with using Python and Silverlight including several examples and example applications.</div><div><br />
</div><div>Supported browsers include IE, Safari, Firefox and Chrome.</div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-63839833911207868612010-04-25T14:56:00.000+01:002010-04-25T14:56:39.968+01:00IronPython in PyCharm, a new Python IDE<a href="http://www.jetbrains.com/pycharm/">PyCharm</a> is a new Python IDE from the JetBrains team, still available only as an "early preview" (beta planned this summer). As well as the "usual features" for Python IDEs (debugger, syntax highlighting, projects and code navigation, code completion, testing and version control integration, etc) it has some nice features like django support, Python refactoring and support for IronPython.<br />
<br />
Some of the details of the IronPython support are on the PyCharm blog:<br />
<br />
<ul><li><a href="http://blogs.jetbrains.com/pycharm/2010/04/pycharm-build-96-115-is-available/">PyCharm build 96.115 is available</a></li>
</ul><div><b>IronPython support</b>. It includes the possibility to generate Python stubs for .NET assemblies, but for performance reasons the generation isn’t performed on project opening and needs to be triggered manually (press Alt-Enter on an import statement).</div><div><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxf30nwitOHjRA5h_3Yp3V7bawCz0Y4NdA1W6rJ75WVGi5agduW2tFEMskH96gdSnN_n8rhxXIRh4a0zKpJNVl9r-ENAkiF4KdRf1SFUQdqBR2DLPLD2dKiF6qSviMmEU8ZHyi3NnOMkw/s1600/generateBinaryStubs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxf30nwitOHjRA5h_3Yp3V7bawCz0Y4NdA1W6rJ75WVGi5agduW2tFEMskH96gdSnN_n8rhxXIRh4a0zKpJNVl9r-ENAkiF4KdRf1SFUQdqBR2DLPLD2dKiF6qSviMmEU8ZHyi3NnOMkw/s320/generateBinaryStubs.png" /></a></div><div><br />
</div><div>This will allow for code-completion (intellisense) to work for IronPython code in the PyCharm IDE. </div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-55501355657665390622010-04-25T13:51:00.000+01:002010-04-25T13:51:30.381+01:00A Good Mix 35: Visual Studio, WPF, a cross-platform Resolver One and IronJS (A DLR based Javascript)<span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: 13px; line-height: 16px;">Another collection of IronPython and DLR related articles from recent weeks.</span><br />
<br />
<ul><li><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><a href="http://visualstudiogallery.msdn.microsoft.com/en-us/777407db-348b-4ac6-8106-ce4da1bd3bd2">Visual Studio 2010 Extension: IronPython IronRuby Console</a></span></span></li>
</ul><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvM9ipgTD7OEZkC0yMwqtlwXnEToXm-ebM57f_hm4snrzWsU9BNnthE10ICDPaDB1VBSnwfQGugFKmBEO48c2g2EwCdQ-LYC62-LjJkAqX2oUZtKOTtlZuPtbk14uBXwHxExUAtgJEigU/s1600/visualstudio-console.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvM9ipgTD7OEZkC0yMwqtlwXnEToXm-ebM57f_hm4snrzWsU9BNnthE10ICDPaDB1VBSnwfQGugFKmBEO48c2g2EwCdQ-LYC62-LjJkAqX2oUZtKOTtlZuPtbk14uBXwHxExUAtgJEigU/s320/visualstudio-console.png" /></a></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><br />
</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;">This extension adds IronPython and IronRuby to <a href="http://visualstudiogallery.msdn.microsoft.com/en-us/67620d8c-93dd-4e57-aa86-c9404acbd7b3">PowerConsole</a> so that you can interact with Visual Studio in IronPython/IronRuby. Please be aware that this extension only provides a simple tool to explore and interact with VS itself. It does not aim to be a development experience for the included languages.</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><br />
</span></span></div><div><ul><li><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><a href="http://tinesware.blogspot.com/2010/03/easywpf-0393.html">Tinesware: EasyWPF 0.3.93</a></span></span></li>
</ul><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;">An IronPython GUI library compatible with the Python GUI library <a href="http://easygui.sourceforge.net/">EasyGUI</a>. As the name implies, it is built on the WPF GUI library (making it Windows only). Like EasyGUI it has a demo app when you run the file showing the different controls/widgets the library supports.</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><br />
</span></span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjEsZcB2Hb9TrPfHSgDAq-mzx4k_qkbyR9R2YR6AgokeiA54HN4HN1NLt4oDUgEpyihtEnR2FJpTL2qatbAS42dNPuKNVkCw3gCqEjHhcVdHPrcMRAC-evTrgUu0obzoAKOWKQdjA6YOU/s1600/EasyWPF.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjEsZcB2Hb9TrPfHSgDAq-mzx4k_qkbyR9R2YR6AgokeiA54HN4HN1NLt4oDUgEpyihtEnR2FJpTL2qatbAS42dNPuKNVkCw3gCqEjHhcVdHPrcMRAC-evTrgUu0obzoAKOWKQdjA6YOU/s320/EasyWPF.jpg" width="320" /></a></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><br />
</span></span></div></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;">For more examples of how to use it visit the <a href="http://easygui.sourceforge.net/current_version/tutorial/index.html">EasyGUI tutorial</a>.</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><br />
</span></span></div><div><ul><li><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><a href="http://www.resolversystems.com/news/?p=182">Preview of the New Grid in Resolver One</a></span></span></li>
</ul><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><a href="http://www.resolversystems.com/">Resolver One</a> is a programmable spreadsheet written in IronPython. As well as being extremely powerful Resolver One is the largest codebase of IronPython "<i>in the wild</i>". Unfortunately because of third party .NET components used for the user interface Resolver One runs on Windows only.</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><br />
</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;">The third party grid imposes other limitations on Resolver One, so the development team have finally decided to replace it with a custom grid that they are writing from scratch in IronPython. As well as giving them more flexibility, this is the first step towards making Resolver One cross platform (through Mono). The screencast linked above show you their progress so far, you can also read a bit more about their adventures in this blog entry on <a href="http://www.resolversystems.com/news/?p=192">text rendering with GDI and GDI+</a>.</span></span></div><ul><li><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><a href="http://github.com/fholm/IronJS">IronJS: A Javascript for the DLR</a></span></span></li>
</ul><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;">IronJS is an implementation of Javascript for the Dynamic Language Runtime. By being built on top of the DLR it should be possible for code and objects written in IronPython, IronRuby and IronJS to interoperate. IronJS is not written by Microsoft, but instead is the creation of <a href="http://ugh.cc/">Fredrik Holmström</a>.</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;"><br />
</span></span></div><div><span class="Apple-style-span" style="color: #333333; font-family: Verdana, Arial, sans-serif; font-size: small;"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px;">IronJS is not complete, but is not far off. For example it recently became capable of <a href="http://ugh.cc/ironjs-now-compiles-jquery/">compiling jQuery</a>. Performance is also pretty good:</span></span></div><blockquote><ul><li><a href="http://ugh.cc/ubench-ironjs-f-jit-vs-v8-vs-tracemonkey/">IronJS vs V8 and Tracemonkey</a></li>
</ul></blockquote><blockquote><i>All in all I’ve reached my performance goal with IronJS, now it’s time to finish the runtime to support all statements/expressions/built-ins from the ECMAScript 3 Spec, there will still be changes which affect the performance of the core runtime/compiler, but (hopefully) not by any large amounts</i>. </blockquote></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-91084291580277445732010-04-18T00:34:00.000+01:002010-04-18T00:34:16.769+01:00IronPython y SharpDevelop, en español (IronPython and SharpDevelop in Spanish)A guide to using IronPython with the <a href="http://www.icsharpcode.net/opensource/sd/">SharpDevelop IDE</a> translated into Spanish. SharpDevelop is a .NET IDE for Windows. Of all the major .NET IDEs it has the best support for IronPython.<br />
<br />
<ul><li><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: 'Lucida Grande'; font-size: 13px; white-space: pre;"><a href="http://elviajedelnavegante.blogspot.com/2010/04/ironpython-y-sharpdevelop-en-espanol.html">IronPython y SharpDevelop, en español</a></span></li>
</ul><div><span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 13px; white-space: pre;"><blockquote>Hola. En este post vamos a hablar un poco del hermano de Python (ó CPython) para la plataforma de desarrollo de Microsoft .NET, IronPython.</blockquote><blockquote>Como he comentado a lo largo de la vida de este blog, alguien que se quiera dedicar a esta bendita profesión no puede estar ajeno a las combulsiones que se originan en este mundo. Si alguien no se había enterado (que creo que no) Microsoft ha lanzado una nueva versión de su archiconocido Visual Studio, versión 2010, junto con la plataforma de desarrollo Framework .NET 4.0. Según parece en esta versión se le empieza a dar una mayor importancia a lenguajes dinámicos, como IronPython. Y es por ello que me he decicido a investigar este territorio, tan inóspito para mí. Y es que aprender nunca pasa de moda.</blockquote><blockquote>Decir que IronPython es un lenguaje creado por Microsoft, aunque no hay que pagar ningún tipo de licencia. IronPython es una implementación de CPython (ó Python) escrita en C#.</blockquote><blockquote>También he leído (que no probado) que IronPython funciona con la plataforma Mono.</blockquote><blockquote>IronPython está ligado a la plataforma .NET en la cual nos encontremos, dándole soporte en su versión 2, y ahora con más fuerza en la versión 4. No es objetivo de este post describir la historia ni características de IronPython en profundidad (¡para eso he puesto los links!)</blockquote><div><br />
</div></span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-18210631027265097762010-04-13T13:15:00.000+01:002010-04-13T13:15:29.064+01:00IronPython 2.6.1 ReleasedThere have been three "IronPython relevant" releases in the last twenty four hours with another one to come.<br />
<ul><li>IronPython 2.6.1 (for .NET 2 and .NET 4)</li>
<li>.NET 4.0</li>
<li>Visual Studio 2010</li>
</ul>The next release is Silverlight 4, which includes new features like out-of-browser support, new controls (a rich text editor component), web cam and printing support and lots more. For those who still aren't aware, Silverlight is a browser plugin that works with Windows and Mac OS X and in IE, Safari, Firefox and Chrome browsers. There is an official port from the Mono team, called Moonlight, that works with Linux and Firefox.<br />
<br />
.NET 4.0 is the version of the .NET framework (and C# language) that includes support for the <span style="font-family: "Courier New",Courier,monospace;">dynamic</span> keyword - allowing for dynamic typing in C# and easier interoperation between C# and dynamic languages.<br />
<br />
IronPython 2.6.1 is the latest stable release of IronPython. Despite being a minor point release there are some very nice improvements and new features. Headline features include faster importing and startup, bugfixes in ctypes, *much* better Python Unicode compatibility and ssl module compatibility:<br />
<ul><li><a href="http://ironpython.codeplex.com/releases/view/36280">IronPython 2.6.1 Release</a></li>
</ul><blockquote>We’re pleased to announce the final release of IronPython 2.6.1. This version of IronPython makes great strides in stability and compatibility, including a considerable number of targeted bugfixes. This is our largest servicing release to date, and with your help both before and during the RC phase, along with the simultaneous release of .NET 4.0, this has become a very exciting release for all of us.<br />
<br />
The IronPython 2.6.1 RC included fixes for well over 50 bugs, large and small. Ctypes has had a number of significant updates, including union support, variant_bool, and wintypes. Another focus has been on sys.settrace, making debugging more reliable. For example, sys.settrace now returns the correct frame, supports tracing through modules, and no longer interferes with “import os”. Other notable fixes include thread-safe importing, and the missing error code in _winreg exception.<br />
<br />
In addition, we’ve made a substantial improvement in import time. Not only does this reduce startup time, but it can speed up the importing of large, definition-heavy modules by up to 50%.<br />
<br />
Since the RC, we have fixed numerous other issues, as well as adding CPython’s ssl.py to our distribution. We’ve also made some major unicode-related changes in response to your feedback on the mailing list, changes that improve compatibility with certain third-party applications including Django. In particular, invoking unicode() or using unicode string formatting will now call __unicode__() first if it is present on the object. Finally, we’ve included a new code sample that shows how to use __clrtype__ to create custom CLR classes from IronPython. This sample is a sneak preview of what we expect will become a fully supported IronPython module, so we encourage anyone who is so inclined to try it out and let us know how it goes.</blockquote>.NET 4.0 includes a new version of the Common Language Runtime and to use the new features you need to use a version of IronPython compiled against .NET 4. This is why IronPython for .NET 4 is a separate download. Surprisingly, this version of IronPython is <i>much faster</i> than IronPython for .NET 2. Dave Fugate blogs about this (and other improvements for working with IronPython under .NET 4):<br />
<ul><li><a href="http://knowbody.livejournal.com/20751.html">Startup Time for IronPython 2.6.1 for .NET 4.0 is 30% Faster</a></li>
</ul><blockquote>Where exactly is this improvement coming from? Well we don't know quite yet. Our first bona fide .NET 2.0 SP1 versus .NET 4.0 IronPython perf suite run occurred less than two weeks ago! An educated guess is that at least a small portion of this improvement stems from the fact that Microsoft.Scripting.Core.dll is actually part of the .NET 4.0 framework. Any ways, you can see more of the performance characteristics of IronPython running under both these .NET releases <a href="http://ironpython.codeplex.com/wikipage?title=IronPython%20Performance">here</a>. </blockquote>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-3604515438787408842.post-19549561459801570342010-04-05T20:24:00.000+01:002010-04-05T20:24:49.601+01:00Professional IronPython<a href="http://www.amazon.com/gp/product/0470548592?ie=UTF8&tag=voidspace-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470548592">Professional IronPython</a> is a new book on IronPython, published by Wrox and written by <a href="http://www.amazon.com/John-Mueller/e/B000AQ77KK/ref=ntt_dp_epwbk_0">John Meuller</a> (who has apparently written 73 books).<br />
<br />
<iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=voidspace-20&o=1&p=8&l=as1&m=amazon&f=ifr&md=10FE9736YVPPT7A0FBG2&asins=0470548592" style="height: 240px; width: 120px;"></iframe><br />
<blockquote>Create applications that are more responsive to user needs</blockquote><br />
<div class="productDescriptionWrapper"> <blockquote>IronPython should be an important part of your developer's toolbox and this book will quickly get you up and running with this powerful language. John Paul Mueller clearly shows how IronPython can help you create better desktop or web-based applications in less time and with fewer errors. Throughout the pages, you'll find techniques for extending IronPython and making it a more robust language. In addition, you'll follow advanced steps such as building an IronPython extension that directly accesses the Win32 API. And you'll enhance your skill set as you introduce IronPython into other environments such as Linux® and Mac OS® X. </blockquote></div><br />
Professional IronPython is the third book on IronPython, with the first two being <a href="http://www.ironpythoninaction.com/">IronPython in Action</a> and <a href="http://www.amazon.com/gp/product/1430219629?ie=UTF8&tag=voidspace-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1430219629">Pro IronPython</a>. It will come as no surprise to hear that my personal recommendation is IronPython in Action...Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-14666553959673503242010-03-31T17:50:00.000+01:002010-03-31T17:50:40.828+01:00SharpDevelop 3.2 RC1 - with support for IronPython 2.6.1 RC1IronPython 2.6.1 will bring some nice performance improvements and some big Unicode compatibility improvements to IronPython 2.6.<br />
<br />
The release candidate of SharpDevelop (Windows IDE with superlative support for IronPython) includes support for the IronPython 2.6.1 release candidate.<br />
<br />
<ul><li><a href="http://community.sharpdevelop.net/forums/t/10764.aspx">SharpDevelop 3.2 RC 1</a></li>
</ul><div>The first release candidate for SharpDevelop 3.2 comes with updated language support, fixes to various features (eg C# <-> VB.NET conversion), as well as improvements you have asked for in our forums. <br />
The highlights:<br />
<ul><li>IronRuby 1.0 RC2 support</li>
<li>IronPython 2.6.1 RC1 support</li>
<li>Microsoft F#, February 2010 CTP support</li>
<li>SHFB 1.8.0.3 support</li>
<li>SDR: Absolute and relative filenames for images</li>
<li>SDR: Zoom in Report Viewer</li>
</ul></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-65032159792627593412010-03-21T16:08:00.000+00:002010-03-21T16:08:36.416+00:00Python in the Browser, IronPython in Visual Studio 2010 and Other PyCon Talks<span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"><span class="Apple-style-span" style="font-size: 11px;"><span class="Apple-style-span" style="font-family: Times;"><span class="Apple-style-span" style="font-size: medium;">PyCon 2010 was great fun, and included several talks on or including IronPython.</span></span></span></span><br />
<br />
<ul><li><a href="http://feedproxy.google.com/~r/jimmy-thinking/~3/hOlDtnQBFMg/pycon-2010-python-in-browser.html">Python in the Browser</a></li>
</ul><br />
This is Jimmy Schementi's write-up of his talk on using Python in the Browser, with links to the video and slides:<br />
<blockquote>You, the Python developer, use Python because you want to, but in the browser you use JavaScript because you think you have to. With IronPython you can write browser code in Python. I’ll only begin to answer "what can the browser bring to Python?" and "what can Python bring to the browser?" in this short overview; examples will be very simple (with the exception of a few flashy ones) to make sure you can get started immediately.</blockquote><br />
<ul><li><a href="http://python.mirocommunity.org/video/1518/pycon-2010-ironpython-tooling-">IronPython Tooling</a></li>
</ul><div>The video of Dino Veihland's talk on the new integration of IronPython with Visual Studio 2010. The integration, which works standalone with the Visual Studio extensibility shell or integrated into VS 2010, is alpha quality - but has lots of nice features for IronPython development. It includes awesome type inferencing for intellisense in Python code.</div><div><ul><li><a href="http://python.mirocommunity.org/video/1542/keynote-state-of-ironpython">Keynote: State of IronPython</a></li>
</ul><div>A shorter video from Dino Veihland on the current state of IronPython, including a demo of the Visual Studio 2010 integration.</div><div><ul><li><a href="http://python.mirocommunity.org/video/1514/pycon-2010-the-ring-of-python-">The Ring of Python</a></li>
</ul><div>A talk by Holger Krekel on the various implementations of Python, and how execnet works with all of them:</div><div><blockquote>CPython 2.5/2.6/3.1, Jython, IronPython, PyPy, StacklessPython, UnladenSwallow, Cython ... what do we make of all these cool interpreter projects and versions? Where does competition help and where does it hamper?</blockquote><blockquote>In this interactive talk I'll highlight the main strengths of each of the Python interpreters. Furthermore, I'll discuss ways to leverage Python interpreters in a co-operative way, discuss challenges, projects and issues ahead and also briefly highlight 'execnet', one my own projects for bridging (Any) Python to (Any) Python.</blockquote><div><ul><li><a href="http://python.mirocommunity.org/video/1526/pycon-2010-how-to-write-cross-">How to write cross-interpreter Python programs</a></li>
</ul><div>A talk by Maciek Fijalkowski (PyPy developer) on how to write programs that will run on multiple implementations of Python (or more specifically - how to avoid depending on implementation details of CPython without realising it).</div><blockquote>This talk will cover basics about writing cross-interpreter python programs. What to do and most of all what not to do. This will help you if you want at some point in time to run program on for example Java platform or faster python interpreter, but also if you want to keep it running between CPython releases.</blockquote><div><br />
</div></div></div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-53988913453218988042010-03-21T13:36:00.000+00:002010-03-21T13:36:52.426+00:00Catching up with Jeff Hardy and Django on IronPythonJeff Hardy is an IronPython MVP and a Python community member who has invested a lot of time in getting standard Python libraries available for IronPython. Some of his recent work has been with both Django and the <a href="http://docs.python.org/library/zlib.html">zlib module</a>. It's been a while since we've reported on his work, so this post gets us up to date with what Jeff has been working on:<br />
<br />
<ul><li><a href="http://bitbucket.org/jdhardy/ironpythonzlib/">IronPython.Zlib</a></li>
</ul><div>The zlib module is a C extension for Python. Because it is in the Python standard library it is used by many other libraries, like setuptools, making it an important part of the Python infrastructure. Unfortunately not all of the standard library C extensions have been ported to IronPython. The problem of C extensions is one of the major drawbacks of alternative implementations of Python; both Jython and PyPy have the same problem. Even if your code is 'pure-Python' it may not run on alternative implementations if it uses C extensions.</div><div><br />
</div><div>For IronPython one solution is to use <a href="http://www.resolversystems.com/products/ironclad/">Ironclad</a>, an open source project created by Resolver Systems that allows you to use Python C extensions with IronPython. A <i>better</i> solution is for 'someone' to port the C extension to IronPython; and in the case of zlib that someone is Jeff Hardy. The latest version of <span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;">IronPython.Zlib</span> targets the IronPython 2.6 release.</div><div><ul><li><a href="http://bitbucket.org/jdhardy/django-ironpython/src/">django on IronPython</a></li>
</ul><div>One of the most popular Python frameworks these days is <a href="http://www.djangoproject.com/">Django</a>, the Python web framework. Unfortunately this doesn't run out-of-the-box on IronPython, largely because of differences in the way that IronPython handles Unicode (all strings are Unicode by default). There are some important changes in IronPython 2.6.1, due to be released shortly, that should fix a lot of the issues.</div><div><br />
</div><div>Jeff has been working on a 'port' of Django to IronPython; basically getting the tests running and applying patches where necessary. He has also written up some instructions on getting the test suite to run:</div><div><ul><li><a href="http://jdhardy.blogspot.com/2010/01/running-django-test-suite-on-ironpython.html">Running the Django Test Suite on IronPython</a></li>
</ul><blockquote>This guide will explain how to setup and attempt to run the Django test suite on IronPython. Once the test suite runs, it should be much easier to fill in the parts of Django that don't work properly.</blockquote><div><br />
</div></div></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-24870834849750649752010-03-16T13:31:00.000+00:002010-03-16T13:31:29.639+00:00Acceptance Testing .NET Applications using IronPythonThis article, written by Jonathan Hartley, was originally published in the Python Magazine.<br />
<br />
<ul><li><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: 'Lucida Grande'; font-size: 13px; white-space: pre;"><a href="http://tartley.com/?p=1018">Acceptance Testing .NET Applications using IronPython</a></span></li>
</ul><div><span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 13px; white-space: pre;"><br />
<blockquote>Unit tests demonstrate to developers that individual functions and classes work as expected. Acceptance tests are an orthogonal complement to this. They verify to everybody, including managers and clients, that features they understand and care about are completed and working correctly. They also prove that the system as a whole is correctly integrated and that no regressions have occurred. Resolver Systems is developing a .NET desktop spreadsheet application, Resolver One, for which we have accumulated an acceptance testing framework. This framework uses Python’s standard unittest module, and is executed using IronPython. While Resolver One is written in IronPython, this technique allows IronPython tests to interact with product code written in any .NET language. This article describes the principles of this IronPython acceptance testing framework, and demonstrates them by creating an acceptance test for a small sample C# GUI application.</blockquote></span></span></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-3604515438787408842.post-36210388585184316332010-03-09T23:58:00.002+00:002010-03-10T17:17:47.738+00:00IronPython in Action: Manning Deal of the DayMarch 9th (that's tomorrow at the time of typing) <a href="http://www.ironpythoninaction.com/">IronPython in Action</a> is the Manning deal of the day. This is a one day offer with a special discount.<br />
<br />
You can get the discount by buying IronPython in Action from <a href="http://www.manning.com/affiliate/idevaffiliate.php?id=1072_152">the Manning website</a> and using the discount code dotd0310tw.<br />
<br />
It isn't only IronPython in Action that is on offer, you can also get <a href="http://www.manning.com/affiliate/idevaffiliate.php?id=1072_168">Quick Python</a> by Vern Ceder.Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-3604515438787408842.post-80449107606373037612010-01-04T23:18:00.000+00:002010-01-04T23:18:18.537+00:00Most Popular Articles of 2009 In 2009 I made 312 posts on IronPython-URLs, a bit short of an average of one a day that it looked like I might manage earlier in the year.<br />
<br />
According to google analytics there were more than 112 thousand page views to a total of 2042 pages on the blog. An average of over three hundred page views a day. Feedburner estimates that this blog has around eight hundred readers. Many of those will read the articles via <a href="http://feeds.feedburner.com/IronpythonUrls">RSS</a> or <a href="http://planet.python.org/">Planet Python</a> and rarely visit the website.<br />
<br />
It's interesting to note that of the most popular articles in 2009 (most page views) several of them are to do with choice of IDE or using IronPython with Visual Studio. The question of which IDE to use with IronPython is still alive and well:<br />
<ol><li><a href="http://ironpython-urls.blogspot.com/2009/05/new-sample-writing-dlr-language-in-c-or.html">New Sample: Writing a DLR Language in C# or IronPython</a> (May 2009, 1892 page views)</li>
<li><a href="http://ironpython-urls.blogspot.com/2009/05/ironpython-in-sharpdevelop-31-and.html">IronPython in SharpDevelop 3.1 and Converting C# to IronPython</a> (May 2009, 1412 page views)</li>
<li><a href="http://ironpython-urls.blogspot.com/2008/12/c-becomes-dynamic-language.html">C# Becomes a Dynamic Language...</a> (December 2008, 1164 page views)</li>
<li><a href="http://ironpython-urls.blogspot.com/2009/02/python-is-easiest-language-in-which-to.html">Python is the easiest language in which to do interesting things</a> (February 2009, 1150 page views)</li>
<li><a href="http://ironpython-urls.blogspot.com/2009/06/python-support-in-visual-studio.html">Python Support in Visual Studio</a> (June 2009, 1119 page views)</li>
<li><a href="http://ironpython-urls.blogspot.com/2009/07/another-ide-for-ironpython-eclipse-and.html">Another IDE for IronPython? Eclipse and PyDev</a> (July 2009, 1077 page views)</li>
<li><a href="http://ironpython-urls.blogspot.com/2009/01/davys-ironpython-editor.html">Davy's IronPython Editor</a> (January 2009, 1032 page views)</li>
<li><a href="http://ironpython-urls.blogspot.com/2009/01/jeff-hardy-django-zlib-and-easyinstall.html">Jeff Hardy: Django, Zlib and easy_install on IronPython</a> (January 2009, 949 page views)</li>
<li><a href="http://ironpython-urls.blogspot.com/2009/03/writing-ironpython-debugger.html">Writing an IronPython Debugger</a> (March 2009, 816 page views)</li>
<li><a href="http://ironpython-urls.blogspot.com/2008/09/running-python-from-c.html">Running Python from C#</a> (September 2008, 789 page views)</li>
</ol>My recent post <a href="http://ironpython-urls.blogspot.com/2009/12/does-microsoft-take-dynamic-languages.html">Does Microsoft Take Dynamic Languages Seriously</a> looks a bit at how much work it would be to get IronPython support in Visual Studio, and there have been a couple of interesting posts on this topic since. IDEs and IronPython is a topic that is likely to continue to be of interest in 2010 as well.Unknownnoreply@blogger.com0