|Mar 26, 2012, 02:13 PM||#1|
Some very basic qs about IDLE
I've downloaded IDLE as my interpreter for Python and at first thought I had the hang of it but totally confused now.
I have the IDLE shell open for Python which is what I get when I open IDLE but I have noticed that I can open a new window from the shell and that this brings up a notepad type page, without the prompts. Is this the main text editor page where I have to write the code and where I save it from? What's confusing me is that I also seem to be able to save files from the Shell and I am just wondering why i would want to save in both?
I realise this is a very basic question but I am new to programming and ignorant about a lot of the basic stuff comp sci people would take for granted!
The extra problem I'm having is that I have another thing installed - when I open it's a black window with prompts, similar to IDLE shell, and is called python.exe at the top.
I downloaded these via the MIT site and didn't fully understand the difference of each when I downloaded...
Would really appreciate any help with which ones I need to use. I'm thinking two would be enough- text editor and shell in IDLE? And that I don't need the python.exe (the black screen window).
|Mar 26, 2012, 06:27 PM||#2|
Python can be used interactively, or in a more conventional way of "write code, then execute code."
IDLE gives you both options, i.e. a python shell with a prompt for interactive work, and a text editor (with highlighting and code completion).
When you save a file from the shell, this saves the shell history, which does not give a working piece of python code, but can still be useful. I don't know what your python.exe is, but probably you don't need it
|Mar 26, 2012, 07:54 PM||#3|
You are right, I don't need that extra python window. I typed some code into the IDLE text editor, had to save it, then pressed run, and it then brought up the shell which showed the results. Perfect.
Thanks for your help thundersteele!
I see I can do it all in the shell also and take your point about how the editor is good for saving the code itself.
|Mar 27, 2012, 10:32 PM||#4|
I'm also in a basic (and I mean BASIC) CompSci class at the moment, and I had very similar questions to these that no one ever thinks to answer in class. From what I understand, that black window is (or is a form of) a "terminal"? Someone correct me if I'm wrong here, but that '.exe' extension at the end means it is meant for 'executing' the code you write, and only that. The shell allows you to interactively write and run code (but not save it). The edit window allows you to write and save code (but not run it). The black window is what pops up if you ever select a file you've saved and double-click it (to run it) without telling the computer you want it opened in a shell.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Anyone having trouble with IMAP Idle?||pmontanarella||iCloud and Apple Services||2||Jan 1, 2014 08:39 AM|
|Restarting when idle! please help||beerunner||MacBook Pro||0||Nov 8, 2013 11:08 PM|
|IDLE hangs on raw_input()||turboLT||Mac Programming||10||Oct 9, 2013 09:42 AM|
|Free note app with basic formatting basic HTML||Subu||iPhone and iPod touch Apps||0||Mar 1, 2013 04:44 AM|
All times are GMT -5. The time now is 08:47 PM.