tags:

views:

603

answers:

5

How do I get python to work with aptana studio?

I've downloaded a bunch of stuff, but none of them seem to give me a straight text editor where I can interpret code into an executable type thing. I know there's interactive mode in IDLE, but I want to actually use an editor. So I downloaded the pydev extensions for Aptana studio, but it wants me to configure a python interpreter (so I guess it actually doesn't have one). Where can I find a straight python interpreter that will work with this? or another IDE?

+5  A: 

It's easier than you think. First, there's a version of python on your machine by default. It's kind of out of date, though.

MacPorts is a nice method to get lots of good stuff.

ActiveState has a Python Mac package downloadable for free.

Python.org will lead you to some other options as well.

Charlie Martin
yeah, can you do python stuff in Xcode? There are python application project types, but how do you do other python stuff? Thanks for the quick reply!
CrazyJugglerDrummer
I've never tried, sice I've installed the one True Editor EMACS. But ActiveState has some IDE stuff, and there are other pure Python IDEs.
Charlie Martin
CrazyJugglerDrummer: why suddenly ask about xcode, given that your original question didn't mention xcode at all? After all, xcode doesn't run on Windows, now does it? What's your real question? Or are there several?
Jarret Hardie
Urghhh... macports. In my experience, there's about a 50% chance it will crap out with an incomprehensible error when installing a port. Then you have a 25% chance it won't work once it's installed.
Jason Baker
Jason... you are so right and I'm glad to hear someone else has the same experience. Macports is sometimes useful, but the ports frequently fail... the project seems to have QA issues.
Jarret Hardie
@Jarret, my luck with MacPorts has been better than that, and in fact I just installed python 2.6 and 3.0 on this machine in the last day or two. But ActivePython is simpler and available for Windows as well as OS/X. But he did ask about OS/X, and since you need Xcode to have even a C compiler it's not a bad leap.
Charlie Martin
Charlie... good point about xcode. And I envy your success with macports. I confess I usually build by hand and leave macports to the larger software, which naturally increases the dependencies and the possibility for issues.
Jarret Hardie
@Jarret, I tend to spend most of my time writing text nowadays, not coding. The stuff I want seems to build with MacPorts well, but I'm not doing anything fancy.
Charlie Martin
A: 

A lot of the sites in the Windows list mirror the Mac list.

Python.org has Win32 and Win64 installers.

ActiveState has a free Python Win32 package downloadable for free. There is no Win64 version (yet?).

PyWin32 is a Python package with extra modules for interfacing with Windows. This is not Python itself. These haven't been updated for Python 3.0, though. Despite the name, there is a Win64 version for Python 2.6 on this site.

R. Bemrose
+2  A: 

Idle has a complete text editor -- open a "new window" and type away. Be sure to save it before you run it.

What didn't you like about the IDLE editor?

Also, look at Komodo Edit for Mac OS X. Very nice.

S.Lott
A: 

On Mac OS X Leopard and Tiger, Python is already installed.

On Mac, I've tried a few editor. Textmate is my current choice. If you're looking for a free one, I really liked Xcode. But you'll have to run your script from the command line.

If you want a cross-platform environment, you could try Eclipse and the pydev extension. So you don't get lost between the two platform.

Loïc Wolff
+1  A: 

For windows, I'd recommend the aforementioned ActivePython. Mainly because it comes with Python win32, which you're going to end up installing anyway.

Secondly, if you're coming from the world of Java and C#, you might be expecting too much out of your IDE. I eventually found that more powerful IDEs just made things more difficult than they helped. So my advice is to try to go with something simple. In other words, go with something that will let you jump in and start coding rather than bugging you with a lot of features you probably won't need anyway. :-)

EDIT: One other thing, find and install pip. It makes installing python packages so much easier.

Jason Baker