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.


    How to copy a source file in the Pythonista app UI?

    Pythonista
    4
    11
    3064
    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.
    • smarteepantz
      smarteepantz last edited by

      Is there a way to copy a file in the Pythonista app UI? I can see how to copy a file in the share sheet, but can't figure out how to paste the copied file back into the Pythonista project folder.

      (Note that this question is not asking how to copy a file in Python.)

      cvp stephen 3 Replies Last reply Reply Quote 0
      • cvp
        cvp @smarteepantz last edited by

        @smarteepantz instead of copy the file in the share sheet, select "run Pythonista script"

        Then select "import file" and your file will be imported in the Pythonista root

        1 Reply Last reply Reply Quote 0
        • stephen
          stephen @smarteepantz last edited by

          @smarteepantz

          @cvp is the standard means if importing. what i have been doing is i have files in my Files app and i add that file to Pythonista using External File and just saving there..

          external file

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

            @stephen I know but it could happen that the wanted file is not in Files app.
            If it is here, you can also, in Pythonista do + / import / Files

            1 Reply Last reply Reply Quote 1
            • cvp
              cvp @stephen last edited by

              @stephen and you can also, in split view, perform a drag & drop from Files to Pythonista

              1 Reply Last reply Reply Quote 1
              • 7upser
                7upser last edited by 7upser

                There is also a system wide Clipboard:
                Use Universal Clipboard to copy and paste between your Apple devices

                (doesnt help here, but i found it interest to know)

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

                  @smarteepantz you could write a script (used as a Pythonista tool for instance) to paste the file from UIPasteBoard but you should loose the file name 😢

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

                    @cvp One could compress the file into a zip for example and then save Archive file then paste and decompress inside Pythonista. not only should this preserve FileName but also alow transferring of multiple Files in one go? can set it up to run from pyKeys"

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

                      @stephen If you compress the file into a zip, that will say that you run a script, thus you don't have used "copy" action in the share sheet but "run Pythonista script", and in this case, you don't loose the name, thus you can do what you want, like "import file"

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

                        And, if you select multiple files in once, they are all passed to the share sheet and Pythonista standard script "import file" imports all of them in one shot.

                        stephen 1 Reply Last reply Reply Quote 1
                        • stephen
                          stephen @cvp last edited by

                          @cvp said:

                          And, if you select multiple files in once, they are all passed to the share sheet and Pythonista standard script "import file" imports all of them in one shot.

                          outstanding 😊 thank you

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