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.
-
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.
-
@cvp
I'm sorry. I've got the wrong word.
I put it in the folder "Emoji keyboard. py". -
When I opened "Emoji keyboard. py", only a few buttons were displayed, and when I closed the application, a sentence like this appeared.
“Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/ 263EB98D-49AC-45A8-9637-2EF523D820AC/Pythonista3/Documents/custom-keyboard/Emojis Keyboard. py' line 119,
in dimensionslong_press (b, long_press_handler)
NameError: name
'long_press is not defined” -
@shinya.ta when you say folder, you mean "file"? 😭
Please, let us be serious:
- copy and paste Emojis keyboard.py in the same file name
- copy and paste gestures.py in the same file name
And both files in th same folder, like the Pythonista's root
I've just tried to install both files on my iPhone and all is like I expect ...
-
@shinya.ta said
'long_press is not defined”
That will say that you did not create a gestures.py with the right content in the same folder
-
@cvp said:
@shinya.ta Could you test this version of Emojis Keyboard.py, and tell me if the A button works as a flick button when you tap it with a long press.
Important: the modified script imports a gestures module that you have to download from https://github.com/mikaelho/pythonista-gestures/blob/master/gestures.py and to save in your site-packages folder.
Of course, this is only a test to check if I have correctly understood what you ask, thus don't hope to find here the solution.
If it is ok, you would have to give me a full description of wanted keys and their content when flicked.Only tested on iPad
Long press on A key gives
Moving finger on E key gives
I've finally made it this far.
The test is OK.
The order of the buttons is "A" in the middle, "B" on the left, "C" on the top, "D" on the right, and "E" on the bottom.
In Japanese, "A", "あ", "B", "い", "C", "う", "D", "え", "E" and "お". -
@cvp
Also, "Voice Over" doesn't work after the text is displayed. It doesn't read out the button.
"Voice Over" is important. "A" is read aloud, but the following "B, C, D, E" is not read. -
@shinya.ta said
I've finally made it this far.
Ok, we are a step more. Now, as gestures.py is installed, next steps would be easier with only several new versions of Emojis keyboard.py.
I'll display a version (at right, you will see) of the script so we will always be sure we speak about the same code.
Most important, at this stage, is to be sure I understood what flicking is for you.
-
@shinya.ta said
Also, "Voice Over" doesn't work after the text is displayed. It doesn't read out the button.
"Voice Over" is important. "A" is read aloud, but the following "B, C, D, E" is not read.First bug of my side, I'm also authorized to do some bugs, not only you (joke 😂)
-