Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

change working directory python

import os
os.chdir(new_working_directory)
Comment

change directory in python script

os.chdir(os.path.dirname(__file__))
Comment

how to use path to change working directory in python

pip install path
from path import Path

# set working directory
Path("/toWhereYouWantItToBe").cd()
Comment

Python Changing Directory

>>> os.chdir('C:Python33')

>>> print(os.getcwd())
C:Python33
Comment

PREVIOUS NEXT
Code Example
Python :: how to make a def in python 
Python :: python challenges 
Python :: python tuple vs list 
Python :: python rdp server 
Python :: delete tuple from list python 
Python :: select rows from dataframe pandas 
Python :: python generator comprehension 
Python :: length of set python 
Python :: discord py fetch channel by id 
Python :: find index of values greater than python 
Python :: generate binay image python 
Python :: split datetime to date and time pandas 
Python :: check how many times a substring appears in a string 
Python :: add one row to dataframe 
Python :: copy file python 
Python :: tensorflow keras load model 
Python :: set type of column pandas 
Python :: how to convert boolean type list to integer 
Python :: pyserial read 
Python :: list of python keywords 
Python :: count different values in list python 
Python :: numpy remove columns containing nan 
Python :: python aes encryption 
Python :: python num2words installation 
Python :: read json file using python 
Python :: how to put a image in flask 
Python :: breadth first search python 
Python :: python super 
Python :: python extract zip file 
Python :: numpy randint 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =