Re: Adding a bdir() function

Adriaan de Groot <adridg-FlD2LfDziEhmR6Xm/[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
On Thursday 23 October 2003 14:54, you wrote:
> Adriaan de Groot wrote:
> I see a few problems/doubts here:
> - You explicitly use "/" instead of using os.path.join().  Python
>   purists don't like this.

"And just when I was sure that his teachings were pure
He drowned himself in the pool,
His body is gone, but back here on the lawn
His spirit continues to drool."

> - What if the current value of $BDIR is different from the build
>   directory in the file name?  An alternative would be to always remove
>   the build dir from the file name and then prepend $BDIR.

What if it is? It's just a python function, not something that needs to be 
forced upon the user. In particular, it's useful in modules. If you apply it 
just to target names, say, then when there's already a build dir in there, 
it's left alone. What's wrong with that?

> - Instead of checking for "build-" the locate_bdir() function can be
>   used.  This also takes care of ignoring case on MS-Windows.

Indeed. The locate_bdir() function seems to suffer from the same problems you 
mention wrt. "build-me" - special directory names can break it.



-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.