Open a new scratch file in PyCharm?

8.3k views Asked by At

In PyCharm 4.5, one of the new features is listed as "Temporary Python Scratch Files". How do I create these?

I've searched through the "New" menu and haven't been able to find it. When I select "New...", I am given the option to create permanent files.

3

There are 3 answers

2
Andy On BEST ANSWER

You can create a scratch file by going to "Tools" -> "New Scratch File..."

New Scratch File Menu Option

This presents you with the "New Scratch" dialog

New Scratch File Dialog

If you are a fan of keyboard short cuts, the default for this is Ctrl+Alt+Shift+Insert.

This key combination can be modified by going to "File" -> "Settings" -> "Keymap" and searching for "Scratch"

Modify Scratch pad keyboard shortcut

0
RBT On

I'm using PyCharm 2018.2 Community edition on Windows. Now there is an option to create a new scratch file in the context menu when you right-click your project folder as shown below:

enter image description here

Or just press Ctrl + Alt + Shift + Insert key combination which shows an explicit context menu meant only for scratch files:

enter image description here

0
Pavel Radchenko On

You can find any PyCharm command with Help/Find Action menu! It is really useful. enter image description here