This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xdegaye
Recipients xdegaye
Date 2012-11-16.17:32:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za>
In-reply-to
Content
Create the following tree:

    foo.py
    mypackage
        __init__.py

and get a loader for the non existent module 'mypackage.foo'.

$ mkdir tmp
$ cd tmp
$ >foo.py
$ mkdir mypackage
$ >mypackage/__init__.py
$ ./python
Python 3.4.0a0 (default:53a7c2226a2b, Nov  9 2012, 16:47:41) 
[GCC 4.3.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import importlib
>>> importlib.find_loader('mypackage').get_filename()
'./mypackage/__init__.py'
>>> importlib.find_loader('mypackage.foo').get_filename()
'./foo.py'
>>>


find_loader should return None in this case.
History
Date User Action Args
2012-11-16 17:32:11xdegayesetrecipients: + xdegaye
2012-11-16 17:32:11xdegayesetmessageid: <1353087131.58.0.826431992367.issue16489@psf.upfronthosting.co.za>
2012-11-16 17:32:11xdegayelinkissue16489 messages
2012-11-16 17:32:11xdegayecreate