Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Tuesday, April 27, 2010

Eric4: probably best IDE for Python!

Sometimes Vim|Emacs and Linux Shell (Yes I'm Linux freq) is not enough for our Python development. When You need integrated solution. When Integrated Development Environment is more productive. Today we will talk about one IDE for Python. About Eric4.

No it is not adv of Eric4. (OK it is, but I wasn't paid for it ;) )

Few Eric4 features:
  • code Highlighting
  • code autoindentation
  • class browser
  • multi and single project managment
  • integrated python shell
  • rope refactoring tool
  • integration with unnittests
  • additional plugins (eg Django support)
First install Eric4, next check if you have installed all Python packages You will likely use and install all python versions you want to use (python3!). After first start Eric will ask You for configuring it.


First time configuration of Eric4

Od Eric
I've checked only two additional options:
  • Editor -> General Convert tabs upon open
  • Editor -> Typing Auto dedent of 'def' statment
New Project:

Od Eric
Eric can handle Ruby scripts also! If You know Qt You will be pleased with Qt4 support with Eric which have templates for Qt projects and full integrations with Qt tools (Linguist, Designer, etc.).

Unittest integration:

Od Eric
Eric will even suggest right script if it starts with 'test' prefix.

Rope refactoring tool:

Od Eric
Eric have lots more features. I'll let you explore it yourself.


Saturday, April 24, 2010

Python in Python.

Every python dev sooner or later found out about other python implementations. Python (as language) have them plenty: Jython, IronPython, PyPy, to name a few. They are all very important and adds to spirit of python community. To emphasize it Guido van Rossum have proposed suspension of changes to python syntax, semantic, and build-ins. So non c implementations can catch up with recent changes (mainly emerging py3k).

Jython or IronPython are great at combing python in java or .Net but the most exciting is PyPy the idea to write python in python. 


PyPy have many advantages over CPython:
  • Speed
  • Memory usage
  • JIT compiler
  • Sandboxing
  • 'Stackless' as option
  • .Net and Java backends
  • other languages backends (Prolog, Smalltalk, JavaScript, Io, Scheme, Gamboy)
PyPy can be really faster up to 28%.
PyPy implementation of classes and objects is economic and comparing to cpython apps that eat hundreds of MBs should consume less up to 50%.
PyPy JIT compiler is responsible for speed. It allow to translate python into java, prolog, it also help in memory management.
Stackless can use micro-threads.
And there are ready to use Java and .Net back ends Prolog is almost complete and others are developed.

PyPy 1.2 is compilant with CPython 2.5. You can already use some great third-party packages like Django, Pylons, Twisted or Pyglet.

To sum up PyPy is really worth trying, promising Python implementation.