Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #107693 > unrolled thread

Re: Python path and append

Started byDennis Lee Bieber <wlfraed@ix.netcom.com>
First post2016-04-26 19:56 -0400
Last post2016-04-26 19:56 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python path and append Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-26 19:56 -0400

#107693 — Re: Python path and append

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2016-04-26 19:56 -0400
SubjectRe: Python path and append
Message-ID<mailman.132.1461714976.32212.python-list@python.org>
On Tue, 26 Apr 2016 19:16:56 +0100, Michael <bigbadmick2000@hotmail.com>
declaimed the following:

>If you want to read an entire file, append a space and asterisk and write it to another file, this is the code you need:
>
>infile = open('win.txt', 'r')
>text = f.read()
>infile.close()
>text += " *"
>outfile = open('outfile.txt', 'w')
>outfile.write(text)
>outfile.close()
>

	If appending a " *" to the very end of the file, and as implied, it be
the same file:

fup = open("theFile.txt", "a")
fup.write(" *")
fup.close()
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web