Just a cosmetic detail.
```python
from contextlib import closing

with closing(urlopen(dir_url)) as urlpath:  # does not work as context manager itself
    string_from_url = urlpath.read()
```