@@ -158,8 +158,8 @@ def send_my_cookie(ui):
158158 then = now + COOKIE_LIFETIME
159159 gmt = time .gmtime (then )
160160 path = os .environ .get ('SCRIPT_NAME' , '/cgi-bin/' )
161- print "Set-Cookie: %s=%s; path=%s;" % (name , value , path ),
162- print time .strftime ("expires=%a, %d-%b-%y %X GMT" , gmt )
161+ print ( "Set-Cookie: %s=%s; path=%s;" % (name , value , path ), end = ' ' )
162+ print ( time .strftime ("expires=%a, %d-%b-%y %X GMT" , gmt ) )
163163
164164class MagicDict :
165165
@@ -273,39 +273,39 @@ def show(self, edit=1):
273273 raw = 0
274274 continue
275275 if raw :
276- print line
276+ print ( line )
277277 continue
278278 if not line .strip ():
279279 if pre :
280- print '</PRE>'
280+ print ( '</PRE>' )
281281 pre = 0
282282 else :
283- print '<P>'
283+ print ( '<P>' )
284284 else :
285285 if not line [0 ].isspace ():
286286 if pre :
287- print '</PRE>'
287+ print ( '</PRE>' )
288288 pre = 0
289289 else :
290290 if not pre :
291- print '<PRE>'
291+ print ( '<PRE>' )
292292 pre = 1
293293 if '/' in line or '@' in line :
294294 line = translate (line , pre )
295295 elif '<' in line or '&' in line :
296296 line = escape (line )
297297 if not pre and '*' in line :
298298 line = emphasize (line )
299- print line
299+ print ( line )
300300 if pre :
301- print '</PRE>'
301+ print ( '</PRE>' )
302302 pre = 0
303303 if edit :
304- print '<P>'
304+ print ( '<P>' )
305305 emit (ENTRY_FOOTER , self )
306306 if self .last_changed_date :
307307 emit (ENTRY_LOGINFO , self )
308- print '<P>'
308+ print ( '<P>' )
309309
310310class FaqDir :
311311
@@ -377,7 +377,7 @@ def __init__(self):
377377 self .dir = FaqDir ()
378378
379379 def go (self ):
380- print 'Content-type: text/html'
380+ print ( 'Content-type: text/html' )
381381 req = self .ui .req or 'home'
382382 mname = 'do_%s' % req
383383 try :
@@ -493,7 +493,7 @@ def last_changed(self, files):
493493 mtime = mtime = entry .getmtime ()
494494 if mtime > latest :
495495 latest = mtime
496- print time .strftime (LAST_CHANGED , time .localtime (latest ))
496+ print ( time .strftime (LAST_CHANGED , time .localtime (latest ) ))
497497 emit (EXPLAIN_MARKS )
498498
499499 def format_all (self , files , edit = 1 , headers = 1 ):
@@ -637,7 +637,7 @@ def rlog(self, command, entry=None):
637637 rev = line [9 :].split ()
638638 mami = revparse (rev )
639639 if not mami :
640- print line
640+ print ( line )
641641 else :
642642 emit (REVISIONLINK , entry , rev = rev , line = line )
643643 if mami [1 ] > 1 :
@@ -647,7 +647,7 @@ def rlog(self, command, entry=None):
647647 emit (DIFFLINK , entry , prev = rev , rev = headrev )
648648 else :
649649 headrev = rev
650- print
650+ print ()
651651 athead = 0
652652 else :
653653 athead = 0
@@ -656,8 +656,8 @@ def rlog(self, command, entry=None):
656656 athead = 1
657657 sys .stdout .write ('<HR>' )
658658 else :
659- print line
660- print '</PRE>'
659+ print ( line )
660+ print ( '</PRE>' )
661661
662662 def do_revision (self ):
663663 entry = self .dir .open (self .ui .file )
@@ -686,8 +686,8 @@ def do_diff(self):
686686 def shell (self , command ):
687687 output = os .popen (command ).read ()
688688 sys .stdout .write ('<PRE>' )
689- print escape (output )
690- print '</PRE>'
689+ print ( escape (output ) )
690+ print ( '</PRE>' )
691691
692692 def do_new (self ):
693693 entry = self .dir .new (section = int (self .ui .section ))
@@ -759,9 +759,9 @@ def do_review(self):
759759
760760 def cantcommit (self ):
761761 self .prologue (T_CANTCOMMIT )
762- print CANTCOMMIT_HEAD
762+ print ( CANTCOMMIT_HEAD )
763763 self .errordetail ()
764- print CANTCOMMIT_TAIL
764+ print ( CANTCOMMIT_TAIL )
765765
766766 def errordetail (self ):
767767 if PASSWORD and self .ui .password != PASSWORD :
@@ -827,7 +827,7 @@ def commit(self, entry):
827827 else :
828828 self .error (T_COMMITFAILED )
829829 emit (COMMITFAILED , sts = sts )
830- print '<PRE>%s</PRE>' % escape (output )
830+ print ( '<PRE>%s</PRE>' % escape (output ) )
831831
832832 try :
833833 os .unlink (tf .name )
0 commit comments