Python Forum
working directory if using windows path-variable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
working directory if using windows path-variable
#3
Oh dear...

Yes, you are right. It's working this way.
I added

os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), './'))

so that it works out of visual studio code... Doh

Thank you!!!
Reply


Messages In This Thread
RE: working directory if using windows path-variable - by chitarup - Nov-28-2023, 11:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Appending sys.path not working with spyder Larz60+ 2 464 Apr-11-2025, 08:50 AM
Last Post: Larz60+
  How does venv update $PATH without activating on Windows? bottomfeeder 3 729 Mar-13-2025, 01:46 PM
Last Post: DeaD_EyE
  create a default path with idle to a specific directory greybill 0 1,380 Apr-23-2023, 04:32 AM
Last Post: greybill
  [SOLVED] [Windows] Right way to prompt for directory? Winfried 4 3,175 Jan-17-2023, 09:28 PM
Last Post: markoberk
  Pynput Library not Working with Windows jacknewport 1 3,967 Mar-26-2022, 07:09 PM
Last Post: snippsat
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 3,171 Sep-09-2021, 01:25 PM
Last Post: Yoriz
  [solved] subdictionaries path as variable paul18fr 4 3,557 May-18-2021, 08:12 AM
Last Post: DeaD_EyE
  Subprocess.Popen() not working when reading file path from csv file herwin 13 24,135 May-07-2021, 03:26 PM
Last Post: herwin
  In put path and directory Led_Zeppelin 1 3,371 Apr-23-2021, 03:25 AM
Last Post: Larz60+
  Spyder stopped working in Windows 10 gammaray 3 4,308 Apr-19-2021, 05:33 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

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