PDA

View Full Version : still problem with data from .exe file


Saz
07-10-2009, 04:19 AM
Hi

I'm still having problems with data being output from a .exe file - I read the post as recommended but it was using exactly the same code as I've tried. This is the code I'm using - it works fine in the developmental stage but once the .exe is published, it fails to produce a file.

filename = 'adapt_.txt' + str(subject)
def getPublishedPath(filename):
#filename = 'adapt_.txt' + str(subject)
publishPath = viz.getOption('Y:\backup\Vizard30\resources\road\_ .txt','')
if publishPath:
return '/'.join([publishPath,filename])
return filename

file = open(getPublishedPath(filename), 'w')


Any ideas?

farshizzo
07-10-2009, 10:12 AM
Have a look at the Publishing as an EXE page in the docs. It shows how to do exactly what you want. Here is some sample code:f = open( viz.res.getPublishedPath('output.txt') , 'w' )