[Nym3-commit] r98 - trunk
nym3-devel@lists.noreply.org
nym3-devel@lists.noreply.org
Thu, 05 Aug 2004 22:54:26 +0200
Author: jr
Date: 2004-08-05 22:54:23 +0200 (Thu, 05 Aug 2004)
New Revision: 98
Modified:
trunk/Message.py
Log:
- add readCommandSToCList(Message.py)
Modified: trunk/Message.py
===================================================================
--- trunk/Message.py 2004-08-05 18:14:00 UTC (rev 97)
+++ trunk/Message.py 2004-08-05 20:54:23 UTC (rev 98)
@@ -107,6 +107,8 @@
except IndexError: #is it really necessary? is it not considered in the various fromStrReader ?
raise ParseError("Bad Formed Command")
def readCommandCToSList(self):
+ """Read a list of CommandSToC from string, until
+ the string is completely read"""
l=[]
while (not self.isEnd()):
l.append(self.readCommandCToS)
@@ -135,6 +137,13 @@
except IndexError: #is it really necessary? is it not considered in the various fromStrReader ?
#it should, if not consider it a bug
raise ParseError("Bad Formed Command")
+ def readCommandSToCList(self):
+ """Read a list of CommandSToC from string, until
+ the string is completely read"""
+ l=[]
+ while (not self.isEnd()):
+ l.append(self.readCommandSToC)
+ return l
def readNym(self,start,cs):
"""Read a Nym length + a nym
Raise ParseError if it takes more characters from the string that previously advertised"""
@@ -252,7 +261,7 @@
class Create(CommandCToS):
"""Create command
- self.list : list de nym (liste de str)
+ self.list : list of nym (liste de str)
self.pw : proof of work"""
def __init__(self):
"""Build a Create empty object"""