Skip to content

Commit

Permalink
More of the same. :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Jan 15, 1998
1 parent b576b44 commit 01e2b54
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions DT_In.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
of the module 'Missing', if present.
''' #'

__rcs_id__='$Id: DT_In.py,v 1.16 1998/01/15 20:22:44 jim Exp $'
__rcs_id__='$Id: DT_In.py,v 1.17 1998/01/15 20:36:05 jim Exp $'

############################################################################
# Copyright
Expand Down Expand Up @@ -330,7 +330,7 @@
# (540) 371-6909
#
############################################################################
__version__='$Revision: 1.16 $'[11:-2]
__version__='$Revision: 1.17 $'[11:-2]

from DT_Util import *
from string import find, atoi, join
Expand All @@ -356,9 +356,9 @@ def __init__(self, blocks):
try: atoi(v)
except:
self.start_name_re=regex.compile(
'&'+
'&+'+
join(map(lambda c: "[%s]" % c, v),'')+
'=[0-9]+&')
'=[0-9]+&+')

name,expr=name_param(args,'in',1)
self.__name__, self.expr = name, expr
Expand Down Expand Up @@ -774,9 +774,11 @@ def __getitem__(self,key):
return l
elif key=='sequence-query' and self.start_name_re is not None:
query_string=self.query_string
while query_string[:1]=='?': query_string=query_string[1:]
if query_string[:1] != '&': query_string='&'+query_string
if query_string[-1:] != '&': query_string=query_string+'&'
while query_string[:1] in '?&':
query_string=query_string[1:]
while query_string[-1:] == '&':
query_string=query_string[:-1]
query_string='&%s&' % query_string
re=self.start_name_re
l=re.search(query_string)
if l >= 0:
Expand Down Expand Up @@ -844,6 +846,9 @@ def previous_batches(self):

############################################################################
# $Log: DT_In.py,v $
# Revision 1.17 1998/01/15 20:36:05 jim
# More of the same. :-)
#
# Revision 1.16 1998/01/15 20:22:44 jim
# Made batch processing more robust. Now don't need to specify
# '?' or & when constructing query strings.
Expand Down

0 comments on commit 01e2b54

Please sign in to comment.