On Wed, Mar 12, 2014 at 06:34:43PM -0700, Ethan White wrote [1]:
> The bash script in #228 is now working properly, but the Python
> script is still failing. It reports errors like:
>
> Error reading ~\.swc\share\nanorc\doc\syntax\python.nanorc
>
> The obvious difference is that the nano.rc files produced by the
> bash script have `/` for paths for the includes, but the Python
> script produces includes that use `\`.
[1]: https://github.com/swcarpentry/bc/pull/357#issuecomment-
37491038
if filename.endswith('.nanorc'):
path = os.path.join(syntax_dir, filename)
rel_path = os.path.relpath(path, home)
- include_path = os.path.join('~', rel_path)
+ include_path = make_posix_path(os.path.join('~', rel_path))
f.write('include {}\n'.format(include_path))