Sheng Bi
Sheng Bi

Reputation: 149

How to read a .py file after I install Anaconda?

I have installed Anaconda, but I do not know how to open a .py file..

If it is possible, please explain plainly, I browsed several threads, but I understood none of them..

Thanks a lot for your helps..

Best,

Upvotes: 1

Views: 9490

Answers (2)

Rory Daulton
Rory Daulton

Reputation: 22544

In the menu structure of your operating system, you should see a folder for Anaconda. In that folder is an icon for Spyder. Click that icon.

After a while (Spyder loads slowly) you will see the Spyder integrated environment. You can choose File then Open from the menu, or just click the Open icon that looks like an open folder. In the resulting Open dialog box, navigate to the relevant folder and open the relevant .py file. The Open dialog box will see .py, .pyw, and .ipy files by default, but clicking the relevant list box will enable you to see and load many other kinds of files. Opening that file will load the contents into the editor section of Spyder. You can view or edit the file there, or use other parts of Spyder to run, debug, and do other things with the file.

As of now, there is no in-built way to load a .py file in Spyder directly from the operating system. You can set that up in Windows by double-clicking a .py file, then choosing the spyder.exe file, and telling Windows to always use that application to load the file. The Anaconda developers have said that a soon-to-come version of Anaconda will modify the operating system so that .py and other files will load in Spyder with a double-click. But what I said above works for Windows.

This answer was a bit condensed, since I do not know your level of understanding. Ask if you need more details.

Upvotes: 3

Joe Flip
Joe Flip

Reputation: 1195

You can use any text editor to open a .py file, e.g. TextMate, TextWrangler, TextEdit, PyCharm, AquaMacs, etc.

Upvotes: 0

Related Questions