pytty

changeset 7:cb48ba7a39d3

Adding baud rate property
author Chris Koepke
date Tue, 09 Nov 2010 19:01:19 -0500
parents 032585c64a9e
children 122593045b97
files src/__init__.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/src/__init__.py	Fri Nov 05 02:16:51 2010 -0400
     1.2 +++ b/src/__init__.py	Tue Nov 09 19:01:19 2010 -0500
     1.3 @@ -56,6 +56,15 @@
     1.4      # initialize self with BufferedRWPair 
     1.5      super(TTY, self).__init__(reader, writer)
     1.6  
     1.7 +  self.baud_help = 'Baud rate can be set to any value but standard settings are 9600, 56000, and 115200'
     1.8 +
     1.9 +  def get_baud(self): return self.__baud
    1.10 +
    1.11 +  def set_baud(self,rate): self.__baud = rate
    1.12 +
    1.13 +  def del_baud(self): del self.__baud
    1.14 +
    1.15 +  self.baud = property(self.get_baud,self.set_baud,self.del_baud,self.baud_help)
    1.16  
    1.17  # Clean up package namespace
    1.18  del(io)