~afb/smart/looporder

« back to all changes in this revision

Viewing changes to smart/interface.py

  • Committer: Anders F Bjorklund
  • Date: 2009-03-03 07:43:25 UTC
  • mfrom: (844.1.9 trunk)
  • Revision ID: afb@users.sourceforge.net-20090303074325-ssrae5m9ut1lvp04
merge changes from trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
    try:
148
148
        x = fcntl.ioctl(1, termios.TIOCGWINSZ, s)
149
149
    except IOError:
150
 
        return 80
151
 
    return struct.unpack('HHHH', x)[1]
 
150
        width = 80
 
151
    else:
 
152
        width = struct.unpack('HHHH', x)[1]
 
153
        if width == 0:
 
154
            width = 80
 
155
    return width
 
156
 
152
157
 
153
158
def createInterface(name, ctrl, command=None, argv=None):
154
159
    try: