I am using an execute dat with the following code:
import datetime
import os
def onStart():
# make sure the directory for logging exists once this is final
log_dat = op('logging')
# final version add folder and take from top level parm
log_file_start = '{0}'.format(datetime.datetime.now().strftime("%Y_%m_%d__%H_%M_%S"))
log_file_name = "'{0}.'+str(me.par.n)+'.dat'".format(log_file_start)
print(' - logging - setting log file to: {0}'.format(log_file_name))
# set the log file name
log_dat.par.file.expr = log_file_name
# engage!
log_dat.par.write = 1
print(' - logging is now active....')
Works great with full touchdesigner, but with player it always seems to log in the main project folder no matter what I do - even if I hardcode some other subfolder - is this expected behaviour?