mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-08-27 18:29:23 +00:00
Putting all the code from the current master branch of TWBlue
This commit is contained in:
16
src/platform_utils/blackhole.py
Normal file
16
src/platform_utils/blackhole.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Replacement for py2exe distributed module
|
||||
# Avoids the use of the standard py2exe console.
|
||||
# Just import this file and it should go away
|
||||
|
||||
import sys
|
||||
if hasattr(sys,"frozen"): # true only if we are running as a py2exe app
|
||||
class Blackhole(object):
|
||||
def write(self,text):
|
||||
pass
|
||||
def flush(self):
|
||||
pass
|
||||
sys.stdout = Blackhole()
|
||||
sys.stderr = Blackhole()
|
||||
del Blackhole
|
||||
del sys
|
||||
|
Reference in New Issue
Block a user