The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by infotechsys]

Hello,
On page 134 the systax for the write statement is -
output = open("myfile2.txt", 'w') - then on page 135
f = open(outFile.txt", W). What is the difference in
'w' and W?
TIA.
Wayne
import-bot (20211) [Avatar] Offline
#2
Re: A Q. on systax.
[Originally posted by slbaumgartner]

> Hello,
> On page 134 the systax for the write statement is -
> output = open("myfile2.txt", 'w') - then on page 135
> f = open(outFile.txt", W). What is the difference in
> 'w' and W?
> TIA.
> Wayne

The unquoted W on p134 is a typo that will raise a NameError unless you have
defined an object of that name somewhere.