On Fri, Jan 29, 2016 at 11:41 AM, STF <lapsap7+pyt...@gmail.com> wrote:
> ...How do you call this thing, BTW? I'm unable to > understand how to navigate inside this thing. I mean, when I open it, in > which folder am I in? Suppose I have a Python file in > D:\mycode\abc\myfile.py. How to run it? IDLE presents itself in two ways. Normally it defaults to opening up as the Python interpreter where you see the ">>>" and can type in code interactively. Its other view can be accessed by going to the "File" menu and either choosing "Open..." and browsing to the file you wish to open, such as "D:\mycode\abc\myfile.py" you mention above, or by creating a new file with the menu option "New File". This will open a second window which is an editor window that you can type in and edit Python code, such as you were doing in Programmer's Notepad. To run the code you have either opened using "Open..." or that you have typed in, use the menu "Run" and select "Run Module". Having both of these windows open at the same time is quite handy! As you type code into the Editor, you may get stuck and not be sure as to what you want to do next. You can then go to the Interpreter window and type in code snippets, exploring Python's behavior for the code you are contemplating. Once you are satisfied, back to the Editor and enter your code. Of course you can copy and paste between the two as well. Notice that the menu bar has differences between the two windows. You should explore the various menu options to see what you can do with both forms of IDLE. Don't forget to check out "Help > IDLE Help" for more information on IDLE's options. Also note that you can get to the local Python language docs through "Help > Python Docs". One more thing to note: IDLE has shortcut keys. As you explore the menus you will see some of them listed next to the menu entries. For more go to "Options > Configure IDLE" and you will see a small tabbed window. If you go to the "Keys" tab, you can see (and edit) the key bindings IDLE uses as well as available pre-configured key binding styles. Hopefully I'm answering the question(s) you are really asking and have not gone off on a tangent! -- boB _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor