writing and reading from files
arun kumar
arunkumar0107 at gmail.com
Wed Jan 21 14:42:26 EST 2009
thanks for replying.......
i am writing the plugin in c. (but ready to change to perl if things
are easier on that)..the text is a message sent by any user to a
particular user. this text, before being displayed to this user (
hence using revceiving_im_msg signal ), is processed by a function
which is totally outside the plugin.... that is why i thought to
write the text to a temporary file which the function can read and
when it write backs to the file , the plugin can read it from the
file...........
cheers,
arun
On Wed, Jan 21, 2009 at 4:59 AM, Etan Reisner
<pidgin at unreliablesource.net> wrote:
> On Wed, Jan 21, 2009 at 02:35:45AM -0800, arun kumar wrote:
>> hi all,
>> what function to use in order to read and write to a file from
>> within a callback function (specially receiving_im_msg_cb() ) in a
>> plugin?
>
> That depends almost entirel on whether your plugin is written in C, perl,
> or tcl, what sort of data you need to be writing/reading, and whether the
> writing needs to be purely updates (like a log file) or can include
> re-writes of existing data (like a preferences file).
>
> I would also strongly suggest that reading and writing files on ever
> received message is likely to be much more work than is a good idea and
> that you should perhaps look into whether you can defer reading/writing
> until later points.
>
> -Etan
>
More information about the Devel
mailing list