[Tn5250py-commits] tn5250py/src/lib5250py Sessions.py,1.2,1.3
Status: Inactive
Brought to you by:
pbielen
|
From: <pb...@us...> - 2003-03-06 11:59:08
|
Update of /cvsroot/tn5250py/tn5250py/src/lib5250py
In directory sc8-pr-cvs1:/tmp/cvs-serv11738/src/lib5250py
Modified Files:
Sessions.py
Log Message:
Code cleanup
Index: Sessions.py
===================================================================
RCS file: /cvsroot/tn5250py/tn5250py/src/lib5250py/Sessions.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Sessions.py 19 Jul 2002 16:30:35 -0000 1.2
--- Sessions.py 6 Mar 2003 11:59:04 -0000 1.3
***************
*** 1,40 ****
! """
! SessionManager and Sessions objects
! Created by Nathanael Custer 2002-07-01
! """
!
! from Session import Session
!
__all__ = ["Sessions"]
!
! # Tunable parameters
! DEBUGLEVEL = 0
!
! # Telnet Port
! TELNET_PORT = 23
!
! class Sessions:
! def __init__(self):
! self.list = []
! def _addSession(self, name=''):
! session = [name, Session()]
! self.list.append(session)
! def _delSession(self, name=''):
! for x in self.list:
! if name == x[0]:
! self.list.remove(x)
! # else:
! # raise error here
! def item(self, name=''):
! for x in self.list:
! if name == x[0]:
! return x[1]
! def item_index(self, index=0):
! return self.list[index][1]
! def _list(self):
! return self.list
!
!
!
!
!
--- 1,9 ----
! """
SessionManager and Sessions objects
Created by Nathanael Custer 2002-07-01
"""
from Session import Session
__all__ = ["Sessions"]
! # Tunable parameters
DEBUGLEVEL = 0
# Telnet Port
TELNET_PORT = 23
! class Sessions:
def __init__(self):
self.list = []
! def _addSession(self, name=''):
session = [name, Session()]
self.list.append(session)
! def _delSession(self, name=''):
for x in self.list:
if name == x[0]:
self.list.remove(x)
#else:
#raise error here
! def item(self, name=''):
for x in self.list:
if name == x[0]:
return x[1]
! def item_index(self, index=0):
return self.list[index][1]
! def _list(self):
return self.list
\ No newline at end of file
|