andreasbotsikas/node — comment on commit 5d6b14f124ddceca6eb067501daee1ab9e50c895
File: tools/node-gyp line 88
By bnoordhuis:

> How exactly would I reduce the calls to os.path.join? You mean the calls inside the main subroutine (less calls->clearer code)?

Yes.

```python
def check_for_file(path, *args):
path = os.path.join(path, *args)
# etc
```

Then your calls would look like this `file_exists = check_for_file('foo', 'bar', 'baz')`

In all honesty, you don't need to go all out with `os.path.join()` - Windows and Python have no problem with forward slashes in paths.