| | 146 | |
| | 147 | == Dealing with utility modules == |
| | 148 | |
| | 149 | Often you will have some utility module with lots of random code, some of which doesn't work on Python 3, or which even involves imports of non-Python-3-compatbile code (Nevow, in this case). |
| | 150 | |
| | 151 | Options: |
| | 152 | |
| | 153 | 1. Create new `util_py3.py` module, move just the things you need, have `util.py` import code from there. |
| | 154 | 2. Add conditional imports/declarations to `util.py` so it imports on Python 3 and at least some of the code can be made to work. |
| | 155 | |
| | 156 | Originally we went with first approach, but plausibly second approach is better. |