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')
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
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
> 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