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 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. -
Isn't it good to put "gestures. py" directly into "Emoji keyboard, py"?
-
@shinya.ta said
I copied and pasted it to a new folder
Why a new folder? This gestures.py has to be in the folder of your Emojis keyboard.py or in the site-packages folder, why do you want a new folder? Please, we have already so much difficulty to find a solution, when we propose something, please do it or we will never solve your problem
-
@shinya.ta Sid
Isn't it good to put "gestures. py" directly into "Emoji keyboard, py"?
No, please. In this case, every time I will modify Emojis keyboard.py, you will have to insert gestures module. That's the reason why Python has the "import" statement
-
@shinya.ta si
Nothing special will happen.
Nothing has to happen. But the new Emojis keyboard.py will only run ok if you have a gestures module able to be imported.