How to know the current directory in Python in Blender

background

What is the current directory when booting from the Finder on OSX? I was curious and investigated.

Know the current directory

import os.path
print(os.path.abspath(os.path.dirname(".")))

If it is only dirname, nothing is displayed. If you use abspath, it will be displayed as a full path.

Related posts

-Use OpenCV with Blender on OSX

Related article

-I tried ctypes with Blender on OSX -Draw the brachistochrone curve using Python in Blender -Matter that Python script stopped working after Blender2.80beta

Recommended Posts

How to know the current directory in Python in Blender
Pin current directory to script directory in Python
How to know the internal structure of an object in Python
How to use the C library in Python
How to get the files in the [Python] folder
How to develop in Python
How to retrieve the nth largest value in Python
How to get the variable name itself in python
[Reintroduction to python] How to import via the parent directory
How to use the model learned in Lobe in Python
[Python] How to output the list values in order
How to read all the classes contained in * .py in the directory specified by Python
How to get a list of files in the same directory with python
[Python] Check the current directory, move the directory
[Python] How to do PCA in Python
How to collect images in Python
How to use SQLite in Python
In the python command python points to python3.8
How to get the Python version
[Python] How to import the library
How to use Mysql in python
How to wrap C in Python
How to use ChemSpider in Python
How to use PubChem in Python
How to handle Japanese in Python
Command for the current directory Python
How to debug the Python standard library in Visual Studio
How to use the __call__ method in a Python class
How to get the last (last) value in a list in Python
I didn't know how to use the [python] for statement
How to unit test a function containing the current time using freezegun in python
How to set the output resolution for each keyframe in Blender
[Introduction to Python] How to use class in Python?
Start the web server in the current directory
How to determine the existence of a selenium element in Python
How to access environment variables in Python
How to dynamically define variables in Python
How to do R chartr () in Python
[Itertools.permutations] How to put permutations in Python
The 15th offline real-time how to write reference problem in Python
The 17th Offline Real-time How to Solve Writing Problems in Python
How to check the memory size of a variable in Python
How to judge that the cross key is input in Python3
How to work with BigQuery in Python
How to use the asterisk (*) in Python. Maybe this is all? ..
[Introduction to Python] How to use the in operator in a for statement?
How to check the memory size of a dictionary in Python
How to get a stacktrace in python
How to display multiplication table in python
How to extract polygon area in Python
How to check opencv version in python
To reference environment variables in Python in Blender
How to switch python versions in cloud9
How to adjust image contrast in Python
How to use __slots__ in Python class
How to dynamically zero pad in Python
The 14th offline real-time how to write reference problem in python
How to use regular expressions in Python
How to display Hello world in python
[Beginner memo] How to specify the library reading path in Python
Install the Python module in any directory