3

Could anyone tell me how to use pure Python without Cocoa support in Xcode? I can only find the Cocoa-Python template on the Internet.

Thanks in advance.

3
  • What are you trying to create in Xcode? The templates are for specific use cases. Commented Mar 2, 2010 at 0:00
  • And OS X comes with Python 2.6.1 these days. Is your goal to use the XCode text editor to write your Python scripts? Commented Mar 2, 2010 at 0:14
  • 1
    I'm trying to create a python project like std c++ command line tool project in xcode. I would like to use it as not only a text editor, but also a project organizer, and I can run my code directly in Xcode. I'm sorry for my English. It's not my native language. Commented Mar 2, 2010 at 0:32

4 Answers 4

7

If you are just trying to write pure Python command line tools, using Xcode is like using a big sledge hammer to hit a tiny nail, in other words, probably not the best tool for the job. There are some old posts out there about how to set up a pure Python Xcode project, like this one, but, in the end, you might be better off using an editor you're already familiar with, like emacs, or, if you don't mind spending a little bit of money, TextMate, all along with a free vcs like mercurial or git. Or take a look in MacPorts for those and other options.

Sign up to request clarification or add additional context in comments.

3 Comments

I personally prefer TextMate projects because of their flexibility. Plus, you don't actually have to have a "project" defined. You can just cd to the source tree and mate . to open the source tree into the project drawer of TextMate. One drawback is that you can't run the Python program directly from TextMate if it needs user input. I believe the developer is working on that though.
I like TextMate projects as well. At least with the fairly recent Python plug-in I have installed, when running a Python program in TextMate, raw_input() opens a window with a text field for input.
In addition to MacPorts, you might want to have a look at Fink, which is another package manager (aidanfindlater.com/2009/04/18/fink-vs-macports).
0

Just about the best IDE for editing and running Python code is actually still emacs. The python-mode for emacs does a wonderful job of maintaining whitespace and, with a bit of configuration, emacs is truly a powerful editor.

Pretty radically different than your typical GUI editor, certainly, and some find it quite distasteful. I've personally used emacs, mostly, for editing Python since 1992 or so.

Google will reveal all, including a native version of Emacs for Mac OS X.

Comments

0

A lot of people like eclipse with PyDev for python, although I don't know how wel it works on OS X with apple's mishandling of java.

Comments

0

Even though I am using BBEdit, I found Wingware Python editor did a good job in exploiting the introspected data of Python modules. Purely designed for Python. Give it a try.

http://www.wingide.com/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.