How to add "create a new python file" to the registry

0

I have Python 3.2 on a windows 7 operating system. The other day I thought that it would be convenient to add a link to create a new .py file in the right hand click "new" menu. I had worked with the registry before and looked up how to add an item to the "new" menu, but when I got to the registry under HKEY_CLASSES_ROOT the .py extension key was not there. I only know how to add something to the "new" menu using the extension key. I searched the web, but could not come up with any other ways. Python works perfectly fine, and I don't want to mess anything up by adding the extension key. So here are my questions:

Will I mess up python or something else by adding a .py key?( I know it is dangerous to work with the registry, that is why I am looking for a safe solution) If not how can I go about doing this?

OR

Is there a different way to add "create a new python file" to the "new" menu? If so how can I do it?

OR

If the only way is very complicated should I forget about it?

Thank you in advance.

P.S I originally posted on Stack Overflow that they told me to move it over here.

Anthony

Posted 2013-11-04T23:12:14.600

Reputation: 135

Question was closed 2013-11-11T14:28:28.490

Answers

0

The simplest way is probably to use the "new > text document" context menu item, change the name of the new file and add a .py extension.

To extend the explorer, you'll need a shell extension.

There is a free software configurable context menu available. Be careful with windows installers from sourceforge though. Word is that sourceforge now bundles adware with them!

Edit: Adding a new type to the context menu can indeed be done by fiddling with the registry.

Roland Smith

Posted 2013-11-04T23:12:14.600

Reputation: 1 712

1He’s not asking about creating new context menus, he’s asking about adding an entry to the existing New→ menu. – Synetech – 2013-11-10T15:48:46.703