Search code examples
emacspython-3.xropemacs

Python 3.3 in emacs (ropemacs support)


I am running arch linux and scripting in python 3.3 I want IDE like features (auto complete, syntax checker etc). I've installed rope, rope-mode and pymacs. Does ropemacs support python 3.x?

If not, suggest alternate ways (I'm ready to consider vim if I get above mentioned features).


Solution

  • The original rope library does indeed support Py3k according to its webpage

    You

    pip install rope_py3k
    

    or download it from PyPi. Currently (Jan '16), the github project page has newer versions than PyPi.

    Then you install Pymacs, from its website. The code seems to be hosted on github, too.

    Finally,

    pip install ropemacs
    

    or download again from PyPi or github.

    Particularly, Python 3.3 got released on 29-Sep-2012 after the last commit to the rope_py3k sourcecode which happened on the 25-Jun-2012 (as of 2014).

    So the major new features of Python 3.3 (compared to Python 3.2) which are (based on my personal preference) can not be supported explicitly:

    • yield from to easier delegate/forward values from one generator
    • Allow u'unicode' syntax again (existed in >=Py2.7 and
    • Exception hierarchy for IOErrors, based on class OSError
    • time.perf_counter() et al. to time durations with high subsecond precision
    • New in stdlib:
      • ipaddress,
      • lxma (compression),
      • unittest.mock,
      • venv (integrates PyPi's virtualenv)

    (For a full list check the Python 3.3 release note)

    So, while autocompletion for the new stdlib modules, the new functions, the new exception classes might not work, the biggest stumbling block might be the syntax addition to the yield statement.

    But I would suspect that rope (or any auto-completion IDE for that matter) introspects any imported module to check which functions/methods/variables are available for autocompletion. So all of the above might (and arguably should) work.

    I'd certainly give it a try. Not having the yield from detected might not be an issue at all. I'm not a user of rope myself, but got interested due to your question.

    Good luck!