omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Append to file selected with pick_document

    Pythonista
    2
    4
    2988
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • djorge
      djorge last edited by

      Hi,
      I have a little script which takes csv from input and appends its content to a csv file selected with pick_document (csv file belongs to an external source- fe file explorer pro).

      I can open the file selected with pick_document but I can't append to it. Is this a ios limitation?

      I noticed that the selected file is being read from ......tmp/com.omz-software.Pythonista3.PythonistaAction3-Inbox/transactions_201810.csv

      So, that means that the file is a copy of the file from the selected source?

      append to: /private/var/mobile/Containers/Data/PluginKitPlugin/5C643C43-8EF4-45EC-B978-04E6EE7503FC/tmp/com.omz-software.Pythonista3.PythonistaAction3-Inbox/transactions_201810.csv

      Thanks in advance
      David

      1 Reply Last reply Reply Quote 0
      • cvp
        cvp last edited by

        I think that pick_document creates a local temporary copy of the external file.
        You could append your data to the local copy and then save the appended file into its original location via open_in.

        djorge 2 Replies Last reply Reply Quote 0
        • djorge
          djorge @cvp last edited by

          @cvp
          Thanks for the tip. I will try that.

          1 Reply Last reply Reply Quote 0
          • djorge
            djorge @cvp last edited by

            @cvp it worked. Thanks

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors