Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

get desktop location python

os.path.join(os.environ["HOMEPATH"], "Desktop")
Comment

python get desktop directory

You can use os.environ["HOMEPATH"] to get the path. Right now it's literally trying to find %HOMEPATH%/Desktop without substituting the actual path.

Maybe something like:

shutil.copy(txtName, os.path.join(os.environ["HOMEPATH"], "Desktop"))
Comment

PREVIOUS NEXT
Code Example
Python :: python httpserver 
Python :: convert all values in array into float 
Python :: pyspark import stringtype 
Python :: close selenium webdriver python 
Python :: get parameters flask 
Python :: python tkinter fullscreen 
Python :: python read tab delimited file 
Python :: token_obtain_pair check email 
Python :: ubuntu cant find python installation 
Python :: jupyter no output cell 
Python :: getting dummies for a column in pandas dataframe 
Python :: python bisection method 
Python :: module turtle has no forward member 
Python :: python detect keypress 
Python :: scipy stats arithmetic mean 
Python :: celery flower notimplementederror 
Python :: Jun 12, 2007 hoteis othon 
Python :: how to add multiple dfs to excel sheet 
Python :: how to remove stopwords from a string in python 
Python :: max of first element in a list of tuples 
Python :: python sympy solve equation equal to 0 
Python :: double .get().get() dict python 
Python :: Filler values must be provided when X has more than 2 training features 
Python :: python timestamp shift one day 
Python :: python test if number in string 
Python :: pandas split train test 
Python :: selenium find element by link text python 
Python :: image to array keras 
Python :: pyqt5 message box 
Python :: pandas dataframe aggregations 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =