View Single Post
  #2  
Old 03-03-2008, 09:46 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Is the input file in the same directory as the EXE? If so, you can use the viz.publish.path option to get the path to the EXE, and prepend it to the filename. Example:
Code:
filename = 'input.txt'

#Prepend publish path to filename
if int(viz.getOption('viz.publish',0)):
	filename = '/'.join([viz.getOption('viz.publish.path'),filename])

f = open(filename,'r')
Reply With Quote