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.
Textfield keyboard_type
-
-
-
@cvp
When i try one of the functions exec() I get a permission denied message
In fact it seems that i am not getting the right of execution. The os.getuid() function tells that i am the 501 uid
I suppose i should have root uid
What do you think -
@philippe I think that exec is not supported in Pythonista. What do you want to do?
-
@cvp
Just run a program with one of those exec() command, it’s simple …. -
-
@cvp
Yes but I would like to run a script from another script -
@philippe Terminate your first script by this code which will start your other script one second later, allowing the first script to really end its process
Of course, you have to replace my example by your own script path
from objc_util import * import os import ui def t(): path = os.path.expanduser('~/Documents/MesApps/bd.py') arg = '' I3=ObjCClass('PYK3Interpreter').sharedInterpreter() # run a script like in wrench menu (path, args, reset env yes/no) I3.runScriptAtPath_argv_resetEnvironment_(path, [arg], True) ui.delay(t,1)
-
@cvp
What a mess !!
Why can’t we use the os module ??
Why do i haven’t the rights on MY phone ?I WANT TO START A SCRIPT WITH THE SYSTEM OR EXEC COMMANDS IN CONSOLE MODE OR IN A SCRIPT OF MINE AS I CAN DO IT ON A MAC OR A PC .
If this is not possible or if I must invoke some dark unknown hidden class to do it….. I resign
Dommage
-
@philippe on a Mac or a Pc you launch directly a script, on iOS the only app you launch is Pythonista and this works as an interpreter to understand and run your script. Don't hope same features for that and you have to accept some limitations, like no exec command
Your script has to run under Pythonista thus why do you want to start it in console mode? If you don't want to edit your script (when it is ended and bug free), you can define it as a Pythonista tool and launch it from the wrench button. Or you can launch it via an icon on your iDevice via a shortcut. On iOS, there is no real command mode.
-
Why do i haven’t the rights on MY phone ?
The Apple Security Guideline for iOS devices limits the rights that apps have. This means there is less malware on these devices but that safety comes at the cost of constraining what system services are available to developers. Android offers more access but some would argue is less safe than iOS.