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).
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 generatoru'unicode'
syntax again (existed in >=Py2.7 and
IOErrors
, based on class OSError
time.perf_counter()
et al. to time durations with high subsecond precisionipaddress
,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 import
ed 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!
I have been using PyCharm community edition for years, but just today I installed elpy (which I believe is a superset of rope, jedi, and flymake) and I am very pleased. I am not sure if elpy is using rope, rope_py3k, jedi, or something else, but the refactoring support is great :D
Like most, I was unable to sudo pip install rope
due to the default python
using Python 3 (I am using ArchLinux as well), but I ran sudo pip install rope_py3k
just fine. Refactoring, syntax highlighting, auto-complete, and jumping to definitions is working very well.
Here are the install instructions and the documentation. It seems well supported. I am happy to report back and see if I can get off PyCharm and only use elpy in the future.
Whenever I have a problem with elpy, I usually just run M-x elpy-config
and it shows me what is broken. I also run M-x elpy-rpc-restart
just to be sure.
Update
It's been ~2 months and Emacs with elpy is still going great. I haven't had to touch PyCharm, and may never have to again! I think the only updates I made were a few tweaks in M-x customize-group RET elpy
. I think there was also an Arch python3 update where I needed to re-install rope_py3k
, but it was pretty easy.
Also, just to clarify, I also installed rope in my base install and virtualenvs. Python 3 is the default in Arch, but I have some virtualenvs in 2.7, so I needed to run pip install rope
in my virtualenvs and pip install rope_py3k
in the base install.
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