Thanks for your very detailed explanation.<br><br>BTW: Because I'm not a programmer, I need a good IDE to browse around other people's code. I learn faster that way. I'm simultaneously trying Komodo and Wing, and comparing identical searches in the same python project. At the moment, I'm only interested in the "browsing" functionality, such as finding definitions, finding occurrences, and so on. Eric is vastly superior to the other two IDEs. (And Komodo would charge £150 for the "Pro" version, which is the only version that has object browsing.) <br>
<br>--------------------------------------------------------<br><br>>> On Fri, Oct 31, 2008 at 11:41 AM, Ali Gholami Rudi <<a href="mailto:aliqrudi@gmail.com">aliqrudi@gmail.com</a>> wrote:<br><br> In order to find out the return value of get_main_widget(), rope needs<br>
to know the object w holds. Here, rope cannot infer the type of w;<br> the reason might be the source code of qt.qApp.topLevelWidget() is<br> unavailable (is this a c-extension module?)<br><br><br>Yes, topLevelWidget() is in C-code, which is in SIP files. So, it looks as if the simple answer to my question is: Rope cannot find definitions if (a) there is too much dynamic behavior, or (b) if the definitions are not contained within a ".py" file. Is that true? <br>
<br>--------------------------------------------------------<br><br>I have some more questions. If you want me to split these questions into separate posts, please let me know.<br><br>--------------------------------------------------------<br>
<br>If I cannot find a definition because of behaviour that I have just discussed, it would still be useful to be able to do a "manual" query using "Find Occurrences". It seems that "Find Occurrences" only works within Python files. So I need to use an external text-search tool to find some occurrences of "get_main_widget" (see above), because this occurs in SIP files as well as PY files. <br>
<br>Maybe "Find Occurrences" could be based on a user-configurable option: "Do you want to search in non-Python files?"<br><br>--------------------------------------------------------<br><br>If I use "Find Occurrences" to search for get_main_widget, there are 11 occurrences. (This agrees with my external text-search tool.)<br>
<br>However, if I use "Find Occurrences" to search for get_main_widget from within the file where it is defined, I get the message: "No occurrences found."<br><br>--------------------------------------------------------<br>
<br>I have never succeeded in getting "Find Implementations" to work. I sometimes get the message: "Rope error: Not a method!", and sometimes: "Rope error: String out of range.", and sometimes: "Rope error: Not a resolvable Python identifier selected.", and sometimes: "Rope error: Cannot resolve the identifier." (For a specific definition, the message is always the same.)<br>
<br>Here is what I do:<br><br>Highlight the name of the method in the following example:<br><br>def get_main_widget():<br><br>So I would highlight "get_main_widget"<br><br>Then Refactoring > Query > Find Implementations<br>
<br>--------------------------------------------------------<br><br>Before using any of the Rope searches, I need to highlight text. If the file was never edited, this highlighting causes a random message to "save or discard changes" before performing the search.<br>
<br>I say "random" because the message occurs before at least 50% of the searches, but I cannot figure out in advance when the message will appear and when it will not appear.<br><br>--------------------------------------------------------<br>
<br>Best regards.<br><br>