Mercurial > rinkhals
diff gamelib/data.py @ 42:498e4732bc1f
Auto-convert unix / http path separators to platform appropriate ones -- we should now just be able to use slash as the path separator through-out our own code.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Mon, 31 Aug 2009 16:48:47 +0000 |
parents | e057e9483488 |
children | c0455e6c99f4 |
line wrap: on
line diff
--- a/gamelib/data.py Mon Aug 31 16:47:54 2009 +0000 +++ b/gamelib/data.py Mon Aug 31 16:48:47 2009 +0000 @@ -20,5 +20,7 @@ "mode" is passed as the second arg to open(). ''' + # convert unix path separator to platform appropriate one + filename = os.path.join(*filename.split("/")) return open(os.path.join(data_dir, filename), mode)