rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
raise ValueError, '%s has no node %s'%(link_class, value) | raise IndexError, '%s has no node %s'%(link_class, value) | def create(self, **propvalues): """Create a new node of this class and return its id. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py |
for entry in map(str, value): | for entry in value: if type(entry) != type(''): raise ValueError, 'link value must be String' | def create(self, **propvalues): """Create a new node of this class and return its id. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py |
raise ValueError, 'new property "%s": %s not a %s'%( | raise IndexError, 'new property "%s": %s not a %s'%( | def create(self, **propvalues): """Create a new node of this class and return its id. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py |
raise ValueError, '%s has no node %s'%(link_class, id) | raise IndexError, '%s has no node %s'%(link_class, id) | def create(self, **propvalues): """Create a new node of this class and return its id. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py |
for key,prop in self.properties.items(): if propvalues.has_key(str(key)): | for key, prop in self.properties.items(): if propvalues.has_key(key): | def create(self, **propvalues): """Create a new node of this class and return its id. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py |
d = self.db.getnode(self.classname, str(nodeid)) | d = self.db.getnode(self.classname, nodeid) | def get(self, nodeid, propname): """Get the value of a property on an existing node of this class. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py |
nodeid = str(nodeid) | def set(self, nodeid, **propvalues): """Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py | |
value = str(value) | def set(self, nodeid, **propvalues): """Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py | |
raise ValueError, 'new property "%s": %s not a %s'%( | raise IndexError, 'new property "%s": %s not a %s'%( | def set(self, nodeid, **propvalues): """Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py |
raise ValueError, '%s has no node %s'%(link_class, value) | raise IndexError, '%s has no node %s'%(link_class, value) | def set(self, nodeid, **propvalues): """Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py |
for entry in map(str, value): | for entry in value: if type(entry) != type(''): raise ValueError, 'link value must be String' | def set(self, nodeid, **propvalues): """Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py |
raise ValueError, 'new property "%s": %s not a %s'%( | raise IndexError, 'new property "%s": %s not a %s'%( | def set(self, nodeid, **propvalues): """Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py |
raise ValueError, '%s has no node %s'%(link_class, id) | raise IndexError, '%s has no node %s'%(link_class, id) | def set(self, nodeid, **propvalues): """Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py |
nodeid = str(nodeid) | def retire(self, nodeid): """Retire a node. The properties on the node remain available from the get() method, and the node's id is never reused. Retired nodes are not returned by the find(), list(), or lookup() methods, and other nodes may reuse the values of their key properties. """ nodeid = str(nodeid) if self.db... | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py | |
nodeid = str(nodeid) | def find(self, **propspec): """Get the ids of nodes in this class which link to a given node. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py | |
nodeid = str(nodeid) | def find(self, **propspec): """Get the ids of nodes in this class which link to a given node. | f585d0fd8b97406c94bbd0235dd528198f965caf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f585d0fd8b97406c94bbd0235dd528198f965caf/hyperdb.py | |
if msgid: | if msgid is not None: | def good_recipient(userid): # Make sure we don't send mail to either the anonymous # user or a user who has already seen the message. return (userid and (self.db.user.get(userid, 'username') != 'anonymous') and not seen_message.has_key(userid)) | f06abb95078c9239adf84891fe88c030540dad96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f06abb95078c9239adf84891fe88c030540dad96/roundupdb.py |
message_files = msgid and messages.get(msgid, 'files') or None | if msgid is None: message_files = None else: message_files = messages.get(msgid, 'files') | def send_message(self, nodeid, msgid, note, sendto, from_address=None, bcc_sendto=[]): '''Actually send the nominated message from this node to the sendto recipients, with the note appended. ''' users = self.db.user messages = self.db.msg files = self.db.file | f06abb95078c9239adf84891fe88c030540dad96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f06abb95078c9239adf84891fe88c030540dad96/roundupdb.py |
errors = '\n- '.join(errors) | errors = '\n- '.join(map(str, errors)) | def handle_message(self, message): ''' message - a Message instance | 8d8ee11b73e3c66285ac77dd3f375a1236878413 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8d8ee11b73e3c66285ac77dd3f375a1236878413/mailgw.py |
return '<a href="%s">%s%s</a>'%(s, s1, s2) | return '<a href="%s%s">%s</a>'%(s1, s2, s) | def _hyper_repl(self, match): if match.group('url'): s = match.group('url') return '<a href="%s">%s</a>'%(s, s) elif match.group('email'): s = match.group('email') return '<a href="mailto:%s">%s</a>'%(s, s) else: s = match.group('item') s1 = match.group('class').lower() s2 = match.group('id') try: # make sure s1 is a v... | 3f5fc9f83f29c06e85224e5ba20771f5f6246c43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3f5fc9f83f29c06e85224e5ba20771f5f6246c43/templating.py |
return '%s%s'%(s1, s2) | return s | def _hyper_repl(self, match): if match.group('url'): s = match.group('url') return '<a href="%s">%s</a>'%(s, s) elif match.group('email'): s = match.group('email') return '<a href="mailto:%s">%s</a>'%(s, s) else: s = match.group('item') s1 = match.group('class').lower() s2 = match.group('id') try: # make sure s1 is a v... | 3f5fc9f83f29c06e85224e5ba20771f5f6246c43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3f5fc9f83f29c06e85224e5ba20771f5f6246c43/templating.py |
s = ','.join([a for x in v]) where.append('(_%s in (%s)%s)'%(k, s, xtra)) args = args + v | if v: s = ','.join([a for x in v]) where.append('(_%s in (%s)%s)'%(k, s, xtra)) args = args + v else: where.append('_%s is NULL'%k) | def filter(self, search_matches, filterspec, sort=(None,None), group=(None,None)): ''' Return a list of the ids of the active nodes in this class that match the 'filter' spec, sorted by the group spec and then the sort spec | 01cef2ac2522e5a627f63802b4ecb7ed58dc891e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/01cef2ac2522e5a627f63802b4ecb7ed58dc891e/rdbms_common.py |
self.dispname = None | def _post_init(self): ''' Set attributes based on self.form ''' # extract the index display information from the form self.columns = [] for name in ':columns @columns'.split(): if self.form.has_key(name): self.special_char = name[0] self.columns = handleListCGIValue(self.form[name]) break self.show = support.TruthDict(... | 24452e4ed554aa8c3faf5f32818c6e6fa7d553d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/24452e4ed554aa8c3faf5f32818c6e6fa7d553d8/templating.py | |
value = self.form['@dispname'].value self.dispname = value.decode(self.client.charset) | self.dispname = self.form['@dispname'].value else: self.dispname = None | def _post_init(self): ''' Set attributes based on self.form ''' # extract the index display information from the form self.columns = [] for name in ':columns @columns'.split(): if self.form.has_key(name): self.special_char = name[0] self.columns = handleListCGIValue(self.form[name]) break self.show = support.TruthDict(... | 24452e4ed554aa8c3faf5f32818c6e6fa7d553d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/24452e4ed554aa8c3faf5f32818c6e6fa7d553d8/templating.py |
raise Unauthorised, self._('You do not have permission to ' | raise exceptions.Unauthorised, self._( 'You do not have permission to ' | def permission(self): """Check whether the user has permission to execute this action. | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
raise SeriousError, self._('No ID entered') | raise exceptions.SeriousError, self._('No ID entered') | def handle(self, typere=re.compile('[@:]type'), numre=re.compile('[@:]number')): """Show a node of a particular class/id.""" t = n = '' for key in self.form.keys(): if typere.match(key): t = self.form[key].value.strip() elif numre.match(key): n = self.form[key].value.strip() if not t: raise ValueError, self._('No type ... | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
raise SeriousError, self._( | raise exceptions.SeriousError, self._( | def handle(self, typere=re.compile('[@:]type'), numre=re.compile('[@:]number')): """Show a node of a particular class/id.""" t = n = '' for key in self.form.keys(): if typere.match(key): t = self.form[key].value.strip() elif numre.match(key): n = self.form[key].value.strip() if not t: raise ValueError, self._('No type ... | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
raise Redirect, url | raise exceptions.Redirect, url | def handle(self, typere=re.compile('[@:]type'), numre=re.compile('[@:]number')): """Show a node of a particular class/id.""" t = n = '' for key in self.form.keys(): if typere.match(key): t = self.form[key].value.strip() elif numre.match(key): n = self.form[key].value.strip() if not t: raise ValueError, self._('No type ... | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
raise Unauthorised, self._( | raise exceptions.Unauthorised, self._( | def _changenode(self, cn, nodeid, props): """Change the node based on the contents of the form.""" # check for permission if not self.editItemPermission(props): raise Unauthorised, self._( 'You do not have permission to edit %(class)s' ) % {'class': cn} | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
raise Unauthorised, self._( | raise exceptions.Unauthorised, self._( | def _createnode(self, cn, props): """Create a node based on the contents of the form.""" # check for permission if not self.newItemPermission(props): raise Unauthorised, self._( 'You do not have permission to create %(class)s' ) % {'class': cn} | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
raise Unauthorised, self._( | raise exceptions.Unauthorised, self._( | def editItemPermission(self, props): """Determine whether the user has permission to edit this item. | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
raise Redirect, url | raise exceptions.Redirect, url | def handle(self): """Perform an edit of an item in the database. | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
raise Redirect, '%s%s%s?@ok_message=%s&@template=%s'%(self.base, self.classname, self.nodeid, urllib.quote(messages), | raise exceptions.Redirect, '%s%s%s?@ok_message=%s&@template=%s' % ( self.base, self.classname, self.nodeid, urllib.quote(messages), | def handle(self): ''' Add a new item to the database. | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
raise Unauthorised, self._( | raise exceptions.Unauthorised, self._( | def handle(self): """Attempt to create a new user based on the contents of the form and then set the cookie. | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
raise Redirect, '%suser?@template=rego_progress'%self.base | raise exceptions.Redirect, '%suser?@template=rego_progress'%self.base | def handle(self): """Attempt to create a new user based on the contents of the form and then set the cookie. | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
self.client.userid = self.db.user.lookup(self.client.user) | self.client.userid = self.db.user.lookup(username) | def handle(self): """Attempt to log a user in. | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
name = self.client.user self.client.error_message.append(self._('Ivalid login')) self.client.make_user_anonymous() return | raise exceptions.LoginError, self._('Invalid login') | def handle(self): """Attempt to log a user in. | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
self.client.make_user_anonymous() self.client.error_message.append(self._('Invalid login')) return | raise exceptions.LoginError, self._('Invalid login') | def handle(self): """Attempt to log a user in. | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
self.client.make_user_anonymous() self.client.error_message.append( self._("You do not have permission to login")) return self.client.opendb(self.client.user) self.client.set_cookie(self.client.user) | raise exceptions.LoginError, self._( "You do not have permission to login") | def handle(self): """Attempt to log a user in. | 7b35d0c71d26a7290bec5255325716330d7a66bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7b35d0c71d26a7290bec5255325716330d7a66bf/actions.py |
for name in os.listdir(dirname): if not name.endswith('.py'): continue vars = {} self._load_python(os.path.join(dirname, name), vars) vars['init'](parent) | if os.path.isdir(dirname): for name in os.listdir(dirname): if not name.endswith('.py'): continue vars = {} self._load_python(os.path.join(dirname, name), vars) vars['init'](parent) | def load_extensions(self, parent, dirname): dirname = os.path.join(self.tracker_home, dirname) for name in os.listdir(dirname): if not name.endswith('.py'): continue vars = {} self._load_python(os.path.join(dirname, name), vars) vars['init'](parent) | 00ef273e806c8375e73397e4915a3443c1afc962 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/00ef273e806c8375e73397e4915a3443c1afc962/instance.py |
always exactly 19 characters long. | always exactly 19 characters long. | def _add_granularity(src, order, value = 1): '''Increment first non-None value in src dictionary ordered by 'order' parameter ''' for gran in order: if src[gran]: src[gran] = int(src[gran]) + value break | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
def __init__(self, spec='.', offset=0, add_granularity=0): | def __init__(self, spec='.', offset=0, add_granularity=0, translator=i18n): | def __init__(self, spec='.', offset=0, add_granularity=0): """Construct a date given a specification and a time zone offset. | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
raise ValueError, _('Not a date spec: %s' % self.usagespec) | raise ValueError, self._('Not a date spec: %s') % self.usagespec | def set(self, spec, offset=0, date_re=re.compile(r''' ((?P<y>\d\d\d\d)([/-](?P<m>\d\d?)([/-](?P<d>\d\d?))?)? # yyyy[-mm[-dd]] |(?P<a>\d\d?)[/-](?P<b>\d\d?))? # or mm-dd (?P<n>\.)? # . (((?P<H>\d?\d):(?P<M>\d\d))?(:(?P<S>\d\d(\.\d+)?))?)? # hh:mm:ss (?P<o>.+)? ... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
def set(self, spec, offset=0, date_re=re.compile(r''' ((?P<y>\d\d\d\d)([/-](?P<m>\d\d?)([/-](?P<d>\d\d?))?)? # yyyy[-mm[-dd]] |(?P<a>\d\d?)[/-](?P<b>\d\d?))? # or mm-dd (?P<n>\.)? # . (((?P<H>\d?\d):(?P<M>\d\d))?(:(?P<S>\d\d(\.\d+)?))?)? # hh:mm:ss (?P<o>.+)? ... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
def set(self, spec, offset=0, date_re=re.compile(r''' ((?P<y>\d\d\d\d)([/-](?P<m>\d\d?)([/-](?P<d>\d\d?))?)? # yyyy[-mm[-dd]] |(?P<a>\d\d?)[/-](?P<b>\d\d?))? # or mm-dd (?P<n>\.)? # . (((?P<H>\d?\d):(?P<M>\d\d))?(:(?P<S>\d\d(\.\d+)?))?)? # hh:mm:ss (?P<o>.+)? ... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
raise ValueError, _('%r not a date spec (%s)')%(spec, | raise ValueError, self._('%r not a date spec (%s)')%(spec, | def set(self, spec, offset=0, date_re=re.compile(r''' ((?P<y>\d\d\d\d)([/-](?P<m>\d\d?)([/-](?P<d>\d\d?))?)? # yyyy[-mm[-dd]] |(?P<a>\d\d?)[/-](?P<b>\d\d?))? # or mm-dd (?P<n>\.)? # . (((?P<H>\d?\d):(?P<M>\d\d))?(:(?P<S>\d\d(\.\d+)?))?)? # hh:mm:ss (?P<o>.+)? ... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
if day < 1: | if day < 1: | def get_mdays(year, month): if month == 2 and calendar.isleap(year): return 29 else: return calendar.mdays[month] | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
elif day > get_mdays(year,month): | elif day > get_mdays(year,month): | def get_mdays(year, month): if month == 2 and calendar.isleap(year): return 29 else: return calendar.mdays[month] | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
def __init__(self, spec, sign=1, allowdate=1, add_granularity=0): | def __init__(self, spec, sign=1, allowdate=1, add_granularity=0, translator=i18n ): | def __init__(self, spec, sign=1, allowdate=1, add_granularity=0): """Construct an interval given a specification.""" if type(spec) in (IntType, FloatType, LongType): self.from_seconds(spec) elif type(spec) in (StringType, UnicodeType): self.set(spec, allowdate=allowdate, add_granularity=add_granularity) else: if len(sp... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
raise ValueError, _('Not an interval spec: [+-] [ '[ | raise ValueError, self._('Not an interval spec:' ' [+-] [ | def set(self, spec, allowdate=1, interval_re=re.compile(''' \s*(?P<s>[-+])? # + or - \s*((?P<y>\d+\s*)y)? # year \s*((?P<m>\d+\s*)m)? # month \s*((?P<w>\d+\s*)w)? # week \s*((?P<d>\d+\s*)d)? # day \s*(((?P<H>\d+):(?P<M>\d+))?(:(?P<S>\d+))?)? # time \s*(?P<D> (\d\d\d\d[/-])?(\d\d?)?[/-](\d\d?)? ... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
raise ValueError, _('Not an interval spec: [+-] [ '[ | raise ValueError, self._('Not an interval spec:' ' [+-] [ | def set(self, spec, allowdate=1, interval_re=re.compile(''' \s*(?P<s>[-+])? # + or - \s*((?P<y>\d+\s*)y)? # year \s*((?P<m>\d+\s*)m)? # month \s*((?P<w>\d+\s*)w)? # week \s*((?P<d>\d+\s*)d)? # day \s*(((?P<H>\d+):(?P<M>\d+))?(:(?P<S>\d+))?)? # time \s*(?P<D> (\d\d\d\d[/-])?(\d\d?)?[/-](\d\d?)? ... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'number': int(days/30)} else: s = _('1 month') else: s = _('%(number)s weeks')%{'number': int(days... | s = self.ngettext("%(number)s year", "%(number)s years", self.year) % {'number': self.year} elif self.month or self.day > 28: _months = int(((self.month * 30) + self.day) / 30) s = self.ngettext("%(number)s month", "%(number)s months", _months) % {'number': _months} | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
s = _('1 week') | _weeks = int(self.day / 7) s = self.ngettext("%(number)s week", "%(number)s weeks", _weeks) % {'number': _weeks} | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
s = _('%(number)s days')%{'number': self.day} | s = self.ngettext('%(number)s day', '%(number)s days', self.day) % {'number': self.day} | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
return _('tomorrow') | return self._('tomorrow') | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
return _('yesterday') | return self._('yesterday') | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
s = _('%(number)s hours')%{'number': self.hour} | s = self.ngettext('%(number)s hour', '%(number)s hours', self.hour) % {'number': self.hour} | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
s = _('an hour') elif self.minute/15 == 2: s = _('1 1/2 hours') | s = self._('an hour') elif _quarters == 2: s = self._('1 1/2 hours') | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
s = _('1 %(number)s/4 hours')%{'number': self.minute/15} | s = self.ngettext('1 %(number)s/4 hours', '1 %(number)s/4 hours', _quarters) % {'number': _quarters} | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
return _('in a moment') | return self._('in a moment') | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
return _('just now') | return self._('just now') | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
s = _('1 minute') | s = self._('1 minute') | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
s = _('%(number)s minutes')%{'number': self.minute} elif int(self.minute/15) == 2: s = _('1/2 an hour') else: s = _('%(number)s/4 hour')%{'number': int(self.minute/15)} if self.sign < 0: s = s + _(' ago') else: s = _('in ') + s | s = self.ngettext('%(number)s minute', '%(number)s minutes', self.minute) % {'number': self.minute} elif _quarters == 2: s = self._('1/2 an hour') else: s = self.ngettext('%(number)s/4 hours', '%(number)s/4 hours', _quarters) % {'number': _quarters} if self.sign < 0: s = self._('%s ago') % s else: s = self._('in %s')... | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py |
def as_seconds(self): '''Calculate the Interval as a number of seconds. Months are counted as 30 days, years as 365 days. Returns a Long int. ''' n = self.year * 365L n = n + self.month * 30 n = n + self.day n = n * 24 n = n + self.hour n = n * 60 n = n + self.minute n = n * 60 n = n + self.second return n * self.sign | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
def fixTimeOverflow(time): """ Handle the overflow in the time portion (H, M, S) of "time": (sign, y,m,d,H,M,S) Overflow and underflow will at most affect the _days_ portion of the date. We do not overflow days to months as we don't know _how_ to, generally. """ # XXX we could conceivably use this function for handlin... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
def fixTimeOverflow(time): """ Handle the overflow in the time portion (H, M, S) of "time": (sign, y,m,d,H,M,S) Overflow and underflow will at most affect the _days_ portion of the date. We do not overflow days to months as we don't know _how_ to, generally. """ # XXX we could conceivably use this function for handlin... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
def fixTimeOverflow(time): """ Handle the overflow in the time portion (H, M, S) of "time": (sign, y,m,d,H,M,S) Overflow and underflow will at most affect the _days_ portion of the date. We do not overflow days to months as we don't know _how_ to, generally. """ # XXX we could conceivably use this function for handlin... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
def fixTimeOverflow(time): """ Handle the overflow in the time portion (H, M, S) of "time": (sign, y,m,d,H,M,S) Overflow and underflow will at most affect the _days_ portion of the date. We do not overflow days to months as we don't know _how_ to, generally. """ # XXX we could conceivably use this function for handlin... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
def fixTimeOverflow(time): """ Handle the overflow in the time portion (H, M, S) of "time": (sign, y,m,d,H,M,S) Overflow and underflow will at most affect the _days_ portion of the date. We do not overflow days to months as we don't know _how_ to, generally. """ # XXX we could conceivably use this function for handlin... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
def fixTimeOverflow(time): """ Handle the overflow in the time portion (H, M, S) of "time": (sign, y,m,d,H,M,S) Overflow and underflow will at most affect the _days_ portion of the date. We do not overflow days to months as we don't know _how_ to, generally. """ # XXX we could conceivably use this function for handlin... | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
def __init__(self, spec, Type, allow_granularity=1, **params): """Initializes Range of type <Type> from given <spec> string. Sets two properties - from_value and to_value. None assigned to any of this properties means "infinitum" (-infinitum to from_value and +infinitum to to_value) | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
def __init__(self, spec, Type, allow_granularity=1, **params): """Initializes Range of type <Type> from given <spec> string. Sets two properties - from_value and to_value. None assigned to any of this properties means "infinitum" (-infinitum to from_value and +infinitum to to_value) | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
def __repr__(self): return "<Range %s>" % self.__str__() | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | ||
return '%s weeks'%self.day | return '1 week' | def pretty(self, threshold=('d', 5)): ''' print up the date date using one of these nice formats.. < 1 minute < 15 minutes < 30 minutes < 1 hour < 12 hours < 1 day otherwise, return None (so a full date may be displayed) ''' if self.year or self.month > 2: return None if self.month: days = (self.month * 30) + self.day ... | 8b1afe297cc83e8e3eb0459cbcff9dc6e4f59185 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8b1afe297cc83e8e3eb0459cbcff9dc6e4f59185/date.py |
value = self.cl.get(self.nodeid, property) | if isinstance(propclass, hyperdb.Link: value = [self.cl.get(self.nodeid, property)] else: value = self.cl.get(self.nodeid, property) | def __call__(self, property, **args): propclass = self.properties[property] if self.nodeid: value = self.cl.get(self.nodeid, property) elif self.filterspec is not None: value = self.filterspec.get(property, []) else: value = [] if (isinstance(propclass, hyperdb.Link) or isinstance(propclass, hyperdb.Multilink)): linkcl... | b27451730e44737b39ff26a15c852d028fe9750c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b27451730e44737b39ff26a15c852d028fe9750c/htmltemplate.py |
if (isinstance(propclass, hyperdb.Link) or isinstance(propclass, hyperdb.Multilink)): linkcl = self.db.classes[propclass.classname] l = [] k = linkcl.labelprop() for optionid in linkcl.list(): option = linkcl.get(optionid, k) if optionid in value or option in value: checked = 'checked' else: checked = '' l.append('%s:<... | linkcl = self.db.classes[propclass.classname] l = [] k = linkcl.labelprop() for optionid in linkcl.list(): option = linkcl.get(optionid, k) if optionid in value or option in value: checked = 'checked' else: checked = '' l.append('%s:<input type="checkbox" %s name="%s" value="%s">'%( option, checked, property, option)... | def __call__(self, property, **args): propclass = self.properties[property] if self.nodeid: value = self.cl.get(self.nodeid, property) elif self.filterspec is not None: value = self.filterspec.get(property, []) else: value = [] if (isinstance(propclass, hyperdb.Link) or isinstance(propclass, hyperdb.Multilink)): linkcl... | b27451730e44737b39ff26a15c852d028fe9750c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b27451730e44737b39ff26a15c852d028fe9750c/htmltemplate.py |
(nodeid, date_stamp, self.journaltag, action, params) = entry | (nodeid, date_stamp, user, action, params) = entry | def getjournal(self, classname, nodeid): ''' get the journal for id ''' # attempt to open the journal - in some rare cases, the journal may # not exist try: db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'r') except bsddb.error, error: if error.args[0] != 2: raise return [] # mor handling of bad jou... | 90bfc81c51688937ae9ba441b73d7330b2b51907 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/90bfc81c51688937ae9ba441b73d7330b2b51907/back_bsddb.py |
res.append((nodeid, date_obj, self.journaltag, action, params)) | res.append((nodeid, date_obj, user, action, params)) | def getjournal(self, classname, nodeid): ''' get the journal for id ''' # attempt to open the journal - in some rare cases, the journal may # not exist try: db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'r') except bsddb.error, error: if error.args[0] != 2: raise return [] # mor handling of bad jou... | 90bfc81c51688937ae9ba441b73d7330b2b51907 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/90bfc81c51688937ae9ba441b73d7330b2b51907/back_bsddb.py |
sortfunc = self.make_sort_function(propclass.classname) | def do_field(self, property, size=None, showid=0): ''' display a property like the plain displayer, but in a text field to be edited | aaffa309571b159bf15124ecf5f99d1f0ad7347b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/aaffa309571b159bf15124ecf5f99d1f0ad7347b/htmltemplate.py | |
options = linkcl.list() options.sort(sortfunc) | if linkcl.getprops().has_key('order'): sort_on = 'order' else: sort_on = linkcl.labelprop() options = linkcl.filter(None, {}, [sort_on], []) | def do_field(self, property, size=None, showid=0): ''' display a property like the plain displayer, but in a text field to be edited | aaffa309571b159bf15124ecf5f99d1f0ad7347b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/aaffa309571b159bf15124ecf5f99d1f0ad7347b/htmltemplate.py |
options = linkcl.list() options.sort(sortfunc) | if linkcl.getprops().has_key('order'): sort_on = 'order' else: sort_on = linkcl.labelprop() options = linkcl.filter(None, {}, [sort_on], []) | def do_menu(self, property, size=None, height=None, showid=0, additional=[]): ''' For a Link/Multilink property, display a menu of the available choices | aaffa309571b159bf15124ecf5f99d1f0ad7347b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/aaffa309571b159bf15124ecf5f99d1f0ad7347b/htmltemplate.py |
options = linkcl.list() options.sort(sortfunc) | if linkcl.getprops().has_key('order'): sort_on = 'order' else: sort_on = linkcl.labelprop() options = linkcl.filter(None, {}, [sort_on], []) | def do_menu(self, property, size=None, height=None, showid=0, additional=[]): ''' For a Link/Multilink property, display a menu of the available choices | aaffa309571b159bf15124ecf5f99d1f0ad7347b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/aaffa309571b159bf15124ecf5f99d1f0ad7347b/htmltemplate.py |
return eval(command, self.globals, self.locals) | return eval(command, self.globals, self.locals) | def __call__(self, m, search_text=None, filter=None, columns=None, sort=None, group=None): if m.group('name'): if m.group('name') in self.props: text = m.group('text') replace = self.__class__(self.globals, {}, self.props) return replace.go(text) else: return '' if m.group('display'): command = m.group('command') retur... | aaffa309571b159bf15124ecf5f99d1f0ad7347b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/aaffa309571b159bf15124ecf5f99d1f0ad7347b/htmltemplate.py |
def render(self, filterspec={}, search_text='', filter=[], columns=[], sort=[], group=[], show_display_form=1, nodeids=None, show_customization=1, show_nodes=1): self.filterspec = filterspec | aaffa309571b159bf15124ecf5f99d1f0ad7347b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/aaffa309571b159bf15124ecf5f99d1f0ad7347b/htmltemplate.py | ||
def filter_section(self, template, search_text, filter, columns, group, all_filters, all_columns, show_customization): | aaffa309571b159bf15124ecf5f99d1f0ad7347b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/aaffa309571b159bf15124ecf5f99d1f0ad7347b/htmltemplate.py | ||
journaldate = str(date.Date(journaldate)) | journaldate = date.Date(journaldate) | def add_new_columns_v2(self): '''While we're adding the actor column, we need to update the tables to have the correct datatypes.''' for klass in self.classes.values(): cn = klass.classname properties = klass.getprops() old_spec = self.database_schema['tables'][cn] | 5f95dd34105d9fa54d471617dd14823905eabd07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5f95dd34105d9fa54d471617dd14823905eabd07/back_mysql.py |
self.save_journal(cn, cols, nodeid, journaldate, | self.save_journal(cn, cols, nodeid, dc(journaldate), | def add_new_columns_v2(self): '''While we're adding the actor column, we need to update the tables to have the correct datatypes.''' for klass in self.classes.values(): cn = klass.classname properties = klass.getprops() old_spec = self.database_schema['tables'][cn] | 5f95dd34105d9fa54d471617dd14823905eabd07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/5f95dd34105d9fa54d471617dd14823905eabd07/back_mysql.py |
sys.stdout.write ('Exporting %s - %s\r'%(classname, nodeid)) sys.stdout.flush () | sys.stdout.write('Exporting %s - %s\r'%(classname, nodeid)) sys.stdout.flush() | def do_export(self, args): ""'''Usage: export [class[,class]] export_dir Export the database to colon-separated-value files. | d5962027ad7eb386ad17a35d52b18865175a301c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d5962027ad7eb386ad17a35d52b18865175a301c/admin.py |
sys.stdout.write ("\nExporting Journal for %s\n" % classname) sys.stdout.flush () | sys.stdout.write("\nExporting Journal for %s\n" % classname) sys.stdout.flush() | def do_export(self, args): ""'''Usage: export [class[,class]] export_dir Export the database to colon-separated-value files. | d5962027ad7eb386ad17a35d52b18865175a301c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d5962027ad7eb386ad17a35d52b18865175a301c/admin.py |
if self.verbose : | if self.verbose: | def do_import(self, args): ""'''Usage: import import_dir Import a database from the directory containing CSV files, two per class to import. | d5962027ad7eb386ad17a35d52b18865175a301c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d5962027ad7eb386ad17a35d52b18865175a301c/admin.py |
def pt_html(context=5): | def pt_html(context=5, i18n=None): _ = get_translator(i18n) | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for f... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', | exc_info = [esc(str(value)) for value in sys.exc_info()[:2]] l = [_('<h1>Templating Error</h1>\n' '<p><b>%(exc_type)s</b>: %(exc_value)s</p>\n' '<p class="help">Debugging information follows</p>' ) % {'exc_type': exc_info[0], 'exc_value': exc_info[1]}, | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for f... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
s.append('<li>"%s" (%s)</li>'%(name, esc(repr(info)))) | s.append(_('<li>"%(name)s" (%(info)s)</li>') % {'name': name, 'info': esc(repr(info))}) | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for f... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
l.append('<li>Looking for "%s", current path:<ol>%s</ol></li>'%( ti.name, s)) | l.append(_('<li>Looking for "%(name)s", ' 'current path:<ol>%(path)s</ol></li>' ) % {'name': ti.name, 'path': s}) | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for f... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
l.append('<li>In %s</li>'%esc(str(ti))) | l.append(_('<li>In %s</li>') % esc(str(ti))) | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for f... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
s = 'A problem occurred in your template "%s".'%str(context.id) | s = _('A problem occurred in your template "%s".') \ % str(context.id) | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for f... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
l.append(''' <li>While evaluating the %r expression on line %d | l.append(_(''' <li>While evaluating the %(info)r expression on line %(line)d | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for f... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
%s %s | %(globals)s %(locals)s | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for f... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
'''%(info, context.position[0], niceDict(' ', context.global_vars), niceDict(' ', context.local_vars))) | ''') % { 'info': info, 'line': context.position[0], 'globals': niceDict(' ', context.global_vars), 'locals': niceDict(' ', context.local_vars) }) | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for f... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
<tr><th class="header" align="left">Full traceback:</th></tr> | <tr><th class="header" align="left">%s</th></tr> | def pt_html(context=5): esc = cgi.escape l = ['<h1>Templating Error</h1>', '<p><b>%s</b>: %s</p>'%(esc(str(sys.exc_type)), esc(str(sys.exc_value))), '<p class="help">Debugging information follows</p>', '<ol>',] from roundup.cgi.PageTemplates.Expressions import TraversalError t = inspect.trace(context) t.reverse() for f... | f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f8fb7de2f6d69a02b72966a8e8af2c65d4eec9d4/cgitb.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.