Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  terminal.py

  Sprache: Python
 

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import os
import sys

import six


class NullTerminal(object):
    """Replacement for `blessed.Terminal()` that does no formatting."""

    number_of_colors = 0
    width = 0
    height = 0

    def __init__(self, stream=None, **kwargs):
        self.stream = stream or sys.__stdout__
        try:
            self.is_a_tty = os.isatty(self.stream.fileno())
        except Exception:
            self.is_a_tty = False

    class NullCallableString(six.text_type):
        """A dummy callable Unicode stolen from blessings"""

        def __new__(cls):
            new = six.text_type.__new__(cls, "")
            return new

        def __call__(self, *args):
            if len(args) != 1 or isinstance(args[0], int):
                return ""
            return args[0]

    def __getattr__(self, attr):
        return self.NullCallableString()


def Terminal(raises=False, disable_styling=False, **kwargs):
    if disable_styling:
        return NullTerminal(**kwargs)
    try:
        import blessed
    except Exception:
        if raises:
            raise
        return NullTerminal(**kwargs)
    return blessed.Terminal(**kwargs)

Messung V0.5 in Prozent
C=82 H=95 G=88

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik