WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Exe (https://forum.worldviz.com/showthread.php?t=1500)

Andrey 05-19-2008 06:51 AM

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

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?


All times are GMT -7. The time now is 04:06 AM.

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