โ08-31-2018 06:29 AM
โ08-31-2018 10:42 AM
โ02-06-2019 02:53 AM
Being a web developer I've used this:
>>> import os >>> os.path.abspath("C:/example/cwd/mydir/myfile.txt") 'C:/example/cwd/mydir/myfile.txt'
โ09-05-2020 11:58 PM
I am working with Magento 2 extensions development company and i am a python developer since 5 years here is my answer.
Python program to explain os.getcwd() method
# importing os module
import
os
# Get the current working
# directory (CWD)
cwd
=
os.getcwd()
# Print the current working
# directory (CWD)
print
(
"Current working directory:"
)
print
(cwd)
โ12-15-2022 02:28 PM
Hi,
os.getcwd() simply prints '/databricks/driver' for me irrespective of the location of the file..
Ideally I would like to get "/dbfs/FileStore/shared_uploads/krishna@company.com/Project_Folder"
Thanks
โ09-07-2020 12:50 AM
In my opinion, it's hard to get the path of files using python os library. As a programmer who is engaged in software development for small business, I'm interested in the answer too.
โ12-15-2022 02:28 PM
Hi mate, did you get the answer?
os.getcwd() simply prints '/databricks/driver' for me irrespective of the location of the file..
Ideally I would like to get "/dbfs/FileStore/shared_uploads/krishna@company.com/Project_Folder"
Thanks
โ12-16-2022 07:50 AM
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group