WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-10-2009, 04:19 AM
Saz Saz is offline
Member
 
Join Date: Nov 2008
Posts: 36
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?
Reply With Quote
  #2  
Old 07-10-2009, 10:12 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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' )
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
writing joystick position to a data file Saz Vizard 3 12-17-2008 05:18 AM
Problem generating exe file Anfo Vizard 1 11-17-2008 04:21 PM
File Management Uttama_vizard Vizard 2 07-01-2008 09:44 AM
Flagging the Data Elittdogg Vizard 5 04-11-2008 11:40 AM
5DT Data Glove 5 Ultra Problem bjgold Vizard 1 08-08-2006 04:08 PM


All times are GMT -7. The time now is 11:08 AM.


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