in my other example, the resource is in the same t...
# general
i
in my other example, the resource is in the same tree as the rest of my stuff. so i can say
pkg_resources.resource_string(__name__, 'foo/blah.txt')
a
what's the contents of
foo/bar/BUILD
?
i
wow, threads, groovy
this is my first thread
a
this is the first thread i started lol
sorry, what are the contents of
foo/bar/BUILD
?
i
```
gah
Copy code
resources(
  name='deploy_yml',
  sources=('deploy.yml'),
)
a
and how are you accessing that particular resource with
pkg_resources
?
i
well, i tried a couple of things
pkg_resource.resource_string('foo.bar', 'deploy.yml') was my first guess
a
ok, i'm looking for examples of this and can'
i
i should mention that there's no
__init__.py
in
foo/bar
a
*can't find in the docs
ooo, that could be important
i
ahh
a
let me try to look through the example projects, i'm looking in the pants repo now
i
cool, i very much appreciate the help
a
just joined the pants team so still getting up to speed, don't worry if you don't have cycles to spend right now, will ask for help when people return from lunch lol
i
ah ok, no biggie, i've got 10 min before i have to go do #dadops
a
what did that
pkg_resources
line do when you tried to use it to access your file?
i
gave me a file not found
more or less
i tried a bunch of variations, some of them were 'no such module'
a
see my problem is that i'm new ish to python and i have never tried to use a python resource before
i
oh yeah, they're not fun
actually, they're not fun in any language that i know
java is similarly awful
a
that's true, i always found the necessity of specifying the class you're accessing it from super dumb in java
i
yep
a
i think this is a very simple question that an adult should be able to answer, so i'll just post in the channel again and someone should pick it up. ping me if not
i
i've always approached it like a slap fight where when i eventually land a punch and then forget it ever happened
ok, cool, thanks!
a
i'll add that to my list of witticisms about java
i
🙂
a
stu responded to you in the channel, no rush at all but let us know if that page/etc gets you moving or not