M
M
Mikhail2018-02-05 12:29:36
Python
Mikhail, 2018-02-05 12:29:36

How to get the path to the script (Mac OS)?

On Windows it is os.getcwd()
But when I do this on a poppy, it transfers it to the user's main folder.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bbkmzzzz, 2018-02-12
@bbkmzzzz

os.getcwd() - returns current working directory
sys.argv[0] - path to script file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question