Python IDLE

I finally decided to learn Python and just downloaded version 3.41 on my Windows 8.1.  For the life of me, I couldn't find any information on where to download Python IDLE for windows OS (only for Mac).

Anyone could help give me some guidance???
Thanks,
pax
cpeters5Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
When I downloaded Python 2.7.8 for Windows, IDLE was included with it.  I believe it is included with Python 3.4.1 also.  You may have to add the Python program directory to your Path and then set IDLE as the default program to open 'py' files.  https://docs.python.org/3.4/library/idle.html
0
cpeters5Author Commented:
No luck, no IDLE.  Perhaps it is W8.1 thing.
Seems several things are not consistent with tutorials.  For example:
- the buildin print function requires enclosing the string with round brackets.  For instance
 >>>print "Testing"

will throw invalid syntax error, while

>>>print ("Testing")

will print output correctly.

Also, some other build-in functions were missing.  Found so far - unicode() and  raw_input().

Perhaps I need to install some modules?
0
Dave BaldwinFixer of ProblemsCommented:
Did you install the 'x86' (32-bit) or the 'x86-x64' (64-bit) version?
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Dave BaldwinFixer of ProblemsCommented:
I installed Python 3.4.1 on one of my other Windows XP systems.  It does include IDLE.  I can right-click on my 'py' files and one of the options is 'Edit with IDLE'.  

In the Doc folder, there is a help file.  It mentions a Python program called 2to3 which will convert programs with Python 2 syntax to Python 3 syntax.
0
Dave BaldwinFixer of ProblemsCommented:
I am pleased to report that the 2to3.py program in the C:\Python34\Tools\Scripts directory fixed the '2to3' syntax differences in my demo files and now they work perfectly.
0
peprCommented:
Python IDLE is Tkinter (Tcl/Tk) application. Check the batch launcher c:\Python34\Lib\idlelib\idle.bat or the Python launcher c:\Python34\Lib\idlelib\idle.pyw

If you are familiar with any other decent editor (like Notepad++), and if you feel you can use the cmd window, you can live just fine without IDLE.
0
cpeters5Author Commented:
I installed 3.4.1 32bits.    According to one of the tutorial blog, the 64bits version may have some compatible issues.

I assume IDLE is a gui.  Posted the question because I couldn't find it in my python installation folder.  I am ok with using command window and vim or Notepad++, which I used when coding Perl anyway.

The problem now is these missing build-in functions unicode() and raw_input() and perhaps some others I don't know of yet...

Do you have to install any package to get them?
0
cpeters5Author Commented:
Dave Baldwin,
my .py extension is associated to IDLE. But when I double clicked on the file, it was sent directly to python interpreter on command window.

Here is my file type association for Python.


C:\Users\pax>ftype python.File
python.File="C:\WINDOWS\py.exe" "%1" %*

C:\Users\pax>
C:\Users\pax>ftype python.compiledfile
python.compiledfile="C:\WINDOWS\py.exe" "%1" %*

C:\Users\pax>
C:\Users\pax>ftype python.noconfile
python.noconfile="C:\WINDOWS\pyw.exe" "%1" %*
0
peprCommented:
Tcl/Tk (wrapped as Tkinter) in Python is GUI framework. Did not you find the idle.bat and idle.pyw mentioned above? They should be parts of the installation.

