The simplest solution would be to copy and paste the code as text. The way I do it is as follows...
-
Copy/paste your Python script in rich text format or some other text format that retains formatting and save it to Dropbox.
-
Send the file to the Pages app (and allow it to convert it to Pages format if necessary).
-
In Pages, select all and copy the text.
-
In a blank script in Pythonista, paste the text. This text should run as a script.
I also find it rather stupid that Apple would block importing .py files given you can create any sort of code on your own iOS device and even, with some rigmarole, import scripts via text copy and paste. Not cool, Apple, lol.