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.


    Import Scripts written on Mac/PC to Pythonista?

    Pythonista
    21
    34
    53471
    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.
    • drscheme
      drscheme last edited by

      Is there any convenient way to import/move/copy a script written on a 'proper' computer into Pythonista?

      • "Open in" from Dropbox or my Samba client does not work; meanwhile I noticed a corresponding post on this site that explains that this is something Apple does not allow...
      • Furthermore, there is no import dialogue somewhere in the Pythonista app. (But I can EXPORT stuff, ...)
      • And it seems that Pythonista does not offer to import files via iTunes.

      I do not see a different option than mailing me a script and copy/paste this into Pythonista as a text. Well, that would be ridiculous...

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

        The most convenient option is to get an app like iMazing, which lets you access the documents of all apps, regardless of whether they have iTunes file sharing enabled (which Apple doesn't allow me to do). You could also use a script like this one to upload files to Pythonista from any web browser in your local WiFi.

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

          The easiest way for me is usually the Dropbox File Picker.

          Your need to do some initial setup as explained in the comments at the start of the file, but then it's easy and convenient.

          1 Reply Last reply Reply Quote 0
          • 0942v8653
            0942v8653 last edited by

            You could also try a WebDAV server like this; I find it really nice to be able to connect natively with Finder (Command+K, http://something.local:8000) and copy and paste like that. I've also used it as a way to make bigger edits on my files by connecting and opening the file with Sublime Text or emacs.

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

              Thanks a lot for your suggestions. I'll investigate all three!

              However, I would like to state that I expect that proper im- and export is a part of a professional and commercial software product.

              1 Reply Last reply Reply Quote 0
              • 0942v8653
                0942v8653 last edited by

                Unfortunately that's not possible in the App Store. Pythonista has plenty of export options but Apple wants to make it as hard as possible to import any sort of code that can be executed.

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

                  That's what I would think too. Apparently Apple doesn't. If you can't live with this, don't use Apple products. Life's a bitch.

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

                    @0942v8653: The WebDAV script is great. Problem fully solved!

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

                      You like to use a Samba client? Try this one, but be careful it isn't finished now.

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

                        I prefer to keep a dropbox folder synced for pythonista, and sync from inside pythonista... using the DropBoxSync.py script (it's the second one on the page):
                        http://www.devwithimagination.com/2014/05/11/pythonista-dropbox-sync

                        The only thing is you need to get a dropbox dev token - but it's quick and easy!

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

                          @tizzy I try to use the DropBoxSync.py script to sync all the folders, but it seems to work in two levels of folders, if I have a folder like stash->bin it only sync stash without bin folder

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

                            @omz commnented that "The most convenient option is to get an app like iMazing..."
                            Personally, I find iFunbox (http://www.i-funbox.com/) to be superior to Diskaid (former name for iMazing) and iFunbox is currently free whereas Diskaid/iMazing is payware.

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

                              I'll point out a few other options:

                              1. Use gists. Pythonista has a proper Export to Gist function, and you can export an entire folder.

                              For importing, while it is not built in, the action menu provides the next best thing.
                              gistcheck offers bidirectional gist including multiple file support. Note in particular the bookmarklet, which lets you effectively do "1-click" imports from gists that you browse to in safari, or lets you sync existing gists (pull or commit). The syncing methods probably only work for single py gists.

                              1. Use github and git. There are several methods to import from github: GitHubGet offers a bookmarklet similar to gistcheck. gitrepo offers a repo browser.
                                As for exporting, current options are the graphical gitview, and the git command found within stash or shellista. The stash version is where current development is happening.
                              1 Reply Last reply Reply Quote 0
                              • Tizzy
                                Tizzy last edited by

                                Maybe this is relevant to put here since dropboxsync was discussed here several times.

                                I tried syncing from the latest beta on a slow ass old iPad 3 and I got a strange error:

                                <block>
                                dropbox.rest.ErrorResponse: [461] u'This file is no longer available due to a takedown request under the Digital Millennium Copyright Act by Microsoft.'
                                </block>

                                <block>

                                Not in local
                                Downloading: lxml-master/doc/html/tagpython-big.png

                                Not in local
                                Downloading: lxml-master/doc/licenses/BSD.txt
                                
                                Making Directory: lxml-master/doc/licenses
                                
                                Not in local
                                Downloading: lxml-master/doc/licenses/GPL.txt
                                Traceback (most recent call last):
                                File "/var/mobile/Containers/Data/Application/D4FFCC41-C218-4673-8C39-5C98F78606B0/Documents/DropboxSync.py", line 167, in <module>
                                state.execute_delta(client)
                                File "/var/mobile/Containers/Data/Application/D4FFCC41-C218-4673-8C39-5C98F78606B0/Documents/DropboxSync.py", line 34, in execute_delta
                                self.download(client, path)
                                File "/var/mobile/Containers/Data/Application/D4FFCC41-C218-4673-8C39-5C98F78606B0/Documents/DropboxSync.py", line 62, in download
                                remote, meta = client.get_file_and_metadata(os.path.join('/',path))
                                File "/private/var/mobile/Containers/Bundle/Application/E499756B-A6C0-433A-9F21-44BBCB8641E7/Pythonista.app/pylib/site-packages/dropbox/client.py", line 415, in get_file_and_metadata
                                file_res = self.get_file(from_path, rev)
                                File "/private/var/mobile/Containers/Bundle/Application/E499756B-A6C0-433A-9F21-44BBCB8641E7/Pythonista.app/pylib/site-packages/dropbox/client.py", line 392, in get_file
                                return self.rest_client.request("GET", url, headers=headers, raw_response=True)
                                File "/private/var/mobile/Containers/Bundle/Application/E499756B-A6C0-433A-9F21-44BBCB8641E7/Pythonista.app/pylib/site-packages/dropbox/rest.py", line 253, in request
                                return cls.IMPL.request(*n, **kw)
                                File "/private/var/mobile/Containers/Bundle/Application/E499756B-A6C0-433A-9F21-44BBCB8641E7/Pythonista.app/pylib/site-packages/dropbox/rest.py", line 186, in request
                                raise ErrorResponse(r)
                                dropbox.rest.ErrorResponse: [461] u'This file is no longer available due to a takedown request under the Digital Millennium Copyright Act by Microsoft.'
                                

                                </block>

                                Any thoughts what this means? Millennium copyright Act?!

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

                                  The fatherland authorities in the USA prevent public data services from hosting copyrighted works. In this case, Microsoft has claimed that the file in question contains copyrighted works so that file has been deleted from the public data service in question (DropBox).

                                  DropboxSync should be put into a Repo because it is impossible to send in Pull Requests to fix issues like this in Gist-based code.

                                  DavidHutchison 1 Reply Last reply Reply Quote 0
                                  • JonB
                                    JonB last edited by

                                    it is hilarious that Microsoft is claiming ownership of GPL.txt! there should be a way to contact Dropbox and contest this takedown (GPL.txt is most definitely not owned by ms)

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

                                      I wrote to Dropbox. Only via feedback option in the iOS app. But I did ask them to take corrective action or provide me a link to justify the position they have taken. And to update me on the resolution. If I get one from them, I will post it here

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

                                        assuming this is your account, you should have received an email with the notification, and a link to file a counter notification

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

                                          Thanks guys. It is ironic isn't it that GPL.txt is the file...

                                          Anyway I didn't receive any emails with regards to this error. Basically I deleted all of Lxml-master folder containing that file from all devices before re syncing everything.

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

                                            I haven't received any response as yet, but I think it will take a few days if they are going to respond at all. It was my account @JonB, paid account also. I will look further, could be in one of my various spam folders.

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