Prepends a new entry to a PATH-style environment variable, creating it if it doesn't exist already.
(self, key, entry)
| 220 | return dict(self) |
| 221 | |
| 222 | def prepend_to(self, key, entry): |
| 223 | """Prepends a new entry to a PATH-style environment variable, creating |
| 224 | it if it doesn't exist already. |
| 225 | """ |
| 226 | try: |
| 227 | tail = os.path.pathsep + self[key] |
| 228 | except KeyError: |
| 229 | tail = "" |
| 230 | self[key] = entry + tail |
| 231 | |
| 232 | class DebugOptions(MutableSet): |
| 233 | """Wraps config["debugOptions"], automatically creating and destroying it as |
no outgoing calls
no test coverage detected