Python : writing to a file

Ganesh Pal ganesh1pal at
Sun Jan 11 11:01:46 CET 2015

On Sun, Jan 11, 2015 at 2:17 PM, Dave Angel <davea at> wrote:
> You chopped off the output there.  It probably looked like this:
> node-1# cat test_2.txt
> Sundaynode-1#
> 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

import time
f = open ('test_a.txt','wb+')
DAY = time.strftime("%A")
Throttling-1# python

node-1# cat test_a.txt   // This didn't give any result

node-1# less test_a.txt //  I can see the text here
test_a.txt (END)


More information about the Python-list mailing list