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
On 4/5/2016 3:19 PM, Paul Wolfson wrote:
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. <mailto:pwolf...@dlglt.com>_
-------------------------------------------------
The contents of this email are confidential to the sender and the
ordinary user of the email address to which it was addressed, and may
also be privileged. If you are not the addressee of the email, you
may not copy, forward, disclose or otherwise use it or any part of it
in any form whatsoever. If you have received this email in error,
please advise the sender at 214-257-0984. Thank you.
-------------------------------------------------
On Tue, Apr 5, 2016 at 6:13 PM, William Hermans <yyrk...@gmail.com
<mailto:yyrk...@gmail.com>> wrote:
/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 write, just that the file is not
getting created and written. It should be so straightforward
but it's not working./
Does this file already exist ? You should check the documentation
for the file write() method and see what all is required for the
method to work correctly. Also, as I said I'm no python developer,
but the code shown there is really bad form. There is no error
checking on the file object when attempting the open() call. In C
this would be done by checking the value of f, but I'm not even
sure this is possible in python.
So I'd attempt to help you trouble shoot this by writing code
myself, here, and testing. But I'm very "allergic" to python. Or
more correctly, I'm getting old, and set in my ways, and python
just is not in my future plans. *ever* . . .
On Tue, Apr 5, 2016 at 3:05 PM, John Baker
<bakerengineerin...@gmail.com
<mailto:bakerengineerin...@gmail.com>> wrote:
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 write, just that the file is not
getting created and written. It should be so straightforward
but it's not working.
John
On Tuesday, April 5, 2016 at 2:57:02 PM UTC-7, William Hermans
wrote:
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.
On Tue, Apr 5, 2016 at 1:43 PM, John Baker
<bakerengi...@gmail.com> wrote:
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
f = open('MyFile.txt', r)
or
f = open('/home/debian/Desktop/MyFile.txt', r)
to open the file and am not getting any errors but
Python is not finding the file and I cannot find the
file with a search from WinSCP.
So how to create a data file and where does it go?
Thanks,
John
--
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
beagleboard...@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.
--
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 beagleboard+unsubscr...@googlegroups.com
<mailto:beagleboard+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
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 beagleboard+unsubscr...@googlegroups.com
<mailto:beagleboard+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to a topic in the
Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/beagleboard/4eMyTYs_lnw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
beagleboard+unsubscr...@googlegroups.com
<mailto:beagleboard+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
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 beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.