Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32682

Modified Files:
        config.py 
Log Message:
helper function to check if an object is some sort of string

Index: config.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/config.py,v
retrieving revision 1.99
retrieving revision 1.100
diff -C2 -d -r1.99 -r1.100
*** config.py   23 Feb 2004 16:09:34 -0000      1.99
--- config.py   27 Feb 2004 20:10:02 -0000      1.100
***************
*** 23,26 ****
--- 23,29 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.100  2004/02/27 20:10:02  dischi
+ # helper function to check if an object is some sort of string
+ #
  # Revision 1.99  2004/02/23 16:09:34  dischi
  # make it possible to print unicode
***************
*** 31,35 ****
  # Revision 1.97  2004/02/19 04:57:55  gsbarbieri
  # Support Web Interface i18n.
- # To use this, I need to get the gettext() translations in unicode, so some changes 
are required to files that use "print _('string')", need to make them "print 
String(_('string'))".
  #
  # Revision 1.96  2004/02/08 19:53:14  dischi
--- 34,37 ----
***************
*** 53,71 ****
  # like "pt_BR.UTF-8"
  #
- # Revision 1.92  2004/01/17 20:30:18  dischi
- # use new metainfo
- #
- # Revision 1.91  2004/01/10 13:12:02  dischi
- # create disc and disc-set dirs in OVERLAY_DIR
- #
- # Revision 1.90  2004/01/10 04:30:32  outlyer
- # Newer versions of twisted print this message:
- # "/usr/lib/python2.3/site-packages/freevo/helpers/webserver.py:106:
- # exceptions.DeprecationWarning: twisted.internet.app is deprecated,
- # use twisted.application instead."
- #
- # Which is nice to know, but is non-trivial to implement so let's not see
- # it every time we start an app.
- #
  # -----------------------------------------------------------------------
  # Freevo - A Home Theater PC framework
--- 55,58 ----
***************
*** 113,121 ****
  
  
- # add True and False to __builtin__ for older python versions
- if float(sys.version[0:3]) < 2.3:
-     __builtin__.__dict__['True']  = 1
-     __builtin__.__dict__['False'] = 0
- 
  # temp solution until this is fixed to True and False
  # in all freevo modules
--- 100,103 ----
***************
*** 124,127 ****
--- 106,117 ----
  
  
+ # String helper function. Always use this function to detect if the
+ # object is a string or not. It checks against str and unicode
+ def __isstring__(s):
+     return isinstance(s, str) or isinstance(s, unicode)
+         
+ __builtin__.__dict__['isstring'] = __isstring__
+ 
+ 
  class Logger:
      """
***************
*** 587,591 ****
          abs = []
          for d in x:
!             if isinstance(d, str):
                  abs.append(os.path.abspath(d))
              else:
--- 577,581 ----
          abs = []
          for d in x:
!             if isstring(d):
                  abs.append(os.path.abspath(d))
              else:



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to