I am about to embark on learning Python (largely for the purposes of using it as scripting glue between my applications).
I use Netbeans (6.8) on Linux for both my C++ and PHP development work. Ideally, I would like to use the same IDE for Python - and there is a Python plugin for Netbeans (admittedly, its still in Beta).
Does anyone have any experience using Python with Netbeans?
Shall I use Netbeans (for the reasons stated above - i.e. already familiar environment), or is there a [GOOD] reason why I should use a different IDE?
Although I've not been using it for long, I was in the same situation as yourself and just decided to bite the bullet. I haven't had any issues with it so far and found he most important thing to be that you are using an environment that you are both familiar and comfortable with. Any quirks you find along the way are probably more than made up for by the shallow learning curve given by not having to get used to an entirely new IDE.
That said however, if you are only just picking the language up I can't recommend the "official" command interface, IDLE, enough as it just let's you get into the guts of the language giving instant feedback etc.
Additionally, the following SO question has a comprehensive list of Python IDE's if you find that the Python plugin for Netbeans just doesn't work for you.
Related
I just got Pycharm Community version and Python version2. something. I just wanna know if i can have a problem with the versions. Also What is the best way to use Python for?
PyCharm: Simplifying things a bit, PyCharm is just a fancy editor. Unless you have it deeply ingrained into your workflow, you can always switch to a different editor, should PyCharm cease to fulfill your needs.
Python 2 is not the newest version of the language; that would be Python 3.6 as of now (that is, the summer of 2017). So, theoretically, if you start to write lots and lots of code and then later decide, when Python 2 is no longer maintained and third-party libraries drop their support, that all your code should now be compatible with Python 3, you may find yourself in the uncomfortable situation that you suddenly have to port all your code to Python 3, but you lack the ressources to do so. If you recently started programming in Python and have no prior investment, you might consider using Python 3 instead.
Otherwise, simply write modern Python. If you do a serious project, write unittests. Then porting to Python 3 is doable.
What is the best way to use Python for? Python is a multi-purpose language used in all kinds of contexts. It is often used in the scientific community. But it's also used a lot for web services, in education, as an embedded scripting language and many of other use cases. What are your interests? Just use Python for that.
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.
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/
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.
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!