Re: [beagleboard] How to write a data file to Beaglebone from Python

2016-04-05 Thread William Hermans
> > *It seems likely that I'm just doing something wrong, some simple thing > and perhaps I simply cannot read and write from Python to my text file, but > that seems crazy.* > The thought that you're doing something wrong did cross my mind, but I usually try to give a person a benefit of the doub

Re: [beagleboard] How to write a data file to Beaglebone from Python

2016-04-05 Thread John Baker
Thanks William but although I have done some C programming and have read and written files in C, I don't know how to get C running on the Beaglebone. Hopefully I haven't painted myself in a corner but my Python program is running well otherwise. I am doing some Fuzzy Logic control for a paint f

Re: [beagleboard] How to write a data file to Beaglebone from Python

2016-04-05 Thread William Hermans
Sorry I should have added this o my last post. In C you check the file descriptor "object" for -1, and if -1 you check errno, which should be a value indicating which error you're getting. Another thing you can check, even before trying something with C, is dmesg | tail, and see if any errors crop

Re: [beagleboard] How to write a data file to Beaglebone from Python

2016-04-05 Thread William Hermans
John, the only other thign I can think of which may be a possibility. Is that your eMMC might perhaps be in read only mode ? Which does not explain the no error message thing, but why don't you try to write a simple C app to do the same and see what happens ? On Tue, Apr 5, 2016 at 5:20 PM, John B

Re: [beagleboard] How to write a data file to Beaglebone from Python

2016-04-05 Thread John Baker
I made a new folder /home/baker and then changed my write open() command to f = open('/home/baker/MyFile.txt', w) and the read open command to f = open('/home/baker/MyFile.txt', w) but still am not able to create and write to the MyFile.txt. Now the getcwd() command tells me that the cwd is /ho

Re: [beagleboard] How to write a data file to Beaglebone from Python

2016-04-05 Thread John Baker
Thanks Paul. getcwd() tells me that my cwd is /home/debian/Desktop when I use f = open('MyFile.txt', w). I am using Try/Except and not getting an exception with the open() statement. Perhaps I can't write a text file to the Desktop, but it seems like it should give me an error message. John O

Re: [beagleboard] How to write a data file to Beaglebone from Python

2016-04-05 Thread Paul Wolfson
python >>> import os >>> os.getcwd() 'home/pwolfson' >>> - Paul Wolfson, Ph.D., TX LPI, #A17473 Dallas Legal Technology 3402 Oak Grove Avenue, Suite 300-A Dallas, Texas 75204-2353 *214-257-0984 (Tel)214-838-7220 (Fax)Send me an email. * --

Re: [beagleboard] How to write a data file to Beaglebone from Python

2016-04-05 Thread William Hermans
> > *That's what I figured William. As far as I can tell, I am doing the open > and write and read like I have with C and as described in > https://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files >

Re: [beagleboard] How to write a data file to Beaglebone from Python

2016-04-05 Thread John Baker
That's what I figured William. As far as I can tell, I am doing the open and write and read like I have with C and as described in https://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files. However, I am not getting any error message when I do the open for writing and do the

Re: [beagleboard] How to write a data file to Beaglebone from Python

2016-04-05 Thread William Hermans
I'm not a python developer, but actually have done this many times in C. So I can tell you this with certainty. This is done no different than it is done on any Linux system. The point here is that you should go out and find any good python tutorial, that covers writing to a file, and follow it.

[beagleboard] How to write a data file to Beaglebone from Python

2016-04-05 Thread John Baker
I want to store a little data on the eMMC from my Python code. My program is not getting errors when I try to write a very short data file but it doesn't actually seem to write it as I cannot read it back. I am using f = open('MyFile.txt', w) or f = open('/home/debian/Desktop/MyFile.txt', w) or