Python : writing to a file
ganesh1pal at gmail.com
Sun Jan 11 11:01:46 CET 2015
On Sun, Jan 11, 2015 at 2:17 PM, Dave Angel <davea at davea.name> wrote:
> You chopped off the output there. It probably looked like this:
> node-1# cat test_2.txt
> Your output is there, right before the prompt. Since you neglected the
> newline in your code, that's what you'd expect, wouldn't you?
> Incidentally, in most systems that prompt would mean you're running as root.
> Bad idea, especially when you're learning to program.
I didn't get the output before the prompt ,I actually didn't chop off
the output . below is the complete flow.
# cat get_day.py
f = open ('test_a.txt','wb+')
DAY = time.strftime("%A")
Throttling-1# python get_day.py
node-1# cat test_a.txt // This didn't give any result
node-1# less test_a.txt // I can see the text here
More information about the Python-list