I'm sorry to see it looks like there was no response to your question! I'm actually trying to do the very same thing (but not with cloud9, I'm ssh-ing into the beaglebone black through a putty terminal window). But I am trying to create and manipulate a text document *in my PC *with beaglebone, did you ever find a way to do this? Thanks for reading!
Evan On Thursday, March 31, 2016 at 10:57:44 AM UTC-7, [email protected] wrote: > > 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/f1286ce4-f723-403f-9689-ba032b65a6b7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
