2

I've started messing around with Google App Engine, writing Python.

I love Visual Studio for many reasons, but currently my .py files just look like text.

I've searched the web looking for a way to get it to highlight python files (intellisense would be a nice bonus, but not required) but turned up nothing.

There are other questions on SO about this, but all the answers point at different IDEs, or installing IronPythonStudio (which seems overkill since I only want to colouring, and it might behave differently being geared at .NET anyway).

Does anyone know how to simple get VS to highlight Python? Is it really that uncommon? :(

Danny Tuppeny
  • 40,147
  • 24
  • 151
  • 275
  • 4
    I've never heard of anybody trying to program python in VS. There is no benefit to it over simple notepad. Just install Eclipse + PyDev. – Kugel Dec 01 '09 at 18:41
  • 1
    @Kugel: I disagree. There are a *lot* of things better in Visual Studio over Notepad, even if you don't have syntax highlighting. – Mark Byers Dec 01 '09 at 18:44
  • If you absolutely _want_ VS, there's nothing wrong with IronPython. You can ignore the .NET bits. However, it is not exactly an IDE of choice for Python. – Pavel Minaev Dec 01 '09 at 18:44
  • @Kugel - Eclipse + PyDev is the way to go – George Godik Dec 01 '09 at 18:56
  • @Kugel I've used Eclipse, and it sucks :P I'm using VS like notepad, it just has a ton of tools and shortcuts I'm used to that make it a nice editor to use. It would just be cool if there was some way to get colour highlighting to make it a less boring to stare at! – Danny Tuppeny Dec 01 '09 at 19:00
  • @Danny: perhaps you found it sucked because you are used to something and are afraid to let go for something else ;-) Eclipse is as user-friendly as VS, and commands a huge user base. Since it is an open platform, it means a lot of plug-ins. Moreover, if you're dealing with several languages like Java, Python and C++, you could keep the same IDE (across different platforms) for all your projects. – RedGlyph Dec 01 '09 at 19:36

4 Answers4

1

http://pytools.codeplex.com/

This is a replacement for IronPythonStudio and works well with VS2010. As for python, you can point it at any python directory library (including Ironpython, etc) for intellisense. Best part is, it's free.

PuLSe
  • 21
  • 4
1

Under Windows you could use Notepad ++. It has syntax highlight for the python and is rather functionally rich, lightweight editor.

artdanil
  • 4,952
  • 2
  • 32
  • 49
1

Thanks for all the responses. I did scan through some Python IDEs (and their screenshots) and decided to check out IronPythonStudio. My .py files now get colour coded nicely, and there's some intellisense :) Unfortunately Ctrl+K,D doesn't work, but it's much nicer to code than the plain yellow text I had earlier.

For anyone that's a massive Visual Studio fanboy like me, IronPythonStudio is definitely better than just coding it as text ;o)

Danny Tuppeny
  • 40,147
  • 24
  • 151
  • 275
0

Unfortunately, I don't think there is any way to integrate VS with python.

If you want something not too heavyweight, you can use Komodo edit, - it is quite good for small-to-medium projects. You can use pydev+aptana studio or pydev+eclipse for bigger stuff. It is by no means lightweight, but pydev has some nice tools shipped with it (preconfigured), such as pylint.

As for code-completion, in my opinion, all python editors/IDE are a bit lacking in that area, but that is because of python's dynamic nature (in short, you can't figure what the code does before actually running it), so it can't be considered an IDE's flaw, or anyone's flaw for that matter.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
shylent
  • 10,076
  • 6
  • 38
  • 55
  • ... or for a list of Python IDE's: http://stackoverflow.com/questions/81584/what-ide-to-use-for-python – RedGlyph Dec 01 '09 at 18:56
  • Well, I've just mentioned the tools, I have personal experience with. I mean, everyone can use google (*right*?), maybe the questioner wanted an opinion of a real human. – shylent Dec 01 '09 at 19:10
  • The link is convenient to explore further in the same direction as your post, it gathers all the information in one place with the opinion of many other real humans :-) __Komodo__ (not Komodo Edit but the paying version) and __Pyscripter__ are the most accurate when it comes to intellisense according to my experience. __PyDev__ being the follow-up in a more convenient but heavier environment. – RedGlyph Dec 01 '09 at 19:28
  • No sweat, RedGlyph, I was just explaining why I've mentioned these particular tools. I was thinking of buying komodo ide for personal use, because eclipse sure does feel cumbersome at times. How is its intellisense better than Komodo Edit? Does it use different (additional) techniques for code analysis? – shylent Dec 01 '09 at 19:33
  • @artdanil: nice one, I've seen this list like one year ago and it has grown _a lot_! @shylent: sure, I just didn't want you to think my comment was a negative critic - it wasn't. Regarding __Komodo__, there is a trial you can download. Correction of what I stated previously: _intellisense_ looked the same, but with the IDE you have a code browser, useful tools, of course a good debugger, a shell, source control (supports SVN). That being said, nothing you won't have with PyDev for free except a smarter intellisense (though PyDev is getting very good too). – RedGlyph Dec 01 '09 at 20:11