View Single Post
  #2  
Old 09-19-2014, 10:25 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can use the viz.res.getPublishedPath command to determine the EXE execution path. You can use this to create files and subfolders. Here is an example:
Code:
# Get and create recording directory
recordingPath = viz.res.getPublishedPath('recording')
if not os.path.isdir(recordingPath):
	os.makedirs(recordingPath)

# Output file to recording directory
outputPath = os.path.join(recordingPath,'output.wav')
with open(outputPath,'wb') as f:
	f.write('')

Last edited by farshizzo; 09-19-2014 at 10:27 AM.
Reply With Quote