Get parents directories of a file, up to a point
<p>If I have a path for a given file, say <code>'C:\Folder\OtherFolder\AnotherFolder\file.txt'</code>, is there a way in python I can get all the parent directories for file.txt up to <code>'OtherFolder'</code>? The depth of the path is not constant, so I can't just iterate back a certain number of times, but I always need to get up to <code>'OtherFolder'</code> regardless of depth. I feel like this should be easier than I'm making it, but they say Thursday is the new Monday. :)</p>
