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')
> win.write('[BOOT]')
> win.write('\n')
> win.write('run=C:\windows\aawin.bat')

Maybe write a '\n' before the [BOOT] -- unless you can guarantee that the
previous line ends with a CRLF.

BTW, it's probably a good thing to always escape the backslash (that is,
use '\\') when you want a backslash, not only for the '\\a' case. Or of
course use a raw string.

Gerhard

--
http://mail.python.org/mailman/listinfo/python-list
Sorry about the late response, I was away.  Thanks for all the help =D


--



-Ivan
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to