Compare commits
2 Commits
c67179cdba
...
d729d69ea3
| Author | SHA1 | Date | |
|---|---|---|---|
| d729d69ea3 | |||
| 498defc003 |
@ -16,6 +16,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import io
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -42,6 +43,15 @@ class Console():
|
|||||||
self.pluginloader = PluginLoader(self)
|
self.pluginloader = PluginLoader(self)
|
||||||
self.pluginloader.load_plugins()
|
self.pluginloader.load_plugins()
|
||||||
|
|
||||||
|
# Configure stdin and stdout newlines and encoding
|
||||||
|
# when invoked by ax25:
|
||||||
|
if not sys.stdin.isatty():
|
||||||
|
sys.stdout = io.TextIOWrapper(sys.stdout.detach(),
|
||||||
|
newline=None)
|
||||||
|
|
||||||
|
sys.stdin = io.TextIOWrapper(sys.stdin.detach(),
|
||||||
|
newline=None)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Input and output
|
# Input and output
|
||||||
#
|
#
|
||||||
@ -102,6 +112,7 @@ class Console():
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
sys.stdout.write(output + '\r\n')
|
sys.stdout.write(output + '\r\n')
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
def print_configuration(self) -> None:
|
def print_configuration(self) -> None:
|
||||||
"""Print the current running configuration.
|
"""Print the current running configuration.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user