Entries tagged with python
JPype - Bridging the worlds of Java and Python
JPype is an effort to allow python programs full access to java class libraries. This is achieved not through re-implementing Python, as Jython/JPython has done, but rather through interfacing at the native level in both Virtual Machines.
Eventually, it should be possible to replace Java with python in many, though not all, situations. JSP, Servlets, RMI servers and IDE plugins are good candidates.
(via @ianbicking)
Using ipython's debugger as pdb replacement.
Do you know how to debug your python code? I usually do the following in my code to set something like a hardcoded breakpoint:
import pdb; pdb.set_trace();
This will bring up a pdb prompt when the code execution reaches this line.
But pdb is a bit limited since it doesn't support code completion,
syntax highlighting and so on.
So here is how you make your debug prompt more fancy by using ipython's debugger.
Integrate your python test runner into vim
I've lately browsed the dotfiles repository
of Gary Bernhardt and found a wonderful gem in
his .vimrc. He has implemented some clever functions that run your testsuite
and shows you a pretty, colorful bar below your statusline to indicate if all
tests have passed or if some of them have failed.
If your tests are passing, it shows you a bright green bar to visualize that everything went well. If some test are failing your quickfix list is populated with all failing assertions and your cursor jumps to the first one.
I adapted his implementation and changed some points to make it fit for my work with django. The code can find out to which app the file you are editing belongs to and only runs tests for this particular application.
Pros and Cons about Python 3
http://lucumr.pocoo.org/2010/1/7/pros-and-cons-about-python-3
Armin Ronacher wrote a nice blog article about his concerns about Python 3. By being a native german speaker too, I really understand his thoughts about python's new unicode strings in Python 3.
Subscribe to this tag's feed.
about
Gregor Müllegger's Weblog on django, python, vim and anything else.
Feel free to contact me if you have question about my life, my work or my projects.
