WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   still problem with data from .exe file (https://forum.worldviz.com/showthread.php?t=2142)

Saz 07-10-2009 04:19 AM

still problem with data from .exe file
 
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.
Code:

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:
Code:

f = open( viz.res.getPublishedPath('output.txt') , 'w' )


All times are GMT -7. The time now is 06:07 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC