Python Forum
What for a file that prints nothing
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What for a file that prints nothing
Hi all ! I have this file that prints nothing. How to modify in order to see something ??
class _Getch:
    """Gets a single character from standard input.  Does not echo to the
    def __init__(self):
            self.impl = _GetchWindows()
        except ImportError:
            self.impl = _GetchUnix()

    def __call__(self): return self.impl()

class _GetchUnix:
    def __init__(self):
        import tty, sys

    def __call__(self):
        import sys, tty, termios
        fd = sys.stdin.fileno()
        old_settings = termios.tcgetattr(fd)
            ch =
            termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
        return ch

class _GetchWindows:
    def __init__(self):
        import msvcrt

    def __call__(self):
        import msvcrt
        return msvcrt.getch()

getch = _Getch()#origin
#char = getch.getche() # also displayed on the screen
#char = _Getch() # also displayed on the screen

Messages In This Thread
What for a file that prints nothing - by sylas - Sep-12-2018, 07:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Try/Exept prints only ones tester_V 11 989 Nov-03-2020, 02:38 AM
Last Post: tester_V
  zip file variable prints <zipfile.ZipFile object at 0x7f83fd13bd90> ? Rsh 9 1,664 Jun-27-2019, 02:00 PM
Last Post: Rsh

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020