Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107693
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Python path and append |
| Date | 2016-04-26 19:56 -0400 |
| Organization | IISS Elusive Unicorn |
| Message-ID | <mailman.132.1461714976.32212.python-list@python.org> (permalink) |
| References | <DUB116-W85F8F15123A15716395CA7CA630@phx.gbl> <etvvhbtlo9cev7lmo0q1jsabtjhkce3ofr@4ax.com> |
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/
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Python path and append Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-04-26 19:56 -0400
csiph-web