It seems the console(s) found the code after all. Although my console working directory is not currently the same as my testlib folder, the consoles auto-magically started showing the class members and functions in autocomplete etc. I did a number of trials before my first post where I'd change the working directory and it would only work if I was in the same dir as testlib. However, now it doesn't matter, it always works. I'm guessing Spyder just takes a while for this type of code inspection? Seemed like it was just doing it in the background since it started loading and doing autocomplete correctly a few hours later (I didn't check every minute so I don't know exactly when the references were found). Too bad it doesn't give you any indication of what it is doing. I spent a lot of time debugging packages and paths thinking I had done something wrong.
On Monday, 2 April 2012 12:01:04 UTC-4, lcorrigan wrote: > > I have a package named 'testlib' located outside of site-packages that > consists of a large tree that has all my work scripts - the path on my > windows machine is on the PYTHONPATH. > If I import testlib from an outside IPython or Python session, the import > takes the 2 seconds I'm used to, and the whole tree is 'seen' from the > interpreter. I.e: IPython has autocomplete for all sub-items, and python > can make all the calls etc. > > The consoles in Spyder (Python or IPython) take no time at all during this > same import, but there is nothing there at all either. The consoles in > spyder can only do the correct loading and auto-completion if I do the > import AFTER setting the console's working folder to match the dir where > testlib is located. > Oddly enough, I have the codeeditor set to include testlib in > it's ROPE_PREFS and the editor 'see's all the sub functions and scripts as > well - no dir navigation is needed. > > Any ideas of why I don't have the same inspection on the spyder consoles > unless I set the working path to match the lib? I'm not always working > from there - that is why I go to the trouble of setting PYTHONPATH on all > our PC's. > Is there an equivalent ROPE_PREFS type thing I need to change in the > spyder code for the consoles that run within it? > > On Monday, 2 April 2012 12:01:04 UTC-4, lcorrigan wrote: > > I have a package named 'testlib' located outside of site-packages that > consists of a large tree that has all my work scripts - the path on my > windows machine is on the PYTHONPATH. > If I import testlib from an outside IPython or Python session, the import > takes the 2 seconds I'm used to, and the whole tree is 'seen' from the > interpreter. I.e: IPython has autocomplete for all sub-items, and python > can make all the calls etc. > > The consoles in Spyder (Python or IPython) take no time at all during this > same import, but there is nothing there at all either. The consoles in > spyder can only do the correct loading and auto-completion if I do the > import AFTER setting the console's working folder to match the dir where > testlib is located. > Oddly enough, I have the codeeditor set to include testlib in > it's ROPE_PREFS and the editor 'see's all the sub functions and scripts as > well - no dir navigation is needed. > > Any ideas of why I don't have the same inspection on the spyder consoles > unless I set the working path to match the lib? I'm not always working > from there - that is why I go to the trouble of setting PYTHONPATH on all > our PC's. > Is there an equivalent ROPE_PREFS type thing I need to change in the > spyder code for the consoles that run within it? > > On Monday, 2 April 2012 12:01:04 UTC-4, lcorrigan wrote: > > I have a package named 'testlib' located outside of site-packages that > consists of a large tree that has all my work scripts - the path on my > windows machine is on the PYTHONPATH. > If I import testlib from an outside IPython or Python session, the import > takes the 2 seconds I'm used to, and the whole tree is 'seen' from the > interpreter. I.e: IPython has autocomplete for all sub-items, and python > can make all the calls etc. > > The consoles in Spyder (Python or IPython) take no time at all during this > same import, but there is nothing there at all either. The consoles in > spyder can only do the correct loading and auto-completion if I do the > import AFTER setting the console's working folder to match the dir where > testlib is located. > Oddly enough, I have the codeeditor set to include testlib in > it's ROPE_PREFS and the editor 'see's all the sub functions and scripts as > well - no dir navigation is needed. > > Any ideas of why I don't have the same inspection on the spyder consoles > unless I set the working path to match the lib? I'm not always working > from there - that is why I go to the trouble of setting PYTHONPATH on all > our PC's. > Is there an equivalent ROPE_PREFS type thing I need to change in the > spyder code for the consoles that run within it? > > On Monday, 2 April 2012 12:01:04 UTC-4, lcorrigan wrote: > > I have a package named 'testlib' located outside of site-packages that > consists of a large tree that has all my work scripts - the path on my > windows machine is on the PYTHONPATH. > If I import testlib from an outside IPython or Python session, the import > takes the 2 seconds I'm used to, and the whole tree is 'seen' from the > interpreter. I.e: IPython has autocomplete for all sub-items, and python > can make all the calls etc. > > The consoles in Spyder (Python or IPython) take no time at all during this > same import, but there is nothing there at all either. The consoles in > spyder can only do the correct loading and auto-completion if I do the > import AFTER setting the console's working folder to match the dir where > testlib is located. > Oddly enough, I have the codeeditor set to include testlib in > it's ROPE_PREFS and the editor 'see's all the sub functions and scripts as > well - no dir navigation is needed. > > Any ideas of why I don't have the same inspection on the spyder consoles > unless I set the working path to match the lib? I'm not always working > from there - that is why I go to the trouble of setting PYTHONPATH on all > our PC's. > Is there an equivalent ROPE_PREFS type thing I need to change in the > spyder code for the consoles that run within it? > > -- You received this message because you are subscribed to the Google Groups "spyder" group. To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/tIHbYPbTvBQJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
