How to get file from resources

Answered

Simply put, I have an audio directory with the file main.wav. The directory is marked as a Resource Root.

I wish to know how to get files from the audio resource root just like Java has getClass().getResource("/resourceName.extension").

How would I go about doing so in python?

1
1 comment

Hi Bob,

Thank you for contacting PyCharm support.

Unfortunately, we cannot provide you such information as this is PyCharm forum, not python.
To find the answer please use such forums as https://stackoverflow.com/questions/tagged/python or https://python-forum.io

Please feel free to ask any questions related to PyCharm.

Kind regards,

Sergey

https://www.jetbrains.com

The Drive to Develop

1

Please sign in to leave a comment.