Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

working directory python

import os
cwd = os.getcwd()
Comment

what is my python working directory

# Import the os module
import os

# Get the current working directory
cwd = os.getcwd()

# Print the current working directory
print("Current working directory: {0}".format(cwd))

# Print the type of the returned object
print("os.getcwd() returns an object of type: {0}".format(type(cwd)))
Comment

python working directory

# Import the os module
import os

# Print the current working directory
print("Current working directory: {0}".format(os.getcwd()))

# Change the current working directory
os.chdir('/tmp')

# Print the current working directory
print("Current working directory: {0}".format(os.getcwd()))
Comment

PREVIOUS NEXT
Code Example
Python :: get env variable linux python 
Python :: reset a turtle python 
Python :: python slice an array 
Python :: sort tuple list python 
Python :: solve system of linear equations numpy 
Python :: python write txt utf8 
Python :: python last element list 
Python :: copy a file from one directroy to other using python 
Python :: set jupyer color to dark 
Python :: python cartesian product 
Python :: how to input 2-d array in python 
Python :: user nextcord interactions 
Python :: is prime in python 
Python :: python get last key in dict 
Python :: discord.py cog 
Python :: python difference between consecutive element in list 
Python :: python type hint for a string 
Python :: puissance python 
Python :: python candlestick chart 
Python :: scientific notation matplotlib python 
Python :: python find closest value in list 
Python :: how to click on button using python 
Python :: convert xml to dataframe python 
Python :: python program to find factorial 
Python :: print a text in python 
Python :: scikit learn k means 
Python :: python make a list of odd numbers 
Python :: python sqlite dict 
Python :: python delete folder and contents 
Python :: im save to a bytes io python 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =