Skip to content

How to use path to change working directory in Python?

pip install path
from path import Path

# set working directory
Path("/toWhereYouWantItToBe").cd()
See also  Python code snippet - How do i check if a django queryset is empty?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.