View Single Post
  #2  
Old 12-15-2008, 04:10 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can get the joystick position and convert it to a string and output that to the file

Code:
joy_pos = str(joy.getPosition())
# Create the output string
out = str('current position' + '\t' + joy_pos + '\n')
# Write the string to the output file
file.write(out)                                     
# Makes sure the file data is really written to the harddrive
file.flush()
Reply With Quote