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.


    Running Python 3 scripts in StaSh

    Pythonista
    3
    5
    5281
    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.
    • esanker
      esanker last edited by

      Hi,

      Is there a way to run Python 3 scripts in StaSh? I tried using the #!python3 shebang and it did not work. Thanks.

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

        if you remove the python2 shebang from launch_stash, you can run stash using the py3 interpreter. Not all commands work in py3, but many do. this lets you run scripts in the py3 interpreter.

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

          I will try that. Thanks, JonB!

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

            remove the python2 shebang from launch_stash.py, stash could not start.
            seems that stash only supports python2.

            I got this error:

            
            Traceback (most recent call last):
              File "/private/var/mobile/.../Pythonista3/Documents/stash_extensions/launch_stash.py", line 28, in <module>
                from stash import stash
              File "/private/var/mobile/.../Pythonista3/Documents/site-packages/stash/stash.py", line 12, in <module>
                from ConfigParser import ConfigParser
            ImportError: No module named 'ConfigParser'
            
            
            1 Reply Last reply Reply Quote 0
            • JonB
              JonB last edited by

              ahh. there is a py3 branch of stash, though has not been kept up to date.

              There is also a python3 command in @bennr01's branch.
              See end of https://github.com/ywangd/stash/issues/179 for link/instuctions

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