title: Using absolute unix paths in windows with python
body: <p>I'm creating an application that stores blob files into the hard drive, but this script must run in both linux and windows, the issue is that i want to give it an absolute path from the filesystem root and not one relative to the project files, this because im using git and dont want to deal with excluding all these files from syncing.</p>
  
  <p>So i would like to have something like this:</p>
  
  <pre><code>path = '/var/lib/blob_files/'
  file = open(path+'myfile.blob', 'w')
  </code></pre>
  
  <p>and get a file in unix at:</p>
  
  <pre><code>/var/lib/blob_files/myfile.blob
  </code></pre>
  
  <p>and in windows at:</p>
  
  <pre><code>C:\var\lib\blob_files\myfile.blob
  </code></pre>
  
  <p>it could also be relative to the user home folder (/home/user in unix and C:/Users/User in windows) but i guess the problem is very similar.</p>
  
  <p>How can i achieve this? is there any library or function that can help me transparently to convert this paths without having to ask in what plataform is the scrip running all the time?</p>
  
  <p>Of my two options, absolute from root or relative from home folder, which one do you recomend to use?</p>
  
  <p>Thanks in advance for any advice on this</p>