Iron Python - A Walk thru
What is Iron Python?
Iron Python is Microsoft's implementation of the Python Language using the .NET Technology. Its a powerful and easy to learn.
Basics of Iron Python:
This is the welcome screen when you load the IPY Console
Iron Python interprets the codes line by line and hence it'll take couple of min between execution of each statements.
Lets see how IPY displays a text :
The Syntax is print text_here. For example, here i'm displaying Hello. The syntax for it is print "Hello".
Lets see how IPY does swapping of 2 number:
In IPY, there are no concepts of arrays etc. All you have is something called Lists. This List can contain anything ie: numbers, characters, strings, etc TOGETHER :) :)
Syntax for declaring a list is:
In the above program, i've declared 2 variables a and b with the following contents:
Now, the big job of swapping :( ..
We break our head in figuring how should we use the function for swapping - either by passing values or by passing address. Well, all I can say is IPY makes life easy :) :)
All u need to do is :
and your swapping is done :) :)
now when you give print a and print b u'll find that swapping is complete :) :)
There are a lot of things that you can do using IPY. I'll shortly upload more examples in IPY.
You can visit This Link for downloading the IPY setup file. Keep checking the link for downloading the IPY extension for VS 2010 :) :)