title: Handling Windows-specific exceptions in platform-independent way
body: <p>Consider the following Python exception:</p>
  
  <pre><code>  [...]
      f.extractall()
    File "C:\Python26\lib\zipfile.py", line 935, in extractall
      self.extract(zipinfo, path, pwd)
    File "C:\Python26\lib\zipfile.py", line 923, in extract
      return self._extract_member(member, path, pwd)
    File "C:\Python26\lib\zipfile.py", line 957, in _extract_member
      os.makedirs(upperdirs)
    File "C:\Python26\lib\os.py", line 157, in makedirs
      mkdir(name, mode)
  WindowsError: [Error 267] The directory name is invalid: 'C:\\HOME\\as\
  \pypm-infinitude\\scratch\\b\\slut-0.9.0.zip.work\\slut-0.9\\aux'
  </code></pre>
  
  <p>I want to handle this particular exception - i.e., WindowsError with error number 267. However, I cannot simply do the following:</p>
  
  <pre><code>try:
      do()
  except WindowsError, e:
      ...
  </code></pre>
  
  <p>Because that would not work on Unix systems where WindowsError is not even defined in the exceptions module. </p>
  
  <p>Is there an elegant way to handle this error?</p>