#!/usr/bin/python

import select

def main():
    ttys = []
    for i in xrange(1, 7):
        ttys.append(open('/dev/tty%d' % i, 'r+'))
        print >>ttys[-1], 'Press ctrl-alt-F7 to log in'

    select.select([], [], [])

if __name__ == '__main__':
    main()
