XCode as an IDE for Python?

Discussion in 'Mac Programming' started by FluJunkie, Feb 24, 2011.

  1. FluJunkie macrumors 6502a

    Jul 17, 2007
    I'm rather fond of Python as my language of choice for most projects, but I continue to wander, looking for an IDE I like. I've heard good things about XCode, and I may very well start having to use it for some projects done better in other languages?

    Can XCode be used as an IDE for Python. I've found a few mentions online of PyObjC, but they're all at least an OS or so out of date, and somewhat cryptic as to whether or not this still works.

    Any clues, pointers, etc? Can it be used with other Python installs besides Apple's, like say the Enthought distribution?
  2. Synthion, Feb 24, 2011
    Last edited: Feb 24, 2011

    Synthion macrumors regular

    Jan 4, 2011
    Ditto, I want a really good IDE for python, (I've been getting by...), I already have xCode for Obj-c, but have not really messed with it + python that much. Any experienced guys out there with some ideas. (don't diss python)
  3. FluJunkie thread starter macrumors 6502a

    Jul 17, 2007
  4. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Like you I spent a long time looking for a good IDE or at least a good text editor with features to help with Python programming. I had kinda given up all hope until I came across the combo of MacVim and the Janus plugin pack for it. It's superb.

    Here is a screenshot of my normal working display (click on it to see the full size version), as you can see it is extremely space efficient and easy to use.

    Attached Files:

  5. elppa macrumors 68040


    Nov 26, 2003
    I take it you have all tried and discounted PyDev?

    If not then I'd say take a look. I have used it for Python work and found it to be pretty decent.

    I'm on my phone so can't easily add a link. Sorry.
  6. danwilliams macrumors member

    Sep 15, 2008
    I have no experience with XCode. However, I use Eclipse with PyDev plugin on my Windows development machine at work. It is a decent IDE for Python development. The debugger is acceptable for my needs.

    I have not tried it yet on my home Mac but I assume Eclipse+PyDev would work on a Mac.
  7. elppa macrumors 68040


    Nov 26, 2003
    It does. :)
  8. FluJunkie thread starter macrumors 6502a

    Jul 17, 2007
    I've avoided Eclipse due to a number of horror stories about how hard it is to set-up. I'm a "means to an end" programmer, so I consider having to tinker frequently to be A Bad Thing.

    How rough was setting up Eclipse + PyDev?
  9. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Personally I found it detestable simply because it is so bloated and slow. I want something that loads and responds instantly. Eclipse literally uses half my RAM and that is before it has even done anything. Not good enough.

    If you absolutely must use a package like that then Komodo Edit is a MUCH better choice than Eclipse and PyDev.
  10. elppa, Feb 26, 2011
    Last edited: Feb 26, 2011

    elppa macrumors 68040


    Nov 26, 2003
    I didn't find it bad at all on the Mac. It's not zero setup, but it is a one off.

    [1] Help > Eclipse Marketplace…

    [2] Then type PyDev in the search.

    [3] Then click Install. You'll need to step through the wizard and agree to the license. And restart Eclipse once it is done.

    [4] Then go to Window > Open Perspective > Other and choose PyDev from the list. That changes the view to show only those palettes relevant for Python development.

    [5] Then go to Preferences (Eclipse > Preferences). From the source list expand PyDev and click "Interpreter - Python". Then click on the Auto Config Button (to the left). It will pick up the version bundled with Mac OS X. Click OK to confirm.

    That's pretty much it. You can now create project and packages from File > New.


    It also supports remote projects (ssh) if you want to work directly on a server.

    You can use Remote Systems Explorer. If you need help getting this setup this please ask. :)
  11. elppa macrumors 68040


    Nov 26, 2003
    Far enough, personally I don't find Eclipse that slow, sure it is not as pretty as some other things, but not slow. I don't really care about RAM usage as long as I have enough. IDEs tend to consume lots of RAM, that's the nature of them.
  12. wisty macrumors regular

    Feb 18, 2009
    IDLE, the built-in python editor is OK.

    There's one quirk - you can launch the current file by pressing "Ctrl-R". This runs off the same process as IDLE itself, so it starts really fast, and you don't have to re-load libraries.

    The downside of this is that if you modify a library, it won't be reloaded.
  13. danwilliams macrumors member

    Sep 15, 2008
    As elppa stated. Eclipse is not too hard to setup. As far as the RAM usage goes (on Windows at least), it isn't noticeable and if it doesn't get in my way, I'm fine with it.

    Eclipse isn't the fastest to start up and is acceptable for my needs. If there is another IDE that is better, quicker, slicker, and free, I wouldn't hesitate to switch from Eclipse.
  14. ifmihai macrumors newbie


    Feb 12, 2012
    I tried text editors, pydev+eclipse, aptana (based on eclipse, pydev included), komodo, pyscripter (can have a great future), idle, pycharm, wing ide, and some 2 or 3 others.
    kind of all i found on forums, tried it at least once.

    my favorite up to now is aptana. or eclipse+pydev.
    but aptana is much more configurable (themes and what not).

    wing ide can be great too, but its too hungry, eats up too many resources for my taste.

    code completion is best in pydev (IMO)
  15. jblagden macrumors 65816


    Aug 16, 2013
    It's a Good IDE for Python and Other Languages

    Xcode is a really nice IDE for Python, you just have to do a few things to make it work with Python. The main advantage to using Xcode is that it works with pretty much any programming language, which is important because it prevents you from having to find a different IDE for each new programming language that you learn. I'm not sure, but I think you might be able to use Xcode to create a binary program from your higher-level language code(like C++,Java and Python).

    Here are the steps for using Python in Xcode:

    1. Open Xcode
    2. Create a new project
    3. In the template selection box, choose External Build System.
    4. In the next box, type in a name, company name and Build System. The build system will be usr/bin/python
    5. Click on the name of your program and click on Edit Scheme.*
    6. In the Info tab of Run, set the executable to python, which can be found in usr/bin/python.*Next, for Debugger, select none.
    7. Move over to the Arguments tab. Click on the plus button to add a new argument. Type in the name of the program that you’ll write.
    8. Click on OK.
    9. Right click on your project and click on New File.
    10. A file template selection window will appear. From here, click on empty and name the file, but make sure to use the same name that you used for your new argument in step 7 Then click on OK. Here, you’ll type in your program.
    11. Click on Edit Scheme. In the options tab of Run, check the box that says “Use custom working directory”. From there, you go through the file path and show Xcode where your Python program is. Click on Okay.*
    12. Now, your program will run in Xcode.
  16. MorphingDragon macrumors 603


    Mar 27, 2009
    The World Inbetween
    I usually use Visual Studio, but I guess that's not much help.

    Last time I did python work on a Unix system I used netbeans.
  17. Senor Cuete macrumors regular

    Nov 9, 2011
    XCode Memory Use

    On my Mac with a pretty big Cocoa, Objective C project open, XCode is using 193 megabytes of RAM. Not a problem on a machine with 16 gigs.
  18. !NS!GN!A macrumors newbie

    May 4, 2014
    Ontario, Canada
    Try Textmate2

    I absolutely love Textmate. It has syntax highlighting and autocomplete and can be used to code over 20 languages.

  19. ArtOfWarfare macrumors G3


    Nov 26, 2007
    If that's all you need, you could probably write your own "IDE" in a few days.

    Have you (poster promoting TextMate) tried Sublime, yet? I've yet to find a superior text editor (although I'm working to make one).
  20. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    I don't get the hype around Sublime Text. It's OK but nothing special. Vim and Emacs easily out strip it in functionality and flexibility.

    I've yet to find something I couldn't do in either of them.
  21. MacCruiskeen macrumors 6502

    Nov 9, 2011
    Sure, you can do anything in any text editor if you're willing to put up with enough self-flagellation. Doesn't mean it's the best tool for any particular job, though.
  22. D.T. macrumors G3


    Sep 15, 2011
    Vilano Beach, FL
    Quoting this just because I thought it was hilarious! :D
  23. kage207 macrumors 6502a

    Jul 23, 2008
    See, I just like the commands and hotkey support you can do. Plus the plugin manager is really nice.

    EDIT: Sublime that is.
  24. tralfaz macrumors member


    Jun 20, 2013
    Eric IDE

    I haven't used it extensively, but what I tried it for it worked pretty well. It's built on top of PyQt, so if you are already working with that, than you probably already have a lot of the prerequisite components. It is primarily a Python IDE so it doesn't have the weight of an xCode or Eclipse.

  25. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Since you only need to learn it once the self-flagellation as you put is only short term and then you have the advantage of being able to use the same text editor no matter what machine you are using. If you could use Sublime Text over an SSH session to an OpenBSD server I might be more impressed with it but since you can't I'm not interested.

    I can use Vim on any system I use be that OS X, Windows, Linux, FreeBSD, OpenBSD, Solaris or any of the other operating systems that one needs to use for their professions. It will also work on operating systems running on non x86 or x86_64 CPUs such as ARM computers (Raspberry Pi anyone?) or PowerPC CPUs such as IBM AIX systems.

    That is why Sublime Text doesn't make the grade in my eyes. There is more to a text editor than a pretty GUI and some nice plugin managers. Do any serious work and you'll quickly discover why you'll need to learn Vim (or rely on sub-standard text editors like nano or pico).

Share This Page