What is the equivalent to python equivalent to using Class.getResource()
<p>In java if I want to read a file that contains resource data for my algorithms how do I do it so the path is correctly referenced.</p>

<p>Clarification
I am trying to understand how in the Python world one packages data along with code in a module.</p>

<p>For example I might be writing some code that looks at a string and tries to classify the language the text is written in. For this to work I need to have a file that contains data about language models.</p>

<p>So when my code is called I would like to load a file (or files) that is packaged along with the module. I am not clear on how I should do that in Python.</p>

<p>TIA.</p>
