adamtornhill / maat-scripts

Scripts used to post-process the results from Code Maat
GNU General Public License v3.0
74 stars 30 forks source link

Add file separator agnostic support to merge_comp_freqs.py #2

Closed tallguy-hackett closed 9 years ago

tallguy-hackett commented 9 years ago

I added some calls to replace to replace back slashes \ with forward slashes / in file names that are parsed.

adamtornhill commented 9 years ago

Thanks for the pull request! While it works on Windows it will not work on Linux. The reason is that a backslash is a valid character within paths (for example to escape spaces in file paths).

I have pushed a change that uses Python's os.path.normpath, which will do the right thing. Please note that I still think generating the input data on the "right" format to start with is a better solution (that is, appending the --unix argument to cloc).