Open topic with navigation
<viz:res>.getPublishedPath
Returns full path of file in published EXE directory
<viz:res>.getPublishedPath( |
|
filename = '' |
) |
|
filename = ''
Filename in published EXE directoy
Remarks
This command will return the full path of the specified file by prepending the publish EXE path to the filename. If the script is not running as a published EXE, then the unmodified filename will be returned.
Return Value
File path
Example
# Log output data to same path as published EXE
filename = viz.res.getPublishedPath('output.log')
with open(filename,'w') as f:
f.write('some output')
See also