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.


    Indentation lost in Dropbox and Pythonista

    Pythonista
    2
    2
    1251
    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.
    • MathCounterexam
      MathCounterexam last edited by MathCounterexam

      Hello,

      I'm using PyCharm on Windows to edit Python scripts. I store them in Dropbox. Then I try to use Pythonista on iPad, but my Python scripts have no more indentations in Dropbox and therefore when I copy them to Pythonista. What should I do?

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

        How are you copying the scripts into Pythonista? If you copy-paste the text from the website or app, it's possible that the indentation is lost (for example if the website uses HTML/CSS to display indented text, instead of real tab/space characters). Things probably work better if you import the entire file directly instead.

        Unfortunately this is not very straightforward with Pythonista. Due to Apple's app guidelines, Pythonista is not allowed to import executable code. (This restriction was relaxed around the time when iOS 11 was announced, but Pythonista hasn't been updated yet to take advantage of this.) This means Pythonista is not an "Open In..." target, however you can import non-Python files using the Pythonista share extension's "Import File" option. You can also import Python files like this, for example by changing the extension or putting them in a zip file.

        There are also a few Dropbox sync scripts for Pythonista that you can find on the forums, you could use those as well. (When searching the forums, I recommend against using the built-in search function, it's really bad. Instead you can use a regular search engine, like Google or DuckDuckGo, with site:forum.omz-software.com added to the search text. This restricts search results to only the forums.)

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