Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Issue 5530069: Use forward slashes as path separators in latex (issue 2209). (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by Julien Rioux
Modified:
12 years, 3 months ago
Reviewers:
Graham Percival
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

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

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M python/book_latex.py View 2 chunks +2 lines, -2 lines 1 comment Download

Messages

Total messages: 3
Julien Rioux
Please review.
12 years, 3 months ago (2012-01-10 22:37:50 UTC) #1
Graham Percival
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 ...
12 years, 3 months ago (2012-01-11 04:42:43 UTC) #2
Julien Rioux
12 years, 3 months ago (2012-01-11 13:56:34 UTC) #3
On Tue, Jan 10, 2012 at 11:42 PM,  <graham@percival-music.ca> 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.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b