ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
enlighten.common.FakeOutputHandle Class Reference

We [think we] need to build Windows installers with PyInstaller. More...

Public Member Functions

 __init__ (self, name)
 
 flush (self)
 
 reconfigure (self, *args, **kwargs)
 
 write (self, msg)
 

Public Attributes

 name = name
 

Detailed Description

We [think we] need to build Windows installers with PyInstaller.

However, since Win11 came out, PyInstaller's compiled executables tend to display a black "console window" on either Win10 or Win11, depending on which PyInstaller options you use. The only way we've found to completely hide the console window is with –noconsole.

However, some Python packages (like Tensorflow) really, really want to write directly to stdout, and raise exceptions if they can't. So this class is provided to represent a fake output filehandle which we can assign to sys.stdout or sys.stderr, even when our executing environment doesn't provide those things.

Constructor & Destructor Documentation

◆ __init__()

enlighten.common.FakeOutputHandle.__init__ ( self,
name )

Member Function Documentation

◆ flush()

enlighten.common.FakeOutputHandle.flush ( self)

◆ reconfigure()

enlighten.common.FakeOutputHandle.reconfigure ( self,
* args,
** kwargs )

◆ write()

enlighten.common.FakeOutputHandle.write ( self,
msg )

Member Data Documentation

◆ name

enlighten.common.FakeOutputHandle.name = name

The documentation for this class was generated from the following file: