TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How to learn about path configuration in Python

2 pointsby inreverseover 1 year ago
*

1 comment

siddheshgunjalover 1 year ago
Whenever setting up a path configuration in my python applications, I always use following at the beginning:<p><pre><code> import os os.path.dirname(os.path.abspath(__file__)) </code></pre> This will make sure that absolute path is taken for your file irrespective of the OS and solve the issue of file system when building multi-platform applications.