lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use forward slashes as path separators in latex (issue 2209). (issue


From: Julien Rioux
Subject: Re: Use forward slashes as path separators in latex (issue 2209). (issue 5530069)
Date: Wed, 11 Jan 2012 08:56:34 -0500

On Tue, Jan 10, 2012 at 11:42 PM,  <address@hidden> wrote:
>
> http://codereview.appspot.com/5530069/diff/1/python/book_latex.py
> File python/book_latex.py (right):
>
> http://codereview.appspot.com/5530069/diff/1/python/book_latex.py#newcode274
> python/book_latex.py:274: rep['base'] = basename.replace ('\\', '/')
> hmm, isn't there anything in os.path that could handle this
> automagically for us?  I get nervous when I see explicit '/' in path
> names in python.
>
> http://codereview.appspot.com/5530069/

Here rep is a dictionary used for string replacement in the output,
and I only modify it for latex output, so I think it's pretty safe. We
could add checks for os.path.sep == '\\' and os.path.altsep == '/',
but otherwise I don't know of any os.path functions to replace path
separators.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]