WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-01-2009, 06:05 AM
Saz Saz is offline
Member
 
Join Date: Nov 2008
Posts: 36
problems with output to a text file within executable

Hi,

I'm having trouble getting my data when my program is published as an executable. When developing the code this:
Code:
#Get path to publish EXE
path = viz.getOption('Y:\backup\Vizard30\resources\road\speed_.txt','.')+'/'

#Open file in path
file = open( 'adapt' + str(subject),'w' )
worked fine - but didn't work at all when published as an executable.

Previously I've gathered data using this:
Code:
directory = 'Z:\Vizard30\Dataoutput\driving\ '
subjectd = 'speed_.txt' + str(subject)
filename = directory+subjectd
file = open(filename, 'w')
which again seems to have stopped working.

I've tried this:
Code:
def getPublishedPath(filename):
	filename = 'adapt_.txt' + str(subject)
	publishPath = viz.getOption('Y:\backup\Vizard30\resources\road\','')
	if publishPath:
		return '/'.join([publishPath,filename])
	return filename

file = open(getPublishedPath(filename), 'w')
but I get an error message with it.

Any ideas on what I should be doing?
Cheers!
Reply With Quote
 

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
Problems loading WRL file DrunkenBrit Vizard 2 01-29-2009 12:58 AM
executable file with avatars incorrectly displayed aa-chris Vizard 2 11-03-2008 10:28 AM
How to input several model files and then save one output file mspusch Vizard 1 07-15-2008 10:30 PM
Writing text files with executable adimov Vizard 1 03-21-2008 03:21 PM
text output jaclyn.bill Vizard 2 10-24-2007 06:37 AM


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


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