Indentation lost in Dropbox and Pythonista
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?
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.comadded to the search text. This restricts search results to only the forums.)