omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    3
    18
    417
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • cvp
      cvp @philippe last edited by

      @philippe said

      Do you know how to be root anyway?

      What do you mean?

      P 1 Reply Last reply Reply Quote 0
      • P
        philippe @cvp last edited by

        @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

        cvp 1 Reply Last reply Reply Quote 0
        • cvp
          cvp @philippe last edited by

          @philippe I think that exec is not supported in Pythonista. What do you want to do?

          P 1 Reply Last reply Reply Quote 0
          • P
            philippe @cvp last edited by

            @cvp
            Just run a program with one of those exec() command, it’s simple ….

            cvp 1 Reply Last reply Reply Quote 0
            • cvp
              cvp @philippe last edited by cvp

              @philippe from where do you want to run a script? Normally, we edit a script and run it via the play button

              You can also read this old topic

              P 1 Reply Last reply Reply Quote 0
              • P
                philippe @cvp last edited by

                @cvp
                Yes but I would like to run a script from another script

                cvp 1 Reply Last reply Reply Quote 0
                • cvp
                  cvp @philippe last edited by cvp

                  @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)
                  
                  P 1 Reply Last reply Reply Quote 0
                  • P
                    philippe @cvp last edited by

                    @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

                    cvp ccc 2 Replies Last reply Reply Quote 0
                    • cvp
                      cvp @philippe last edited by cvp

                      @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.

                      1 Reply Last reply Reply Quote 0
                      • ccc
                        ccc @philippe last edited by

                        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.

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        Powered by NodeBB Forums | Contributors