I have been developing a project in python for the last six months, and love the language. But I have yet to find an IDE or text editor that could provide some extra functionality for me. I currently have syntax highlighting which is one of the easiest things to get, but not much more. I am dreaming of having my IDE jump to the line in my code that caused the crash instead of reading the line number from the backtrace and manually locating it in my text editor. I have been looking for something that could do this under my development constraints, but no success. My constraints are the following:
What I have been doing up to now is to log-in to the remote machine via SSH using the excellent CyberDuck client. This enables me to open a text file residing on the remote machine inside any of my local usual text editors like TextMate or TextWrangler and have changes uploaded automatically every time the file is saved. This really gives you the felling you are editing the distant file in your usual cocoa interface.
Then to execute the python code, I open a second SSH connection, this time using a terminal into which I would type:
$ ssh user@dns
$ ipython -pylab
$ execfile("/projectdir/code.py")
Finaly, I read the backtrace and go back to my local text editor to find the correct line number. There must be a better way ! Any ideas ?
PyCharm. One of the best (and only) full-featured, dedicated IDEs for Python is PyCharm. Available in both paid (Professional) and free open-source (Community) editions, PyCharm installs quickly and easily on Windows, Mac OS X, and Linux platforms. Out of the box, PyCharm supports Python development directly.
PyCharm. In industries most professional developers use PyCharm and it has been considered the best IDE for python developers. It was developed by the Czech company JetBrains and it's a cross-platform IDE.
Thonny. Thonny is a popular python based IDE preferable for beginners that comes with excellent features to learn python programming. This IDE is ideal for learning and teaching python. It allows developers to see how their code and shell commands influence the Python variables.
You may or may not like this suggestion, but I would use vim, setting makeprg and errorformat appropriately. This way you can ssh in as you normally would, edit files directly on the remote machine, and compile/error fix using quickfix-errorlist. It will only cost you the time to set makeprg and errorformat correctly. If you do a little digging the info is out there.
EDIT
~/.vimrc settings:
"python makeprg settings setlocal makeprg=python\ % setlocal errorformat= \%A\ \ File\ \"%f\"\\\,\ line\ %l\\\,%m, \%C\ \ \ \ %.%#, \%+Z%.%#Error\:\ %.%#, \%A\ \ File\ \"%f\"\\\,\ line\ %l, \%+C\ \ %.%#, \%-C%p^, \%Z%m, \%-G%.%#
Setting makeprg tells vim that your "compiler" is python. Setting the errorformat tells vim how to parse the output of your "compiler" so you can jump to error lines. Look around on the internet, there are plenty of vimrc suggestions for programming in python. There are makeprg/errorformat settings for Xcode/Visual C++/Perl/etc as well which really makes vim a win-win situation if you program in different languages. There's also other fancy stuff like autoindent, code completion and syntax highlighting. Enjoy
Note: These settings were taken almost verbatim from here.
here is a good list of Python-Editors.
In my opinion WingIDE (there's a free version) is very feature-rich, good and easy and supports Remote-Debugging (only in the commercial version). Also Eclipse PyDev-Plugin, which is fully free, is worth looking into it and seems to support Remote-Debugging.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With