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.


    OS testing

    Pythonista
    4
    9
    3366
    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.
    • Bumbo Cactoni
      Bumbo Cactoni last edited by Bumbo Cactoni

      So, I have a question that actually might not be possible. I just recently remembered that the os package was a thing, so I’m trying to make it work. However, I have no clue what commands it would use on IOS. I know how to use it on the pc, but no such luck here. Please help? So far, I’ve tried things like, “nano hello.txt”, “python3 otherfilename.py”, and a couple others. Obviously, iOS doesn’t use Linux commands...

      1 Reply Last reply Reply Quote 0
      • jmv38
        jmv38 last edited by

        try in the console:

        import os
        help(os)

        you’ll get instructions

        1 Reply Last reply Reply Quote 0
        • Bumbo Cactoni
          Bumbo Cactoni last edited by Bumbo Cactoni

          I tried that, but it doesn’t list os.system() commands. I should have specified that’s what I was asking. Do you know any commands I can use in os.system()?

          mcriley821 1 Reply Last reply Reply Quote 0
          • mcriley821
            mcriley821 @Bumbo Cactoni last edited by

            @Bumbo-Cactoni iOS is based on Unix so the commands are very similar to what you’d use on Linux. Idk where you could find an actual list of commands though (try googling ‘iOS terminal commands’).

            1 Reply Last reply Reply Quote 0
            • JonB
              JonB last edited by

              os.system() is not supported on iOS.
              Nor is subprocess. Apple has a very locked down system, and there is no shell commands that are usable.

              What are you trying to actually do? Many shell commands can be accomplished in other ways. Look up https://GitHub.com/ywangd/stash

              1 Reply Last reply Reply Quote 0
              • Bumbo Cactoni
                Bumbo Cactoni last edited by

                @JonB
                I wasn't trying anything in particular. I guess I was just curious if it worked.
                Thank you!

                1 Reply Last reply Reply Quote 0
                • JonB
                  JonB last edited by

                  Install stash, which has many common shell commands that are simulated in a shell like environment.

                  Keep in mind, the console you see in pythonista is not a shell -- it is the REPL interactive python environment that you get when just typing python standalone. Stash emulatates a bash like she'll in a standalone window.

                  1 Reply Last reply Reply Quote 0
                  • Bumbo Cactoni
                    Bumbo Cactoni last edited by ccc

                    Where do I find stash?

                    Look up https://GitHub.com/ywangd/stash

                    1 Reply Last reply Reply Quote 0
                    • Bumbo Cactoni
                      Bumbo Cactoni last edited by

                      @JonB
                      Thank you!

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