The raw_input was renamed to input in Python 3. The unicode() function should be replaced by str(). Think about it the waz that the unicode() was expected to return a unicode string. In Python 3, all strings are unicode strings -- hence the str() as the exact replacement.
0
cpeters5Author Commented:
pepr, Thanks!  
No idle.bat came with the installer I got from python web site.  :-(
https://www.python.org/downloads/release/python-341/

I downloaded Windows x86 MSI installer, the last one on the list at the bottom of the page.
0
peprCommented:
I have personally used the https://www.python.org/ftp/python/3.4.1/python-3.4.1.msi , and the batch is there. However, I am using Windows 7, and I do not know if there is or is not any difference caused by the version of Windows. The content of the idle.bat is:
@echo off
rem Start IDLE using the appropriate Python interpreter
set CURRDIR=%~dp0
start "IDLE" "%CURRDIR%..\..\pythonw.exe" "%CURRDIR%idle.pyw" %1 %2 %3 %4 %5 %6 %7 %8 %9

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cpeters5Author Commented:
Thank you pepr.  Found idle.bat in the lib/idle folder.  
When I activated it,  I got the Python 3.4.1 shell.  Is the the IDLE gui?  

Now all I have to do is to change file type assoc for .py to open with idle.bat...

What does your  `ftype python.File`  statement looks like?
0
peprCommented:
Python Shell is the part of IDLE. When you open file (File - Open... CTRL+O), the editor window will appear. When you F5 in the editor, the code results will be observed in Python shell again...

If you are used to Perl, Notepad++, cmd and the way to work with the separate tools, give IDLE a try and decide whether it brings anything new when compared with tools that you already know. (Possibly the Debug window? But I do not use it.)

My ftype... shows
python.File="C:\Windows\py.exe" "%1" %*

Open in new window


You probably should not change it. This is a Python launcher for Windows. It interprets the #!python3 line of the script to launch Python 3, and #!python2 line to launch Python 2. It allows you to work with Python scripts the way resembling the Unix way.
0
Dave BaldwinFixer of ProblemsCommented:
I run my Python programs by right-clicking on the file name and selecting 'Edit with IDLE' as I said above.
0
Nas-BanovCommented:
@cpeters5, you may consider downloading Python 2.7 instead of 3, you might be better off with that - from what i see, the tutorials/books or sources you are learning from are for 2.x. The choice which one to get is not as clear as with other software - python 2.x is more widespread than 3, 2.7 comes pre-install on Macs etc - and does not seem to be going away any time soon. The reason is that BDFL decided to break backwards compatibility when releasing version 3 of python to "get things right" this time. So things are shuffled around (e.g. as you noticed raw_input() is called now input(), print is a "proper" function and requires parenthesis etc).

This said, if you know python 2, switching to python 3 is not difficult. But if you are just learning, new features of 3 will be unwelcome distraction.

ps. Amusingly, some of 3.x features can be used in 2.x by getting them "back from the future" by using "import print_function from __future__"
0
peprCommented:
Well, I disagree with the preference of Python 2 these days. It was true in the past, but not now. The Python 3 is simply better and cleaner language. If switching to from Python 2 to Python 3 is not difficult then the other way should not be more difficult. Actually, using Python 3 the way how Python 2 would be used is a kind of standing on brakes.

More versions of Python can be installed in the same OS side-by-side, and installation of any version (probably on all OSes) is easy.

If a heavy literature (both mentally and physically [like 1000 pages or so]) is a problem for you, have a look at "Dive Into Python 3" by Mark Pilgrim (http://www.diveintopython3.net/). Nice to read, nice to look at, nice to think about the presented code. The Appendix A (http://www.diveintopython3.net/porting-code-to-python-3-with-2to3.html) summarizes the differences between Python 2 and Python 3.
0
cpeters5Author Commented:
Dave Baldwin, Yes I did that and it works fine now.  I am used to Notepad++ and might just use it instead of IDLE.

  Nas-Banov,  Since I am still fresh off the boat in Python community, I wouldn't know the difference between the old and new version.  So I might just go with the most current stable version.  Also I like  how version 3.* handles unicode.  

pepr: You are correct that I have been following tutorial for the old version, that was my main cause of confusion.  Didn't realize it until later.  I am now reading https://docs.python.org/3/tutorial and it is very readable.  Love the simplicity of Python (comparing to Perl).   Thanks for Mark Pilgrim's paper.  I will give it a try very soon.

Thank you all for steering me to the right direction.
pax
0
Dave BaldwinFixer of ProblemsCommented:
The only advantage of IDLE is the ability to run the code by pressing F5.  I'm using it because I'm just running a few demo programs to check things for people.  A 'real' editor like Notepad++ would be much better for 'real' programming.
0
Nas-BanovCommented:
@cpeters5, if you are somewhat experienced programmer (i see you mentioned Perl), never mind other books or guides - i recommend you go with the Python Tutorial, https://docs.python.org/3.4/tutorial/index.html (version for 3.4, if so you like) - it is written by this guy), doesn't get any better than coming "straight from horse's mouth". Not only is he "The Guy" but he also writes in short, clear and understandable manner.

When i started with Python, i also looked for "the best book" on that and one i was told was "Dive into Python", that was almost ten years ago. My opinion of the book was "meh", it did not do it for me - i did not care about author's mini-projects and wherever he wanted to take me. Maybe it has improved over the years, dunno. But when i started reading "The PYthon Tutorial" - which is believe is only avail. online, it was much, much better. I was like "why would anybody want another book on the subject?"... it's like the best kept secret on a tutorial book.

Your experience might be different, maybe Pilgrim's fits you better than Guido's. My only strong feelings are against "Learn Python the hard way" by Zed Shaw - do not use that one. You have been warned.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Python

From novice to tech pro — start learning today.