Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Directory path
#1
I do have some issues regarding the directory path value.
Let's say my folder structure is like this
  • Python
    • config folder (containing several .ini files)
    • log folder (containing several .log files)
    • exe folder (containing several .exe files, these .exe files are compiled via pyinstaller)
    • Startup.exe

So the program is must be execute the Startup.exe then trigger the buttons.
Each buttons will handle different .exe files inside the exe folder.
So before I compile the Python scripts to executable files, I did declared the config and log path. For instance:
CONST_LOG_PATH = '..\log\common.log'
CONST_CONFIG_PATH = '..\config\common.config'
So based on this paths value, if I execute the .exe itself (inside exe folder), it will point to the correct as I declared.
But if I execute them via Startup.exe, it will point to the path before Startup.exe
So I modify those 2 paths to without ..\ and it work as expected.

So I wondering the path values should be declare where you are trigger from?

Thanks
Reply


Messages In This Thread
Directory path - by gahhon - Mar-01-2019, 02:49 PM
RE: Directory path - by gahhon - Mar-03-2019, 03:14 PM
RE: Directory path - by snippsat - Mar-03-2019, 03:49 PM
RE: Directory path - by DeaD_EyE - Mar-03-2019, 11:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  working directory if using windows path-variable chitarup 2 1,500 Nov-28-2023, 11:36 PM
Last Post: chitarup
  create a default path with idle to a specific directory greybill 0 1,399 Apr-23-2023, 04:32 AM
Last Post: greybill
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 3,194 Sep-09-2021, 01:25 PM
Last Post: Yoriz
  In put path and directory Led_Zeppelin 1 3,380 Apr-23-2021, 03:25 AM
Last Post: Larz60+
  How do I set the path to my module one directory below my python 3.7.3 program? deac33 1 2,655 Jul-30-2019, 04:13 AM
Last Post: Larz60+
  Directory path EOF Graham 8 5,967 Nov-28-2018, 10:13 PM
Last Post: Graham
  .pth file does not show up in sys.path when configuring path. arjunsingh2908 2 7,585 Jul-03-2018, 11:16 AM
Last Post: arjunsingh2908

Forum Jump:

User Panel Messages

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