View Single Post
Old 03-21-2008, 03:21 PM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849
You need to prepend the publish EXE path to the filename, otherwise the file will be saved to the current directory, which is in a temp folder. Here is some code to get the full path to a file in a published EXE:
def getPublishedPath(filename):
	publishPath = viz.getOption('viz.publish.path','')
	if publishPath:
		return '/'.join([publishPath,filename])
	return filename

file = open(getPublishedPath('response.txt'), 'w')
Reply With Quote