Re: When writing text. . .

2006-07-24 Thread Ivan Shevanski
On 7/14/06, Gerhard Fiedler <[EMAIL PROTECTED]> wrote: On 2006-07-14 18:05:56, Ivan Shevanski wrote:> Hey I'm pretty new to python and I have a question.  I'm trying to write:> "[BOOT]> run=C:\windows\aawin.bat">> in my win.ini > So I went about it like this:>> win = open('C:\windows\win.ini', 'a')

Re: When writing text. . .

2006-07-14 Thread Gerhard Fiedler
On 2006-07-14 18:05:56, Ivan Shevanski wrote: > Hey I'm pretty new to python and I have a question. I'm trying to write: > "[BOOT] > run=C:\windows\aawin.bat" > > in my win.ini > So I went about it like this: > > win = open('C:\windows\win.ini', 'a') > win.write('[BOOT]') > win.write('\n') > wi

Re: When writing text. . .

2006-07-14 Thread barberomarcelo
Or: win.write(r'run=C:\windows\aawin.bat') The r before the string makes it a "raw" string, where \ are not interpreted as escape characters. Marcelo Daniel Nogradi ha escrito: > > Hey I'm pretty new to python and I have a question. I'm trying to write: > > "[BOOT] > > run=C:\windows\aawin.ba

Re: When writing text. . .

2006-07-14 Thread Daniel Nogradi
> Hey I'm pretty new to python and I have a question. I'm trying to write: > "[BOOT] > run=C:\windows\aawin.bat" > > in my win.ini > So I went about it like this: > > win = open('C:\windows\win.ini', 'a') > win.write('[BOOT]') > win.write('\n') > win.write('run=C:\windows\aawin.bat') > > I expecte

When writing text. . .

2006-07-14 Thread Ivan Shevanski
Hey I'm pretty new to python and I have a question.  I'm trying to write:"[BOOT]run=C:\windows\aawin.bat"in my win.iniSo I went about it like this:win = open('C:\windows\win.ini', 'a') win.write('[BOOT]')win.write('\n')win.write('run=C:\windows\aawin.bat')I expected that to work, but instead of C:\