Questions tagged [rope]

Rope is a python refactoring library that is useful for renaming or restructuring python classes / methods / variables / constants. Not to be confused with the [tag:ropes] data structure.

Rope is a python refactoring library that is useful for renaming or restructuring python classes / methods / variables / constants. Not to be confused with the data structure.

61 questions
37
votes
2 answers

Managing helper death

I had installed Pymacs, rope, ropemode, ropemacs, and when I executed pymacs-terminate-servicesby accident, I couldn't save modified buffers. It first asked me - The Pymacs helper died. Restart it? (yes or no). If I answered "yes", it threw -…
Mirzhan Irkegulov
  • 17,660
  • 12
  • 105
  • 166
30
votes
4 answers

Any pointers on using Ropevim? Is it a usable library?

Rope is a refactoring library for Python and RopeVim is a Vim plugin which calls into Rope. The idea of using RopeVim seems great to me, is there any documentation on "getting started" with RopeVim? I've followed what documentation there is:…
leonigmig
  • 2,736
  • 3
  • 25
  • 21
27
votes
5 answers

vscode "no refactorings available" for python

Ctrl + alt + R for extension python.python 2020.1.58038 always gives me a "No refactorings available" message. Probably a configuration issue but I've tried several times to uninstall/reinstall and restart vs code to no avail. Thought maybe I was…
ciaran
  • 405
  • 1
  • 4
  • 6
24
votes
6 answers

How can I use meta-dot (M-.) in python with emacs?

Is there an equivalent of slime for python? For example, if I position the cursor on foo() and do M-. (jump to definition) I would like to see the source definition of the function foo This should work regardless of whether foo is in 1) the local…
nunb
  • 339
  • 1
  • 2
  • 14
8
votes
3 answers

Vim plugin for automatically generating Python import statements (without using Rope)

I've seen similar questions asked before here and here, however they are 4 years old and did not yield answers that matched my requirements. If I type Python code into Vim, for example: os.path.join('my', 'path') resp =…
Christian Abbott
  • 6,497
  • 2
  • 21
  • 26
6
votes
2 answers

How to Refactor Module using python rope?

I have my project structure as following ├── app │   ├── Country │   │   └── views.py │   ├── Customer │   │   └── views.py Where the module 'Country' folder is what I tried to rename it to 'Countries' and every occurrence it is used, and it is…
Houy Narun
  • 1,557
  • 5
  • 37
  • 86
6
votes
1 answer

Pythonic way to catch all exceptions from a module?

I am trying to do some refactoring using rope package. Depending on the code, it might throw exceptions and there are more than 10 rope exceptions. I dont want to do from rope.base.exceptions import * try: # do something except…
Chillar Anand
  • 27,936
  • 9
  • 119
  • 136
6
votes
3 answers

Sublime Text 2. Autocomplete python `from`

I am using SublimeRope plugin. When I am typing from foo.b it displays the autocomplete dialog with random crap but what I am really looking for is to recognize bar module inside the foo package. However if I type from foo import b it immediately…
Andrii Zarubin
  • 2,165
  • 1
  • 18
  • 31
6
votes
3 answers

pymacs: General question and Installation problem

I am trying to setup emacs for python development. From what I read, it is recommended to use python-mode.el rather than the default python.el from Emacs 22.3. So I embark on the new adventure. From what I understand, python-mode has the several…
Anthony Kong
  • 37,791
  • 46
  • 172
  • 304
6
votes
2 answers

Can Rope auto-completion (RopeCodeAssist) in vim not automatically insert results?

I am using Rope for my python auto-completion in vim. However, one thing that annoys me is that it auto-inserts its suggestions, making me unable to narrow down choices by continuing to type. This means that if I see my desired completion at the…
kamek
  • 2,390
  • 2
  • 19
  • 15
5
votes
3 answers

Editing Python in Emacs

I've looked at python-mode and python.el. I'm using python-mode.el. I'm also using rope and ropemacs. I'm looking either for some documentation on these that helps me, or another elisp package or something. My current problem is that the code I'm…
Brian Postow
  • 11,709
  • 17
  • 81
  • 125
5
votes
3 answers

Clear steps to install pymacs with emacs 24?

I want autocompletion and refactoring in emacs with python. I gather that I need rope to do this. To do this with emacs, I need ropemacs. Ropmacs depends on pymacs. Pymacs is hard to install...or at least the instructions are not clear to me.…
user798719
  • 9,619
  • 25
  • 84
  • 123
5
votes
1 answer

How to make ropemacs faster in emacs?

I'm using ropemacs and company-mode for code completion in emacs. However, I oftern found ropemacs slow, for example, when I type in import os os. Then ropemacs will try to do the completion for the methods under os modular, which will make the…
Hanfei Sun
  • 45,281
  • 39
  • 129
  • 237
4
votes
2 answers

Emacs + Rope + Python produces lisp error

I'm trying to use Ropemacs with AutoComplete in Emacs but I keep getting a Debugger error: Debugger entered--Lisp error: (void-function rope-completions) (rope-completions) eval((rope-completions)) eval-last-sexp-1(nil) eval-last-sexp(nil) …
Conor
  • 1,509
  • 2
  • 20
  • 28
4
votes
1 answer

Setting up emacs with autocomplete, python-mode, and rope

I have all of the above installed. Rope seems to work just fine but I get the error below when I try to run auto-complete: Symbol's function definition is void: rope-completions I can't figure this out for the life of me. Any suggestions where to…
J Spen
  • 2,614
  • 4
  • 26
  • 41
1
2 3 4 5