beginagain
beginagain

Reputation: 87

How to create a .py file within canopy?

I am using Enthought canopy for data analysis. I didn't find any option to create a .py file to write my code and save it for later use. I tried File> New >IPython Notebook, wrote my code and saved it. But the next time I opened it within Canopy editor, it wasn't editable. I need something like a Python shell where you just open a 'New Window', write all your code and press F5 to execute it. It could be saved for later use as well. Although pandas and numpy work in canopy editor, they are not recognized by Python shell (whenever I write import pandas as pd, it says no module named pandas). Please help.

Upvotes: 0

Views: 1029

Answers (2)

Just Me
Just Me

Reputation: 11

Let me add that if you need to open the file, even if it's a text file but you want to be able to run it as a Python file (or whatever language format) just look at the bottom of the Canopy window and select the language you want to use. In some cases it may default to just text. Click it and select the language you want. Once you've done that, you'll see that the run button will be active and the command appear in their respective color.

Upvotes: 1

jonathanrocher
jonathanrocher

Reputation: 1208

Umair, ctrl + n or File > Python File will do what you want.

Best, Jonathan

Upvotes: 1

Related Questions