Using string as file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Florian Lindner

    #1

    Using string as file

    Hello,
    I have a function from a library thast expects a file object as argument.
    How can I manage to give the function a string resp. have the text it would
    have written to file object as a string?

    Thanks,

    Florian
  • Arnaud Delobelle

    #2
    Re: Using string as file

    On Mar 5, 8:13 pm, Florian Lindner <Florian.Lind.. .@xgm.dewrote:
    Hello,
    I have a function from a library thast expects a file object as argument.
    How can I manage to give the function a string resp. have the text it would
    have written to file object as a string?
    >
    Thanks,
    >
    Florian
    See



    --
    Arnaud

    Comment

    • Paddy

      #3
      Re: Using string as file

      On Mar 5, 8:13 pm, Florian Lindner <Florian.Lind.. .@xgm.dewrote:
      Hello,
      I have a function from a library thast expects a file object as argument.
      How can I manage to give the function a string resp. have the text it would
      have written to file object as a string?
      >
      Thanks,
      >
      Florian
      You can also look at example 3 here:


      - Paddy.

      Comment

      Working...