WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-21-2009, 09:32 PM
mjabon mjabon is offline
Member
 
Join Date: Jul 2007
Posts: 63
getting data out of an exe

Hello. I want to publish a script as an exe and it writes to a file. I want to have axcess to the data in that file after the exe is closed (ie I want it saved in the same folder the exe is stored).

How can I do this? Right now nothing comes out of the exe.
Reply With Quote
  #2  
Old 09-22-2009, 10:58 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The documentation for Publishing as an EXE describes how to accomplish this. Specifically, you need to use the viz.res.getPublishedPath() command.
Reply With Quote
  #3  
Old 09-22-2009, 11:49 AM
mjabon mjabon is offline
Member
 
Join Date: Jul 2007
Posts: 63
Quote:
Originally Posted by farshizzo View Post
The documentation for Publishing as an EXE describes how to accomplish this. Specifically, you need to use the viz.res.getPublishedPath() command.
Right, but that just returns a string - the path of the file. It doesn't output the file.
Reply With Quote
  #4  
Old 09-22-2009, 11:53 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Of course it doesn't, it's up to you to create the file using the new path and write to it:
Code:
f = open( viz.res.getPublishedPath('output.txt') , 'w' )
f.write('bla bla bla')
f.close()
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using 5DT plug-in with the data coming through network... mcicek Vizard 1 05-18-2009 05:17 PM
writing joystick position to a data file Saz Vizard 3 12-17-2008 05:18 AM
Flagging the Data Elittdogg Vizard 5 04-11-2008 11:40 AM
data glove navigation arielasso Vizard 6 10-24-2007 02:15 PM
tracking using quaternarion data jfreeman Vizard 2 06-01-2005 08:48 AM


All times are GMT -7. The time now is 02:45 PM.


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