Update of /cvsroot/freevo/freevo/helpers
In directory sc8-pr-cvs1:/tmp/cvs-serv6647

Modified Files:
        tvgrep.py 
Log Message:
Some minor changes.
    o Don't show programmes that have aired already.
    o Explicitly look for the command line paramaters required and present
        the usage information before we go through the search.

Now, will someone tell me how to prevent the import'ing of config.py from
spitting out so much debug information? I can't even disable stdout, because
it appears to lock the actually stdout file.


Index: tvgrep.py
===================================================================
RCS file: /cvsroot/freevo/freevo/helpers/tvgrep.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** tvgrep.py   14 Mar 2003 04:56:53 -0000      1.3
--- tvgrep.py   21 Mar 2003 05:28:13 -0000      1.4
***************
*** 92,96 ****
  # Ugly.
  
! if len(sys.argv) > 2:
      pattern = sys.argv[2]
      for m in sys.argv[3:]:
--- 92,96 ----
  # Ugly.
  
! if (len(sys.argv) > 2) and ((sys.argv[2] == '-listing') or (sys.argv[2] == 
'-schedule')):
      pattern = sys.argv[2]
      for m in sys.argv[3:]:
***************
*** 104,114 ****
  # Ugly too, but this works for now. 
  
  m = pickle.load(open(picklefile,'r'))
  for a in m.GetPrograms():
      for b in a.programs:
!         if REGEXP.match(b.title):
              if sys.argv[1] == '-schedule':
                  print make_schedule(b)
              elif sys.argv[1] == '-listing':
                  if b.sub_title:
                      print str(b) + ' - ' + b.sub_title
--- 104,116 ----
  # Ugly too, but this works for now. 
  
+ 
  m = pickle.load(open(picklefile,'r'))
  for a in m.GetPrograms():
      for b in a.programs:
!         if REGEXP.match(b.title) and (b.start >= int(time.time())):
              if sys.argv[1] == '-schedule':
                  print make_schedule(b)
              elif sys.argv[1] == '-listing':
+                 print b.start
                  if b.sub_title:
                      print str(b) + ' - ' + b.sub_title




-------------------------------------------------------
This SF.net email is sponsored by: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to