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.
Flick button keyboard.
-
@shinya.ta said
The paste is done.
But nothing happens when you do it.The paste of what and where?
Nothing happens when you do what?
If you speak of the run of the little script: when you run, nothing visible happens, but a script is invisibly downloaded from GitHub to your Pythonista.If you go in the Pythonista console (I hope you know what it is), and you begin to type
"Import ges", do you see this
Please, explain always what you did before each question, I can't follow what you do
-
@cvp
I pasted a small script into an empty file and ran it. -
@shinya.ta hoping that you run the small script installing the gestures module, did you try to type "import ges" in the console and what's the result?
-
Where is "Pythonista console"?
I think I'm misunderstanding something. -
@shinya.ta On iPad or iPhone, swipe right to left and console appears.
At the bottom, you can type Python line -
I see ">>> import gesTraceback (most recent call last) : File" <string> ", line one, in <module> ModuleNotFoundError : No module named' ges'".
-
@shinya.ta ok, that will say that you have pressed the enter key. But without pressing the enter key, do you see
If yes, that will say that the copy of gestures.py from GitHub has been successful
-
@cvp
It will say ">>> import gestures". -
@cvp said:
@shinya.ta ok, that will say that you have pressed the enter key. But without pressing the enter key, do you see
If yes, that will say that the copy of gestures.py from GitHub has been successful
It doesn't look like this.
-
@shinya.ta please, copy this script and paste in a new empty script, then run it
import os import requests url = 'https://raw.githubusercontent.com/mikaelho/pythonista-gestures/master/gestures.py' data = requests.get(url).content dir = os.path.expanduser('~/Documents/site-packages') file_name = url.split('/')[-1] path = dir + '/' + file_name with open(path,mode='wb') as out_file: out_file.write(data)
Then retry to type "import ges" in console
-
@cvp
I entered "import ges" but the reaction is the same as before. -
Try writing this as a text file (not bytes) to the local directory instead of
site-packages
import os import requests url = 'https://raw.githubusercontent.com/mikaelho/pythonista-gestures/master/gestures.py' data = requests.get(url).text dir = os.path.expanduser('~/Documents/') file_name = url.split('/')[-1] path = dir + '/' + file_name with open(path,mode='w') as out_file: out_file.write(data)
-
@ccc said:
Try writing this as a text file (not bytes) to the local directory instead of
site-packages
import os import requests url = 'https://raw.githubusercontent.com/mikaelho/pythonista-gestures/master/gestures.py' data = requests.get(url).text dir = os.path.expanduser('~/Documents/') file_name = url.split('/')[-1] path = dir + '/' + file_name with open(path,mode='w') as out_file: out_file.write(data)
I tried it.
The last line will say "UnicodeEncodeError". -
data = requests.get(url).text # <-- text, not context?
with open(path,mode='w') as out_file: # 'w' not 'wb' ?
-
-
@shinya.ta @ccc believe me, I use my script very often and it works successfully each time, no reason to change it.
-
@shinya.ta last try in another way.
Go to https://raw.githubusercontent.com/mikaelho/pythonista-gestures/master/gestures.py,
Long press on text, then “select all”, then “copy”
Then, in Pythonista, create an empty script named gestures.py (no uppercase) in the folder where your “Emojis keyboard,py” is, and paste the copied code -
This post is deleted! -
@cvp
I copied and pasted it to a new folder.
Nothing special will happen. -
@cvp
Currently, "Emoji keyboard, py" works on iPhone but not on iPad.
Is it because of the OS version?
I've done all the tests on my iPhone.