Re: [Synopsis-changes] r1851 - in branches/Synopsis_0_8/Synopsis: Formatters dist/command

Stefan Seefeld <[email protected]> Fri, 18 Jan 2008 11:46:59 -0500
Newsgroups gmane.comp.documentation.synopsis
Message-ID <[email protected]>
Bernhard Fischer wrote:

>> -         if len(url): link = [url, link].join('/')
>> +         if len(url): link = '/'.join([url, link])
> 
> shouldn't this be os.path.join(url,link) or the like to be gentle to Windows?

This is string.join, not os.path.join. It takes exactly one argument (a 
sequence). And luckily, URL syntax isn't OS dependent. :-)

>> +      # Copy examples output into installation directory
>>       if os.path.isdir(os.path.join(builddir, 'html/examples')):
>> -               rmtree(os.path.join(builddir, 'html/examples'), 1)
>> -               copy_tree(os.path.join(tempdir, 'html/examples'),
>> -                         os.path.join(builddir, 'html/examples'))
>> +         rmtree(os.path.join(builddir, 'html/examples'), 1)
>> +      copy_tree(os.path.join(tempdir, 'html/examples'),
>> +                os.path.join(builddir, 'html/examples'))
> 
> os.path.join(builddir, 'html', 'examples') which would use the proper
> os.sep ?

Possible, yes. Though it seems modern versions of Windows do in fact 
accept '/' as a path separator.

Thanks,
		Stefan

-- 

       ...ich hab' noch einen Koffer in Berlin...