[erlang-questions] StringIO?

Bob Ippolito <>
Thu May 31 02:25:16 CEST 2012


On Wed, May 30, 2012 at 5:16 PM, Roberto Ostinelli <>wrote:

> Dear list,
>
> is there anything similar to Python's StringIO [1] in Erlang?
>
> I've a library that only accepts files as params of a function, but I have
> everything I need into a variable that holds a string(). So what I would
> need to do is write this string to a temp file, and pass that one to the
> library; I'd like to avoid doing that if possible.
>
> Thank you,
>
> r.
>
> [1] http://docs.python.org/library/stringio.html
>

It's undocumented, but there's the ram_file module:

https://github.com/erlang/otp/blob/maint/lib/kernel/src/ram_file.erl

-bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120530/aba97d77/attachment.html>


More information about the erlang-questions mailing list