[Bf-python] Text buffers updating

joeedh joeeagar at prodigy.net
Fri Apr 29 17:14:16 CEST 2005


Carlos López wrote:

> I'm writing a script which uses a text buffer as 'config file', by way 
> of it stores a list of variables, which are then imported from the 
> script. But once the buffer is created, It can't be updated: even 
> unliking it (deleting) and creating it again, the old buffer is 
> imported. Is there a problem whit this?

text.clear() clears (but doesn't unlink) the buffer.

so, you load the buffer with text.asLines() or whatever into something, 
update it, then clear it.  then just write it back with text.write().

joeedh



More information about the Bf-python mailing list