This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author madison.may
Recipients madison.may
Date 2015-06-06.16:47:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1433609267.34.0.395735074965.issue24396@psf.upfronthosting.co.za>
In-reply-to
Content
I often find myself trying to access a file relative to the module I'm working on.  When this occurs, I'll often use something like the following:

```
os.path.abspath(os.path.join(os.path.dirname(__file__), "data/resource.pkl"))
```

I have good reason to believe that I'm not the only one, as searching for other examples of this code on github returns ~20k exact matches: https://github.com/search?utf8=%E2%9C%93&q=%22os.path.abspath%28os.path.join%28os.path.dirname%28__file__%29%22+&type=Code&ref=searchresults


Low priority, but a more concise way of achieving the same result would be much appreciated.
History
Date User Action Args
2015-06-06 16:47:47madison.maysetrecipients: + madison.may
2015-06-06 16:47:47madison.maysetmessageid: <1433609267.34.0.395735074965.issue24396@psf.upfronthosting.co.za>
2015-06-06 16:47:47madison.maylinkissue24396 messages
2015-06-06 16:47:46madison.maycreate