On 7/19/06, Gary Johnson <[EMAIL PROTECTED]> wrote:
On 2006-07-19, John Reese <[EMAIL PROTECTED]> wrote:
> i.e.:
> from myproject.something.blar.blag import Bok
> if you put the cursor over Bok and hit gf, no dice.
I wouldn't expect that to work because Bok is not a file but an
object within the file myproject/something/blar/blag.py.
Actually, you can't actually tell that from the import line. blag
could also be a package (i.e. directory) containing a module Bok,
defined in a file called Bok.py. That's what I had in mind.
The following is an example of the kind of import line I'm talking
about, which imports a module from a package:
from xml.dom import domreg
# effectively the same as 'import xml.dom.domreg as domreg'
# but the from ... import ... form is much more common
domreg
<module 'xml.dom.domreg' from '/...'>
The clause after "from" is the directory (after includeexpr turns the
dots into slashes), and the clause after "import" is the filename
(after .py from suffixesadd is added), and I guess all I'm saying is I
think having directory name and filename be in separate words might
break assumptions in the *include-search* mechanism.
I can add the base directory plus **/ to 'path', but that's a lot
slower than just adding the base directory and configuring the
include-search mechanism to know how to join up the whole import line
to get the relative path.
Anyway, at this point I feel like I should just go off and dink around
for a while and see if I can get something to work. Thanks for your
help.