I would love to find out what the best way to go about writing Python scripts on a Mac would be. I've gone through two ways (mind you, I'm trying to avoid using vim because I want an IDE rather bland text editor). I went through using PyDev in Eclipse (the more I went through their recommendations and steps, the more of a hassle everything seemed to be.. although I do have everything set up and it can compile.. I want to know if there's a better way. I'm not too fond of Eclipse as is) and I tried to set up Xcode through the following steps: Xcode4 to run Python scripts. The problem with the Xcode version, is I would have to consistently setup the project like this every time. That, and every time I compiled something that needed to create a file it didn't (say using the command conn = sqlite3.connect('list.sqlite3'). Is there a simple way to do this? I've been trying to follow various iOS tutorials that want me to use python scripts (which I'm not familiar with at all) such as raywenderlich.com and Oreilly tutorials. Can anyone provide some guidelines on the best way to go about this?
2 Answers
Personally, I prefer the one that is found on the official Python website, IDLE, which can be downloaded here. It is very easy to deal with, and with the Shell it offers an area to test things out on, it has more than Eclipse can offer- in my opinion. I'm sure that people would feel the complete opposite that I do, but with my experience, IDLE is the way to go.
4 Comments
print() functions and input() functions are presented. The Shell allows you to create functions, but is is much too hard to do it completely in the the shell. It allows you to test certain things out, and can manipulate external files within it. After the code is written, you are able to use the functions by manually typing what you want Python to do. For example, I made a function which found a number of Pythagorean triples. However, I did not put in the codeI think PyDev in Eclipse is pretty good. For scientific programming I wrote the following installation guide: http://hywelowen.org/installing-python-for-scientific-computing-on-osx/
Spyder appears to be a decent alternative, but I haven't used it myself.