How can I run Python on Idle?

914 views Asked by At

In Windows, the shortcut for running Python from a working file in the IDLE shell is F5, this is not so in Mac. In Mac instead it asks me at first to save the file and then I can run it; F5 is no option. Is there a trick to run the code with just one click in Mac?

Thanks,

1

There are 1 answers

0
Terry Jan Reedy On

In this respect, IDLE should work the same on all platforms. Whether or not IDLE asks before saving when you hit F5 is a configuration option. On Options => IDLE Preferences => Settings dialog, General tab, find

Autosave Preferences
At Start of Run (F5)      O Prompt to Save    O No Prompt

I presume you have Prompt to Save (the default) set on Mac, and No Prompt set on Windows.