Code Monkey home page Code Monkey logo

Comments (6)

brinza888 avatar brinza888 commented on August 28, 2024

Same situation for me!
Found a solution by using sys.exit().

from pythonista-issues.

cclauss avatar cclauss commented on August 28, 2024

Run the code linter that is built into Pythonista. https://docs.astral.sh/ruff/rules/sys-exit-alias

from pythonista-issues.

brinza888 avatar brinza888 commented on August 28, 2024

Run the code linter that is built into Pythonista. https://docs.astral.sh/ruff/rules/sys-exit-alias

How can this help with exit() crashes?

from pythonista-issues.

cclauss avatar cclauss commented on August 28, 2024

The linter should fail when it sees exit() and tell you to use sys.exit() instead.

Can we close this issue given that we have an effective workaround?

from pythonista-issues.

imkzh avatar imkzh commented on August 28, 2024

Although sys.exit provides a workaround, the exit still crashes the app. This is quite unexpected, and may cause losing file or data.

(think of you are using PyCharm to debug a script, and an exit() call terminates the PyCharm.)

If this is by design, maybe should be better provided by package pythonista or editor

from pythonista-issues.

brinza888 avatar brinza888 commented on August 28, 2024

Even if the linter provide a warning about exit() calls, it is not so cool, to deal with unexpected crashes. And for example I am not actively using linter tool.
Will be a label assigned to this issue? Thank you in advance for fixing this!

from pythonista-issues.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.