[ python-Bugs-1697169 ] package.pth file name not used as described.

SourceForge.net noreply at sourceforge.net
Sat Apr 14 21:12:25 CEST 2007


Bugs item #1697169, was opened at 2007-04-09 21:58
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1697169&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
>Status: Pending
>Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: cfk (carlfk)
Assigned to: Nobody/Anonymous (nobody)
Summary: package.pth file name not used as described. 

Initial Comment:
"...whose name has the form package.pth" http://www.python.org/doc/lib/module-site.html 

as far as I can tell, that is incorrect.  the .pth file can be named anything - only the name of the dir listed in it is used as a package/module name.

It is implemented in site.py : 

def addpackage(sitedir, name, known_paths):

    fullname = os.path.join(sitedir, name)

        f = open(fullname, "rU")

        for line in f:

            dir, dircase = makepath(sitedir, line)
            if not dircase in known_paths and os.path.exists(dir):
                sys.path.append(dir)


Notice name is not added to sys.path.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2007-04-14 21:12

Message:
Logged In: YES 
user_id=21627
Originator: NO

I fail to see the problem. "package" is deliberately type-set in italics
to indicate that the name of the pth is a placeholder. Nowhere it says that
it must be the string "package", or a specific string.

Tentatively closing as won't fix.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1697169&group_id=5470


More information about the Python-bugs-list mailing list