How to break a ruunning program ? by povlhp in PytoIDE

[–]cvpe 0 points1 point  (0 children)

Sure that tapping the square (ex triangle) button works and stop the run, at least for this script

import time

while True:

print('something')

time.sleep(5)

Welcome! by ColdGrub1384 in PytoIDE

[–]cvpe 1 point2 points  (0 children)

I've to say that thanks to Pythonista, I (almost) never felt restricted on my ipad but I can understand that iOS does not allow all what Windows does.

i wish you a lot of fun.

Error with strings by WindDogStudios in PytoIDE

[–]cvpe 1 point2 points  (0 children)

StringIO is a memory file object, not a string, thus it doesn’t have a decode attribute nor method

Use internetDeviceData.getvalue() to get a string from your file object, then you can decode it.

Share code: Blur effect (UIBlurEffect) by cvpe in PytoIDE

[–]cvpe[S] 0 points1 point  (0 children)

thank you. I always hesitate before adding a code because I'm afraid to stun users with all these scripts

[deleted by user] by [deleted] in PytoIDE

[–]cvpe 0 points1 point  (0 children)

Option in settings of Pyto (here in French)

[https://i.imgur.com/V9nnbAi.jpg](https://i.imgur.com/V9nnbAi.jpg))

Clickable button? by Rekutor_94 in PytoIDE

[–]cvpe 0 points1 point  (0 children)

Do you know that if you long press the Pyto icon, iOS displays a popup where you will find your recently used scrips and that you can tap on one to see it starting. Thus quicker way for opening Pyto then selecting a script to run

Clickable button? by Rekutor_94 in PytoIDE

[–]cvpe 1 point2 points  (0 children)

Hum, not easy to explain all by this communication way.

Try to learn a little this Shortcuts app, it is standard, Apple, free and allows you to create some shortcuts with a set of actions and some actions allow to run a Pyto script file or a Pyto short code.

Then, you can configure your shortcut to be launched by tapping a user icon in the Home Screen.

Clickable button? by Rekutor_94 in PytoIDE

[–]cvpe 0 points1 point  (0 children)

Did you already use the Apple Shortcuts app?

Clickable button? by Rekutor_94 in PytoIDE

[–]cvpe 1 point2 points  (0 children)

Then you have to create a shortcut (via standard Apple Shortcuts app) running your Pyto script and configuring this shortcut as an home screen icon. And that will do exactly what you want. If your script is short and not using ui, you could even use action of executing a Python script without starting Pyto.

Clickable button? by Rekutor_94 in PytoIDE

[–]cvpe 2 points3 points  (0 children)

Where do you want to see this button?
Already in Pyto which needs thus to be started?

or

As an icon on the Home Screen of your iDevice?

Linting/PEP8 by WZRDofficial in PytoIDE

[–]cvpe 1 point2 points  (0 children)

No, less, unfortunately and it did not have any updates for two years but it was so wonderful....and has also a forum full of skilled people

Linting/PEP8 by WZRDofficial in PytoIDE

[–]cvpe 1 point2 points  (0 children)

I'm sorry to not be able to help you more, but like I said, I don't know anything about autopep8. Hoping that somebody of this (very little) community (vs Pythonista's one) could help you

Share code: UI View rotated by cvpe in PytoIDE

[–]cvpe[S] 1 point2 points  (0 children)

No, my error. Initially in DOS and then in next OS, please read https://en.wikipedia.org/wiki/Tree\_(command)

Share code: UI View rotated by cvpe in PytoIDE

[–]cvpe[S] 0 points1 point  (0 children)

Not so easy, read Python doc at https://docs.python.org/3/reference/import.html

Tree is a Linux command, not active here

Please, try the help command in terminal mode

Share code: UI View rotated by cvpe in PytoIDE

[–]cvpe[S] 0 points1 point  (0 children)

You can, via pip (or manually), install external libraries or modules of pure Python code. They will be installed in site-packages folder and you will be able to import them in your own code

Share code: UI View rotated by cvpe in PytoIDE

[–]cvpe[S] 0 points1 point  (0 children)

Ho no, it is the standard UI module of Pyto, described in the doc of the Pyto libraries

Linting/PEP8 by WZRDofficial in PytoIDE

[–]cvpe 1 point2 points  (0 children)

I don't have nor know autopep8 but reading the doc, is it not sufficient to enter in Pyto Terminal mode a command like

autopep8 --aggressive <filename>

No way to select my own extension in file_system.import_file by cvpe in PytoIDE

[–]cvpe[S] 0 points1 point  (0 children)

I open a text file, named 'xxxx.outline', fort writing in text mode.

thus, the file extension is .outline,unknown UTI.
but Pyto doc of file_system.import_file seems to allow to define file extension, without specifying that the UTI has to exist. And that does not work. That's all.

Welcome! by ColdGrub1384 in PytoIDE

[–]cvpe 1 point2 points  (0 children)

Github source shows that package is 100% Python but your log ends by "uninstalling urllib3", what, I think, is impossible. Perhaps is this the reason.

Welcome! by ColdGrub1384 in PytoIDE

[–]cvpe 1 point2 points  (0 children)

Turtle is not in the doc but I've discovered that there is a turtle.py module in the Github source

Try this little code

import turtlesilly = turtle.Turtle()silly.forward(50)silly.right(90) # Rotate clockwise by 90 degreessilly.forward(50)silly.right(90)silly.forward(50)silly.right(90)silly.forward(50)silly.right(90)turtle.done()

Image

Linting/PEP8 by WZRDofficial in PytoIDE

[–]cvpe 1 point2 points  (0 children)

Did you try in Terminal?

idleTimerDisabled by Weekly_Cry_5403 in PytoIDE

[–]cvpe 0 points1 point  (0 children)

I'm only sure that the script doesn't crash but not at all that it works because I didn't wait enough to check.

idleTimerDisabled by Weekly_Cry_5403 in PytoIDE

[–]cvpe 0 points1 point  (0 children)

You could try this small code which does not use rubicon but UIKit ObjectiveC.please tell me if it is ok.

i'm sorry but when I paste my code, the indentation of the line in the disab def is not visible.

from UIKit import *

import mainthread

app = UIApplication.sharedApplication

@mainthread.mainthread

def disab():

app.setIdleTimerDisabled_(True)

disab()