Recently I have started learning python on windows. I am puzzled because the way it shows me output inside VS tools for python and in Iron Python Console. And similar difference in PyScripter and IronPython.
The print command works differently in IronPython console and in Python 3.2 Interactive within Visual Studio.
print("Hello") # works perfectly inside visual studio
Hello
print "Hello" # gives error when running ctrl+F5
Invalid Syntax
print "Hello" # works great inside IronPython console
Hello
Another I thing I noticed that in PyScripter for windows the following code produces nothing
range(6)
#nothing happens in PyScripter
range(6) #inside IronPython console works fine
[0,1,2,3,4,5]
Any idea on what is going on here?
Update:
upon running following in IronPython Console for windows
>>>import sys
>>>sys.version
'2.7.1 <IronPython 2.7.1 <2.7.0.40) on .NET 4.0.30319.239)'
Same behavior inside PyScripter and VSTS for Python
The main window produces no output(Any idea? Running PyScripter 2.4.3) and the interpreter below produced
'3.2.2 (default, sep 4 2011, 09:51:08) [....]'
IronPython is still at 2.x, in which
printis a statement andrange()returns a list. Both of these changed with 3.x.