/[anoncvs]/projects/dispense2/sql-edition/servers/VendingMachine.py


UCC Code Repository

Diff of /projects/dispense2/sql-edition/servers/VendingMachine.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by mtearle, Sun Dec 12 06:35:26 2004 UTC revision 1.15 by dagobah, Sun Dec 12 06:54:41 2004 UTC
# Line 144  class VendingMachine: Line 144  class VendingMachine:
144          def display(self, string):          def display(self, string):
145                  if len(string) > 10:                  if len(string) > 10:
146                          string = string[0:10]                          string = string[0:10]
147                    string = re.sub('(.)\.', lambda match: '.'+match.group(1), string)
148                  self.wfh.write('D'+string+'\n')                  self.wfh.write('D'+string+'\n')
149                  (code, string) = self.get_response()                  (code, string) = self.get_response()
150                  return (code == '300', code, string)                  return (code == '300', code, string)

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26