Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HELP: collect path name
#1
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?
Reply
#2
show("Images/name.PNG", 100, 'title') 
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 2,203 Sep-09-2021, 01:25 PM
Last Post: Yoriz
  python tool to collect the time measurement of entire code maiya 3 2,296 Feb-12-2021, 05:39 PM
Last Post: BashBedlam
  Collect lines in a file sridhar 3 1,953 Jul-12-2020, 04:06 PM
Last Post: sridhar
  Collect real time data jeuvrey 0 2,319 Dec-10-2018, 11:05 AM
Last Post: jeuvrey
  .pth file does not show up in sys.path when configuring path. arjunsingh2908 2 5,740 Jul-03-2018, 11:16 AM
Last Post: arjunsingh2908
  Collect logs for a function in python using shell script viru 1 3,788 Aug-28-2017, 07:54 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020