PDA

View Full Version : Exe


Andrey
05-19-2008, 06:51 AM
Hi,
The simple code to save txt file is below. It works in Vizard, but if I publish it as EXE, it does not save the file although shows ‘Saved!’ message. I use 3.00.1903 Vizard version. All depending files were added. Console window does not show errors.

Thank you,
Andrey
=================================================
import viz

fileName = viz.input('Enter saveFile name','')
output_file = open(fileName+'.txt','a')
output_file.write('record')
output_file.write('\n')
viz.message('Saved!')
output_file.close()

farshizzo
05-19-2008, 02:23 PM
The following forum post should answer your question:

http://www.worldviz.com/forum/showthread.php?t=1416

If you use the latest version of Vizard, you can use the viz.res.getPublishedPath command instead.

Andrey
05-21-2008, 01:30 PM
Thanks, it works. One more "exe" problem: I don't see vizinfo panel while running .exe

farshizzo
05-21-2008, 06:15 PM
vizinfo should work fine. Are you importing the vizinfo module when your script initializes or do you import it dynamically at runtime?

Andrey
05-23-2008, 07:13 AM
vizinfo module is imported when the script initializes.

farshizzo
05-23-2008, 06:16 PM
Does the following sample script work when you publish it as an exe:import viz
viz.go()

import vizinfo
vizinfo.add('test')If so, can you post an example script that causes vizinfo not to show up in an exe?