Context manager for working directory. Parameters: dir (str): new working directory
| 67 | |
| 68 | |
| 69 | class chdir(object): |
| 70 | """ |
| 71 | Context manager for working directory. |
| 72 | |
| 73 | Parameters: |
| 74 | dir (str): new working directory |
| 75 | """ |
| 76 | def __init__(self, dir): |
| 77 | self.dir = dir |
| 78 | |
| 79 | def __enter__(self): |
| 80 | self.old_dir = os.getcwd() |
| 81 | os.chdir(self.dir) |
| 82 | |
| 83 | def __exit__(self, *args): |
| 84 | os.chdir(self.old_dir) |
| 85 | |
| 86 | |
| 87 | class SharedNDArray(np.memmap): |
nothing calls this directly
no outgoing calls
no test coverage detected