Python Forum
HELP: collect path name - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: HELP: collect path name (/thread-26808.html)



HELP: collect path name - mart79 - May-14-2020

Hi all,

I have a project with several folders with .py files. I also have some .png files which are used by open-cv.
Currently I use the following path format, to access those .png files:


So, the folder structure will be similar to below:
  • Folder 1
    • name.png
    • name2.png
    • file.py

image = show("./name.PNG", 100, 'title') where it takes the file from Folder1.

However, now I want to move the images to a different folder within the same project. The folder is called 'Images'.
The folder becomes like below:
  • Folder 1
    • file.py
  • Images
    • name.png
    • name2.png

image = show("what do I need to put here?/name.PNG", 100, 'title') where it takes the file from Images.

How can I access this folder?


RE: HELP: collect path name - anbu23 - May-14-2020

show("Images/name.PNG", 100, 'title') 



This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.