IPython IDE for Windows - python

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

Related

Code completion similar to intelliJ for python

I recently started working with Java and I really like to auto-correction / completion features in IntelliJ.
Does it exist something similar and as powerful for python?
I presume you are using JetBrains IDE so you could try out their PyCharm for python. It's from the same company so I presume that PyCharm's autocomplete features are on par with that of IntelliJ
As I never used IntelliJ, the recommendations below are based on the autocomplete features of PyCharm.
I was using tabnine on vs code and it does support many ide's however I stopped using it now since it is using too much resources on my laptop and I feel that auto complete is kind of distracting (but that is just my opinion). You could also try Github's Copilot, my friend uses it but for reasons mentioned earlier, I didn't try it. These two however, may not be the autocompletes you are looking for as they can basically write your code for you.

Is it possible to implement automatic error highlighting for Python?

Are there any IDEs for Python that support automatic error highlighting (like the Eclipse IDE for Java?) I think it would be a useful feature for a Python IDE, since it would make it easier to find syntax errors. Even if such an editor did not exist, it still might be possible to implement this by automatically running the Python script every few seconds, and then parsing the console output for error messages.
eclipse+pydev
pycharm
many others ....
If you use VIM or don't have a problem with it, try this extension. https://github.com/klen/python-mode
This is for Emacs as well: https://github.com/gabrielelanaro/emacs-for-python
Also pycharm and eclipse with pydev work fine.
If I don't use vim I really enjoy spyder. It is easy to use and has some really nice features, like integrated debugging and profiling, graphical variable explorer and object inspector. The latter shows, e.g., the integrated documentation for every function of class you use.
I built an extension to Eclipse and PyDev that does what you describe, it runs the Python code as you're typing, and displays all the variable values and any exceptions that occur. It's called Live Coding in Python, and the web site has a tutorial and a demo video.
PyDev can highlight some problems in your code by analysing it, and Live Coding in Python can show you problems that happen when you run it.

Python Code Completion

After using C# for long time I finally decided to switch to Python.
The question I am facing for the moment has to do about auto-complete.
I guess I am spoiled by C# and especially from resharper and I was expecting something similar to exist for Python.
My editor of choice is emacs and after doing some research I found autocomplete.pl, yasnippet and rope although it is not clear to me if and how they can be installed in a cygwin based system which is what I use since all the related documentation appears to be linux specific...
The version of emacs I currently use is 23.2.1 which bundles the python mode that although useful is far behind from whatever research has to offer.
My question to python users has to do about how common is autocomplete vs manual typing (using M-/ where possible) ?
I am thinking about just memorizing python build-in functions like len, append, extend etc. and revert close to a pre-autocomplete editing mode. How different such an approach is from what other pythonistas are doing?
I found this post
My Emacs Python environment
to be the most useful and comprehensive list of instructions and references on how to setup a decent Python development environment in Emacs regardless of OS platform. It is still a bit of work to setup but at least it covers the popular packages and components generally recommended for Python in Emacs that provide auto-completion functionality.
I loosely used this post as a guide to do the setup on my Windows machine with Emacs 23.2.1 and Python 2.6.5. Although, I also have Cygwin installed in some cases instead of running the *nix shell commands mentioned in the post, I just download the packages via a web browser, unzip them with 7zip, and copy them to my Emacs' plugin directory.
Also, to install Pymacs, Rope, and Ropemacs, I used Python's EasyInstall package manager. To use it, I downloaded and installed the setuptools package using the Windows install version. Once installed, at the command line, cd to their respective download locations and run the command
easy_install .
instead of the shell commands shown in the post.
Generally, I saved any *.el files in my ~\.emacs.d\plugins (e.g. in %USERPROFILE%\Application Data\.emacs.d\) and then updated my .emacs file to reference them as documented in the post.
Despite all this, on occasion, I've used DreamPie since it does have overall better auto-completion out of the box than my Emacs setup.
I'm spoiled by Intellisense too. The PyDev extensions for Eclipse offer a pretty good auto-complete substitute.
I find that PyDev + Eclipse can meet most of my needs. There is also PyCharm from the Intellij team. PyCharm has the added advantage of smooth integration with git.
I've been using PyScripter, an IDE for Windows, for a while now, and have found it very good. It has autocompletion among many other features. It's written in Delphi -- not that there's anything wrong with that -- it just bothers me a bit, though...
Take a look at Spyderlib, support most of the features including code completion
IMO, by far the easiest way to take advantage of the python tools available for emacs is to take advantage of the defaults that are all set up at:
https://github.com/gabrielelanaro/emacs-for-python
I actually took the time to get pymacs and ropemacs and python-mode all working independently before finding that little gem, and now I rely on it entirely for all my python based customizations. If you are new, I would definitely start there.

Pure Python in Xcode?

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/

New to Python. Need info on the environment for 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!

Categories

Resources