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.
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.
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.
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.
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/
Related
I recently installed IPython after hearing about it on this forum. I am looking for an environment that is similar to what might come with MATLAB or RStudio for R.
I was under the impression that IPython would give me that but the version I downloaded for Windows looks very bare. In fact I do not really see a difference between IDLE and IPython except tab completion and history (which I have been wanting) but this is about as much as the interpreter that comes with R which I used to think was hard to work with.
Have I misunderstood the point of IPython? Or is it possible that I have not installed correctly?
I have also downloaded the 'Console' and while I am not convinced that it is working properly, it looks very bare as well.
Komodo looks good but is somewhat costly. Netbeans and Eclipse also look good, but do not seem to be straightforward to install, at least for somebody with my level of knowledge, so it would be good if somebody could verify their compatibility with Python, features, and ease of use for a non-expert user.
I suggest you try Spyder
You can find it here : https://www.spyder-ide.org/
It is perfect for you : it is a lightweight Scientific IDE with the explicit purpose of being similar in feel to matlab.
It has an editor, a console and lots of neat features and plug-ins.
It can use IPython as its console.
IPython is "just" an enhanced python console with pure awesomeness built-in. (actually it's much more : it's a client-server architecture with multiple interfaces to pure magic, in console mode, Qt, and even inside a browser with the Notebook)
Definitely check it out later on when you've used the basic console for a while.
For the context, i've been using Eclipse, pycharm, got tired of those, and i started to ask around what people use, and the one i've heard the most about is sublime text.
You should take a look, maybe it's what you are looking for!
I just saw it's not open source though!
What i'm using now is Ninja-IDE, which is written in python and is open source and seems pretty good! It has plenty of plugins, which includes an IPython plugin
Have you tried the qtconsole backend? It was released after you asked your question.
This is a very lightweight widget that largely feels like a terminal,
but provides a number of enhancements only possible in a GUI, such as
inline figures, proper multiline editing with syntax highlighting,
graphical calltips, and much more.
From the Windows command prompt, enter:
ipython qtconsole
Based on my project, which is the best version of Python to use? Which is the best IDE to use that runs on Linux (Ubuntu) and Windows? Here is the background for these questions:
I'm building a small application GUI that features "drill-down" views and direct manipulation on personalized calendars. Should I use Python 3, the newest version, or an older version is better at this GUI task? I've heard that some of the old GUI libraries do not support the new version yet, but not quite sure if this will matter a lot. Could you please name the libraries that might be relevant? Even better if you could suggest your preferred IDE either under Windows or Ubuntu. Many thanks.
You can use vim as IDE.Start program with 2.7 version with 3.0 in mind.Have a look at this python 2 or 3
Depends a bit on which GUI you use. If you're using PyQt, it supports v3. wxPython, however, does not.
As a rule of thumb, for now, you can pretty much use python 3.0 syntax in 2.7, and keep things compatible going forward. I'd say, except for print statements, the differences aren't that mind-blowingly different between 2-3. IDE's pretty much support both - and gnud's links are pretty good for that.
Popularity
When selecting a framework to learn, popularity is a reasonable gauge of how good a framework is, and how easy it will be to get support when you run into problems. The tags on stackoverflow are a quick way to get a ballpark idea.
Environment
Start with what you're the most familiar with. When learning something new, there is so much to absorb, that having something familiar really helps.
For example, when I taught myself python a year ago, I used pydev in eclipse, because I've been a cross-platform java developer using eclipse for quite some time. Made life much easier.
If you're starting from ground zero, it doesn't matter very much. Pick something popular that you feel comfortable in and start coding. As you become familiar with what you're doing, you'll be able to compare other packages and determine if it's right to switch.
The popular IDE's are cross-platform. Graphics packages too, although usually one is stronger on unix or windows.
SublimeText2 has excellent Python support.
Also you can use PyDev for Eclipse.
About versions: I think you should write 2.7-compatible code, but be ready( and know how) to update it to 3.2 or later.
I'd recommend starting with 2.7 since most libraries work with it. The differences between both are not too big, so you might even be able to switch if you want to in the future. But before you choose Python 3 and you find a library you really want to use and it's not available for Python 3 you would regret choosing.
wxPython and PyQt are pretty popular. wxPython doesnt support 3 yet...
I prefer PyCharm it's not free but it's so great and it has so many features...
One of the best code-completion i ever had for Python.
P.S.: if its really simple you mgiht even consider using tkinter.
This question already has an answer here:
Closed 13 years ago.
Possible Duplicate:
What IDE to use for Python
I have Notepad++ and NetBeans 6.8, however I don't know if they work. I know you can edit Python with Notepad++ and compile/run it using the command line thing, but I'm not really sure how. I know NetBeans is a full-featured IDE and you can compile Java programs, but I don't think they support Python?
Any ideas?
Eclipse with PyDev has been a great combination for me. Great editing experience and more importantly a good debugger. Pylint is supported as well, this will save you lots of headaches. This is all open source too. If you want to do IronPython development though I would add SharpDevelop 3.1.1. It has a drag & drop GUI form designer and overall is very much like Visual Studio, except it's free of course.
Actually, netbeans has some python support right now: http://wiki.netbeans.org/Python. It works (still I prefer a plain text editor).
For a list of python IDEs i'd call this list comprehensive: What IDE to use for Python?
I like PyDev under Eclipse ( and of course Eclipse does Java too).
I am using eclipse with pydev extension
Have a look at PythonEditors, there is a huge list of editors/IDEs with python-support.
You have IDLE installed with Python. It is good editor which serves the purpose well. It is multi windowed, have syntax highlighting and auto complete features.
I use Komodo Edit for all of my Python work. Actually, I use Komodo Edit for all of my IDE uses save for when I'm working in .Net. It's not really a full on IDE, but it's been perfect for everything I've used it for. It's pretty lightweight, has good syntax highlighting, but doesn't shove a lot of arcane project file overhead at you that you'd need to learn. It's worth having around, in my opinion, even if it doesn't suit your needs for Python.
Python doesn't need to be compiled - it compiles itself (to bytecode) when you run it. Any text editor will work.
Edit in response to comment: Yes, absolutely (although I think NetBeans does support Python). You'll find that IDEs are much less of a requirement when using a dynamic language like Python or Ruby, compared to Java or C#.
I would go with IntelliJ IDEA, it has a great python plugin.
Eclipse with PyDev is also nice, if you like open source.
I'm certain there are a number of IDEs with Python plugins (Eclipse and Emacs spring to mind) but there are two things you want to look for. The first is support for basic lint checking (little red squiggly concept) through some kind of tool (pylint or pychecker). The second is support for running the Python interpreter embedded into it.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm about to start a new job where the coding practices are heavily centered around TDD and refactoring, and whose primary development language is Python. I come from the Java world, and have been a confident user of Eclipse for a good, long time. When not working in Java, I use emacs.
I'm looking for an IDE for Python that will give me a lot of the capabilities I've grown used to with Eclipse, not only for refactoring but in terms of code completion, project management, SCM integration (currently CVS, but likely to switch to git one of these days) et al.
What IDE should I use?
My 2 pennies, check out PyCharm
http://www.jetbrains.com/pycharm/
(also multi-platform)
Have tried many different (Kate, Eclipse, Scite, Vim, Komodo): each one have some glitches, either limited functions, or slow and unresponsive. Final choice after many years: Emacs + ropemacs + flymake. Rope project file open dialog is extremely quick. Rope refactoring and code assist functions are super helpful. Flymake shows syntax mistakes. Emacs is the most configurable editor. I am very happy with this config. Python related part of config is here: public.halogen-dg.com browser/alex-emacs-settings/configs/cfg_python.el
I use TextMate for all my Python programming needs. It's not an IDE per se, but it does a lot of stuff that an IDE does (without all the cruft of an IDE). It has syntax highlighting, code folding, integration with various SCMs through the use of additional bundles (I know it supports SVN, Git, Mercurial, Darcs, and probably a few others). It's also quite extensible and customizable (again, through the use of bundles). It also has a basic concept of projects. One place where it doesn't shine, though, is in code completion; some bundles have limited support for code completion, but it's generally not as amazing as that of most language-specific IDEs. Given how awesome TextMate is, though, I don't know sacrificing that. TextMate's definitely made me much more productive.
Pydev for Eclipse, as others have mentioned, is good.
Netbeans has a beta Python plugin that is a little rough around the edges, but could turn into something really cool.
Additionally there is a long list of programming centric text editors for the mac, that may or may not fit your needs.
Textmate - costs money, people love this program, but I haven't used it enough to see what all the fuss is about.
Jedit - Java based text editor, has some nice features, but the startup time isn't great (due to Java).
CarbonEmacs - Decent Emacs port.
AquaEmacs - Better Emacs port.
TextWrangler - Lite, free (as in beer) verision of BBEdit.
BBEdit - The old guard. The defacto editor before Textmate stole its limelight. Expensive.
Smultron - Very nice editor, the UI is similar to Textmate.
Idle - Python's own little editor, has some nice features, but also some major problems. I've personally found it too unstable for my usage.
Sublime Text - This is really sweet text editor that has some surprisingly good Python support.
Pycharm - Another solid full on IDE for Python.
Eclipse with Pydev works best for me on any platform.
I really enjoy using PyCharm. http://www.jetbrains.com/pycharm/
macvim + pyflakes.vim
I like Spyder, it has many tools, such as profiling, intelligent indentation helper and a good autocompletion support
https://code.google.com/p/spyderlib/
I usually use either komodo edit or aquamacs with ropemacs. Although I should warn you, IDE features won't be what you're used to if you're coming from a Java or C# background. I personally find that powerful IDEs get in my way more than they help.
UPDATE: I should also point out that if you have the money Komodo IDE is worth it. It's the paid version of Komodo Edit.
If you have a budget for your IDE, you should give Wingware Professional a try, see wingware.com .
I've used WingIDE and have been very happy. Intellisense is pretty good, some other things are a bit wacky but overall it's a very productive tool
If you are looking for an interactive environment and not needing to code modules, I would suggest IPython. Though this is developed with scientists/statisticians in mind, it will run just as well without any of the scientific packages installed. The features are powerful, with code completion, integrated help, integrated debugging, etc., and it functions as a notebook with Markdown and MathJax integration. By far the best choice for those that need powerful features without wishing to load megabytes of GUI into RAM--since it is browser based, it is used in your always loaded chrome/safari instance. ;-)
Eclipse PyDev plugin.
http://pydev.sourceforge.net/
since you are familiar with Eclipse maybe you are interested in Pydev
Python support on netbeans is surprisingly good, and comes with most of the features you're looking for.
TextMate or Panic's Coda. NetBeans works very well, if you want a full-blown kitchen sink IDE.
"Which editor/IDE for ...?" is a longstanding way to start a "My dog is too prettier than yours!" slapfest. Nowadays most editors from vim upwards can be used, there are multiple good alternatives, and even IDEs that started as C or Java tools work pretty well with Python and other dynamic languages.
That said, having tried a bunch of IDEs (Eclipse, NetBeans, XCode, Komodo, PyCharm, ...), I am a fan of ActiveState's Komodo IDE. I use it on Mac OS X primarily, though I've used it for years on Windows as well. The one license follows you to any platform.
Komodo is well-integrated with popular ActiveState builds of the languages themselves (esp. for Windows), works well with the fabulous (and Pythonic) Mercurial change management system (among others), and has good-to-excellent abilities for core tasks like code editing, syntax coloring, code completion, real-time syntax checking, and visual debugging. It is a little weak when it comes to pre-integrated refactoring and code-check tools (e.g. rope, pylint), but it is extensible and has a good facility for integrating external and custom tools.
Some of the things I like about Komodo go beyond the write-run-debug loop. ActiveState has long supported the development community (e.g. with free language builds, package repositories, a recipes site, ...), since before dynamic languages were the trend. The base Komodo Edit editor is free and open source, an extension of Mozilla's Firefox technologies. And Komodo is multi-lingual. I never end up doing just Python, just Perl, or just whatever. Komodo works with the core language (Python, Perl, Ruby, PHP, JavaScript) alongside supporting languages (XML, XSLT, SQL, X/HTML, CSS), non-dynamic languages (Java, C, etc.), and helpers (Makefiles, INI and config files, shell scripts, custom little languages, etc.) Others can do that too, but Komodo puts them all in once place, ready to go. It's a Swiss Army Knife for dynamic languages. (This is contra PyCharm, e.g., which is great itself, but I'd need like a half-dozen of JetBrains' individual IDEs to cover all the things I do).
Komodo IDE is by no means perfect, and editors/IDEs are the ultimate YMMV choice. But I am regularly delighted to use it, and every year I re-up my support subscription quite happily. Indeed, I just remembered! That's coming up this month. Credit card: Out. I have no commercial connection to ActiveState--just a happy customer.
I've searched on Google for an app like this for a while, and I've found only options with heavy and ugly interfaces.
Then I opened Mac App Store and found CodeRunner. Very nice and clean interface. Support many languages like Python, Lua, Perl, Ruby, Javascript, etc. The price is U$10, but it's worth it!
I've been using an Evaluation copy of Sublime Text. What's good is it doesn't really expire.
It's been good so far and was really easy to get started with.
I may be a little late for this, but I would recommend Aptana Studio 3.x . Its a based on eclipse and has everything ready-to-go for python. It has very good support for DJango, HTML5 and JQuery. For me its a perfect web-development tool. I do HTML5 and Android development too, this way I do not need to keep switching different IDE's. It my all-in-one solution.
Note: you need a good amount of RAM for this to be snazzy !! 4+ GB is awesome !!
Visual Studio Code + Official Python Plugin
Here you see an overview of its current Python features:
https://code.visualstudio.com/docs/languages/python
Chocolat
http://chocolatapp.com
It's lightweight and offers Code Completion. Costs money.
EDIT:
Apparently Chocolat was an interesting option in 2013 but since then many others came up and development stalled. Nowadays I recommend Visual Studio Code + Python Plugin.
You might want to look into Eclim, an Eclipse server that allows you to use Eclipse functionality from within your favorite text editor. For python-related functionality, it uses Rope, PyFlakes, and PyLint under the hood.
I'm a complete newbie to Python. I've worked on PHP/JavaScript earlier but starting today I'm moving onto Python. I have no idea about the environment needed for it. I could use some suggestions on it for me to get started.
Under Unix, Emacs is a good choice, to which I always come back, because it is convenient to have a single editor for everything, and because it's open source.
What is best for you depends on your past experience with IDEs. I'd say: stick with what you've been using, or take this opportunity to try an even better IDE.
Note: Python comes with Idle, which is a very simple (if limited) IDE.
Be sure to check out IPython. It's an enhanced interactive python shell with a bunch of useful features such as Tab-Completion using introspection (eg, type "my_object." to see a list of its attributes and methods), logging your interactive session to an executable python-file, defining macros, etc. The documentation page has a link to the tutorial as well as screencasts showing it in action.
On my mac/Linux machines, python came pre-installed. On windows I use both jython under the eclipse IDE and ActivePython with their IDE/eclipse. With eclipse you'll want PyDev.
It all depends on what you are looking for and what you are already using.
For instance, if you are using a more 'simple' editor at the moment: as long as it's got Python syntax you've got the basics.
If you are used to e.g. Eclipse you can just continue to use that, combined with Pydev. Besides syntax highlighting you'll also get more fancy features to help you debug and refactor your code.
Personally I use Emacs with python-mode (and a few other modes to interface with Subversion and Git). In the past I used Vim which also worked quite well.
My advice would be to start out with your current environment as long as it has some rudimentary support for Python. Once you are familiar with the language, start exploring what your environment is missing and either add it or if you cannot, switch to an enviroment which does support the feature.
I use gvim with some plugin in order to have better support for python.
If you like IDE, look at wing IDE wich is the best I have tested so far. Especially the debuger included is really helpful.
The Python Beginner's Guide and the official Python Tutorial both seem like good places to start.
Geany is a good option for a Linux setup, it's intellisense isn't that great but syntax highlighting is good and it can compile your code directly from inside the editor, plus it handles other languages such as C/C++, PHP, Java etc... Eric is another popular choice as it's a full IDE and I know some people use Eclipse.
On windows I use Notepad++, but it's mostly because I like text editors instead of fully blown IDE's.
Reference wise Daniel's choices are very good places to start, also check out Green Tea Press who do free computer books, there are two Python choices on there but the "Python for Software Design" book hasn't yet been published properly although you can download the manuscript. The "How to Think Like a Computer Scientist" book is a good one and not as scary as it sounds.
IDLE is nice to try out things. Other tools that people like are Eclipse with the Pydev plugin which seems to work ok, although it has crashed a few times (Eclipse, that is) and NetBeans (which I haven't tried) but some people seem to like.
I can only help you if you're running a Mac. Download Xcode. I believe that Python 2.3 comes bundled with these development tools. Luckily enough, this is all you really need to get started, unless you want a newer version of Python.
All you need to do is open up Terminal and type python. You're done!