1

I am brand new to python and I'm using IDLE. However, as I learn, it is very tedious to retype an entire class over and over again at the prompt while I work out small syntax errors.

I would love to simply write a .py script in notepad++ and load it from the IDLE prompt. How is this done?

I'm using Windows not UNIX/Linux or Mac

4
  • Consider installing an alternate Python shell, like ipython which allows you to edit previous commands (hit the up arrow) in addition to many other features. Commented Sep 12, 2013 at 6:15
  • @BurhanKhalid You can do the same in IDLE (I think previous command is bound to Crtl+P). But an alternate editor still wouldn't resolve the issue that the OP doesn't want to have to insert the command to run every time. Commented Sep 12, 2013 at 6:30
  • @LegoStormtroopr if that editor was Sublime Text, it would :) but your point is valid. Commented Sep 12, 2013 at 6:33
  • @BurhanKhalid At some stage I rebound previous command to Crtl+P in my IDLE. Its a surprisingly good editor! Commented Sep 12, 2013 at 6:38

1 Answer 1

3

In IDLE, Crtl+n will create a new python file that you can edit your code in. When you click F5 it will prompt you to save the file, which you can save anywhere and then will execute the file.

Each time you edit, click Ctrl+S to save and F5 to run the newly updated file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.