Sublime Forum

Python build, hide env on error

#1

Hi,

After using ST2 for years, I’ve switched to ST3 (build 3103)
All going nice and great enhancements. I just have a small grip:

When running a python script with an error, the console nw show cmd, dir and path variables.
These don’t show when there is no error, just the usual [finished…]

Is there a way to always hide these cmd, dir, path variables ? It is of no use for me and really distract the ouput to get the line when error is in the script.

My python build is:

{
“cmd”: [“C:\Python27\python.exe”, “-u”, “$file”],
“file_regex”: “^[ ]File "(…?)”, line ([0-9]*)",
“selector”: “source.python”,
“shell”: “true”,
“encoding”: “utf8”
}

Thanks,
Kib

0 Likes

#2

You might add "quiet": true to the build file but it will hide Finished message as well. If you want fine-tuning you can edit exec.py in default package, it is the one printing these messages.

2 Likes

#3

Hi, thanks. The finished message is usefull.

I’m with build 3103 portable.
I have unzipped Default.sublime-package ad modified exec.py
So I have now …\SublimeText3\Packages\Default\exec.py
But I still have the print … even with #self.append_string(proc, self.debug_text)

0 Likes

#4

No, to override the file should be in ..\Data\Packages\Default. Here is the theory and here is the useful plugin.

1 Like

#5

Many thanks ! Works a dream :slight_smile:

0 Likes

#6

I comment all lines with “debug_text” and place there “pass”
http://joxi.ru/DrlNRN9Ivbeey2
after that cmd and path dont show even after errors
http://joxi.ru/a2XxExGs10JJ52

0 Likes