Open udybrill opened 9 years ago
I noticed this too.
Package is great so far... but as commented already few months ago it's not possible to "Cancel build" when running a long execution python script. Anyone found a fix for this?
Thanks.
Any update on this?
I've stopped using this package long time ago but adding a cancel option is just trivial, something like this would probably do:
def run(self, **kwargs):
if kwargs.get("kill", False):
return super().run(**kwargs)
Just take a look to ExecCommand to see what that kill arguments means, hope that helps.
@brupelo Thanks! I will have a look.
Solved it! :-) It's just a matter of adding "cancel": {"kill": true}
to the build file!
PR - #14
If you want to fix it in your current version:
PackageResourceViewer: Open Resource
virtualenv
-> Python + Virtualenv.sublime-build
"cancel": {"kill": true}
(don't forget to add a coma at the end of the line just above, i.e. the selector
line)@gregsadetsky Didn't work for me unfortunately. It gives an error:
__init__() got an unexpected keyword argument 'cancel'
What version of Sublime are you using? I am on v3, build 3143.
@bgromov hmm, strange...! I'm running build 3160
Would you mind trying it in that build and letting me know if that works? Thanks!
@gregsadetsky I am using unregistered version so far, so dev builds are not available for me, at least that's what the official web-site says. Build 3143 is the latest official release.
@gregsadetsky, thanks this worked perfectly for me, I also added "quiet": true
When running a python file using the virtualenv package, it is not possible to cancel the build using the 'Cancel Build' button located in
Tools
tab