/[papo]/gnue/appserver/src/_featuretest/gcdParser.py
ViewVC logotype

Diff of /gnue/appserver/src/_featuretest/gcdParser.py

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

revision 1.3 by charlie, Tue Aug 27 18:15:51 2002 UTC revision 1.4 by styxman, Fri Nov 8 16:38:42 2002 UTC
# Line 1  Line 1 
1  # GNU Enterprise Application Server - List Object  # GNU Enterprise Application Server - List Object
2  #  #
 # Copyright 2001 Free Software Foundation  
 #  
3  # This file is part of GNU Enterprise.  # This file is part of GNU Enterprise.
4  #  #
5  # GNU Enterprise is free software; you can redistribute it  # GNU Enterprise is free software; you can redistribute it
6  # and/or modify it under the terms of the GNU General Public  # and/or modify it under the terms of the GNU General Public
7  # License as published by the Free Software Foundation; either  # License as published by the Free Software Foundation; either
8  # version 2, or (at your option) any later version.  # version 2, or (at your option) any later version.
9  #  #
10  # GNU Enterprise is distributed in the hope that it will be  # GNU Enterprise is distributed in the hope that it will be
11  # useful, but WITHOUT ANY WARRANTY; without even the implied  # useful, but WITHOUT ANY WARRANTY; without even the implied
12  # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR  # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  # PURPOSE. See the GNU General Public License for more details.  # PURPOSE. See the GNU General Public License for more details.
14  #  #
15  # You should have received a copy of the GNU General Public  # You should have received a copy of the GNU General Public
16  # License along with program; see the file COPYING. If not,  # License along with program; see the file COPYING. If not,
17  # write to the Free Software Foundation, Inc., 59 Temple Place  # write to the Free Software Foundation, Inc., 59 Temple Place
18  # - Suite 330, Boston, MA 02111-1307, USA.  # - Suite 330, Boston, MA 02111-1307, USA.
19  #  #
20    # Copyright 2001-2002 Free Software Foundation
21    #
22  # $Id$  # $Id$
23    
24    
25  from gnue.common import GDataSource,GConditions  from gnue.common import GDataSource,GConditions
26    from gnue.common.FileUtils import openResource
27  import geasInstance  import geasInstance
28    
29  import xreadlines, sys, string  import xreadlines, sys, string
# Line 30  import os Line 32  import os
32  import urllib  import urllib
33  import string  import string
34    
 #  
 # Open a file or URL resource,  
 # properly handling drive letters.  
 # copy from gnue.common  
 def openResource(resource):  
   drive = os.path.splitdrive(resource)  
   if len(drive[0]):  
     return open(resource,'r')  
   else:  
     return urllib.urlopen(resource)  
     
35    
36  def findchar(str,charlist):  def findchar(str,charlist):
37    for i in charlist:    for i in charlist:
38      pos=string.find(str,i)      pos=string.find(str,i)
39      if pos!=-1:      if pos!=-1:
40        return (pos,i)        return (pos,i)
41        
42    return (-1,'')    return (-1,'')
43    
44  class GcdParserError(Exception):  class GcdParserError(Exception):

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26