View Single Post
  #1  
Old 09-19-2014, 10:05 AM
mshukun mshukun is offline
Member
 
Join Date: Jan 2013
Posts: 32
EXE creating a new folder

I have a problem creating a folder after compiling the code. The code below (1) creates the 'output.wav' file in the same directory as exe file. However, I would like to create "recording" folder to store the 'output.wav' file when the folder doesn't exist. How can I achieve it?

Thank you in advance.
Makiko


------------------------------------
(1) viz.res.getPublishedPath('output.wav')


Code:
# This code doesn't work after creating exe file.
curDir = os.path.dirname(os.path.realpath(__file__))
		recfileDir = os.path.join(curDir, "recording")
		if not os.path.exists(recfileDir):
			os.makedirs(recfileDir)
Reply With Quote