The project I'm working on involves hooking sensors up to a Beagle Bone
Black (Debian, Rev C) and saving the data the sensors receive to a text
file. I've been able to get my code to execute, but the issue is how it's
executing. I'm writing and uploading code (python) to the Beaglebone using
the Cloud9 IDE (enter 192.6...etc into browser bar).
The below example snippet of code illustrates how I'm trying to do this:
import os
name = raw_input('name the file: ')
final_name = os.path.join('C:', 'Users', 'CPU', 'Desktop', name + '.txt')
#save location
data = open(name + '.txt', 'a+')
x = [i for i in range(0,50)] #basically here for testing purposes
data.write(str(x) + '\n')
data.close()
As you can see, the goal is to save the text file the Beaglebone creates* to
the desktop of the computer it is attached to*. This code does create and
save a text file, but it isn't on the desktop of my CPU. It ends up placed
in the side bar of the IDE in the same folder, and there is nothing in
sight on my CPU's desktop. The image below should help clarify what I mean:
<http://puu.sh/o0RU9/e22c08eb03.png>
Am I using the os.path.join function incorrectly? I feel like this wouldn't
even create a file if I misused that function.
Any help is appreciated.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.