rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
return self.form.keys():
return self.form.keys()
def keys(self): return self.form.keys():
2222cc13c3f107bfc8b14ca408f85dc46b0894a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/2222cc13c3f107bfc8b14ca408f85dc46b0894a5/ZRoundup.py
sys.stdout.write ('Exporting %s - %d\r'%(classname, nodeid))
sys.stdout.write ('Exporting %s - %s\r'%(classname, nodeid))
def do_export(self, args): ""'''Usage: export [class[,class]] export_dir Export the database to colon-separated-value files.
1961cbc0891cab06f200d09d3208276f5ab76c8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1961cbc0891cab06f200d09d3208276f5ab76c8f/admin.py
sys.stdout.write('Importing %s - %d\r'%(classname, n))
sys.stdout.write('Importing %s - %s\r'%(classname, n))
def do_import(self, args): ""'''Usage: import import_dir Import a database from the directory containing CSV files, two per class to import.
1961cbc0891cab06f200d09d3208276f5ab76c8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1961cbc0891cab06f200d09d3208276f5ab76c8f/admin.py
try: tblid = self.tables.find(name=tablenm) except ValueError: open('/u/roundup-sf/roundup/error.out','w').write('\nself.tables=%s, tablenm=%s\n' % (self.tables.structure(), tablenm)) raise
tblid = self.tables.find(name=tablenm)
def addjournal(self, tablenm, nodeid, action, params, creator=None, creation=None): try: tblid = self.tables.find(name=tablenm) except ValueError: open('/u/roundup-sf/roundup/error.out','w').write('\nself.tables=%s, tablenm=%s\n' % (self.tables.structure(), tablenm)) raise if tblid == -1: tblid = self.tables.append(nam...
2c659b1808567ab09338f632843fded5a0c0f222 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/2c659b1808567ab09338f632843fded5a0c0f222/back_metakit.py
""'''Usage: install [template [backend [admin password [key=val[,key=val]]]]]
""'''Usage: install [template [backend [key=val[,key=val]]]]
def do_install(self, tracker_home, args): ""'''Usage: install [template [backend [admin password [key=val[,key=val]]]]] Install a new Roundup tracker.
847b2827477d69a24d2f50151428a595f4672d63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/847b2827477d69a24d2f50151428a595f4672d63/admin.py
The template, backend and admin password may be specified on the command-line as arguments, in that order. The last command line argument allows to pass initial values for config options. For example, passing
The template and backend may be specified on the command-line as arguments, in that order. Command line arguments following the backend allows you to pass initial values for config options. For example, passing
def do_install(self, tracker_home, args): ""'''Usage: install [template [backend [admin password [key=val[,key=val]]]]] Install a new Roundup tracker.
847b2827477d69a24d2f50151428a595f4672d63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/847b2827477d69a24d2f50151428a595f4672d63/admin.py
if not self.hasPermission('Edit', self.classname, itemid=qid):
if not self.hasPermission('Edit', 'query', itemid=qid):
def handle(self): """Mangle some of the form variables.
59d1ed178fd4a6cfd7b6fa2e56aae971cea702b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/59d1ed178fd4a6cfd7b6fa2e56aae971cea702b0/actions.py
if not self.hasPermission('Create', self.classname):
if not self.hasPermission('Create', 'query'):
def handle(self): """Mangle some of the form variables.
59d1ed178fd4a6cfd7b6fa2e56aae971cea702b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/59d1ed178fd4a6cfd7b6fa2e56aae971cea702b0/actions.py
if not self.hasPermission('Edit', self.classname, itemid=qid):
if not self.hasPermission('Edit', 'query', itemid=qid):
def handle(self): """Mangle some of the form variables.
59d1ed178fd4a6cfd7b6fa2e56aae971cea702b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/59d1ed178fd4a6cfd7b6fa2e56aae971cea702b0/actions.py
if not self.hasPermission('Create', self.classname):
if not self.hasPermission('Create', 'query'):
def handle(self): """Mangle some of the form variables.
59d1ed178fd4a6cfd7b6fa2e56aae971cea702b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/59d1ed178fd4a6cfd7b6fa2e56aae971cea702b0/actions.py
return self.hasPermission('Create', self.classname)
return self.hasPermission('Create')
def newItemPermission(self, props): """Determine whether the user has permission to create this item.
59d1ed178fd4a6cfd7b6fa2e56aae971cea702b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/59d1ed178fd4a6cfd7b6fa2e56aae971cea702b0/actions.py
raise Redirect, '%s/%s%s?:ok_message=%s'%(
raise Redirect, '%s%s%s?:ok_message=%s'%(
def registerAction(self): '''Attempt to create a new user based on the contents of the form and then set the cookie.
ebcc910248f089c5ddef202e00f3dc2a0f7e768b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ebcc910248f089c5ddef202e00f3dc2a0f7e768b/client.py
raise Redirect, '%s/%s%s?:ok_message=%s'%(self.base, self.classname,
raise Redirect, '%s%s%s?:ok_message=%s'%(self.base, self.classname,
def editItemAction(self): ''' Perform an edit of an item in the database.
ebcc910248f089c5ddef202e00f3dc2a0f7e768b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ebcc910248f089c5ddef202e00f3dc2a0f7e768b/client.py
raise Redirect, '%s/%s%s?:ok_message=%s'%(self.base, self.classname,
raise Redirect, '%s%s%s?:ok_message=%s'%(self.base, self.classname,
def newItemAction(self): ''' Add a new item to the database.
ebcc910248f089c5ddef202e00f3dc2a0f7e768b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ebcc910248f089c5ddef202e00f3dc2a0f7e768b/client.py
def lookupIds(db, prop, ids, num_re=re.compile('-?\d+')):
def lookupIds(db, prop, ids, fail_ok=False, num_re=re.compile('-?\d+')): ''' "fail_ok" should be specified if we wish to pass through bad values (most likely form values that we wish to represent back to the user) '''
def lookupIds(db, prop, ids, num_re=re.compile('-?\d+')): cl = db.getclass(prop.classname) l = [] for entry in ids: if num_re.match(entry): l.append(entry) else: try: l.append(cl.lookup(entry)) except KeyError: # ignore invalid keys pass return l
67953357b593218278847e05054f30bcba7095ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/67953357b593218278847e05054f30bcba7095ac/templating.py
except KeyError: pass
except (TypeError, KeyError): if fail_ok: l.append(entry)
def lookupIds(db, prop, ids, num_re=re.compile('-?\d+')): cl = db.getclass(prop.classname) l = [] for entry in ids: if num_re.match(entry): l.append(entry) else: try: l.append(cl.lookup(entry)) except KeyError: # ignore invalid keys pass return l
67953357b593218278847e05054f30bcba7095ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/67953357b593218278847e05054f30bcba7095ac/templating.py
handleListCGIValue(form[item]))
handleListCGIValue(form[item]), fail_ok=True)
def __getitem__(self, item): ''' return an HTMLProperty instance ''' #print 'HTMLClass.getitem', (self, item)
67953357b593218278847e05054f30bcba7095ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/67953357b593218278847e05054f30bcba7095ac/templating.py
value = lookupIds(self._db, prop, [value])[0]
value = lookupIds(self._db, prop, [value], fail_ok=True)[0]
def __getitem__(self, item): ''' return an HTMLProperty instance ''' #print 'HTMLClass.getitem', (self, item)
67953357b593218278847e05054f30bcba7095ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/67953357b593218278847e05054f30bcba7095ac/templating.py
Subject: [issue1] Testing... [assignedto=mary; nosy=john]
Subject: [issue1] Testing... [assignedto=mary; nosy=+john]
def testFollowup(self): self.doNewIssue()
44bca110bfe07b6de4ef66f1ad9d69e5c6b9b8e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/44bca110bfe07b6de4ef66f1ad9d69e5c6b9b8e8/test_mailgw.py
Subject: Re: Testing... [assignedto=mary; nosy=john]
Subject: Re: Testing... [assignedto=mary; nosy=+john]
def testFollowupTitleMatch(self): self.doNewIssue() message = cStringIO.StringIO('''Content-Type: text/plain;
44bca110bfe07b6de4ef66f1ad9d69e5c6b9b8e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/44bca110bfe07b6de4ef66f1ad9d69e5c6b9b8e8/test_mailgw.py
fp.seek(0)
message.fp.seek(0)
def handle_Message(self, message): '''Handle an RFC822 Message
749da9d4829d5ee05895bfa0006d6638d3c26558 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/749da9d4829d5ee05895bfa0006d6638d3c26558/mailgw.py
m.append(fp.read())
m.append(message.fp.read())
def handle_Message(self, message): '''Handle an RFC822 Message
749da9d4829d5ee05895bfa0006d6638d3c26558 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/749da9d4829d5ee05895bfa0006d6638d3c26558/mailgw.py
trackers = dict([(name, roundup.instance.open(home))
trackers = dict([(name, roundup.instance.open(home, optimize=1))
def get_server(self): """Return HTTP server object to run""" # redirect stdout/stderr to our logfile # this is done early to have following messages go to this logfile if self["LOGFILE"]: # appending, unbuffered sys.stdout = sys.stderr = open(self["LOGFILE"], 'a', 0) # we don't want the cgi module interpreting the comm...
0d25980ec1064bbf02430000fb0f64e0e349e07b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/0d25980ec1064bbf02430000fb0f64e0e349e07b/roundup_server.py
queries.append(qid) self.db.user.set(self.userid, queries=queries)
if qid not in queries: queries.append(qid) self.db.user.set(self.userid, queries=queries)
def handle(self, wcre=re.compile(r'[\s,]+')): """Mangle some of the form variables.
0c121fd96661fd2af02335bee291a82c3bab7d76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/0c121fd96661fd2af02335bee291a82c3bab7d76/actions.py
'''
'''
def setkey(self, propname): '''Select a String property of this class to be the key property.
edfb0422e5d47b84bd404fb037ad8914f3d11fc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/edfb0422e5d47b84bd404fb037ad8914f3d11fc1/back_metakit.py
raise ValueError, "%s already indexed on %s"%(self.classname, self.key)
else: tablename = "_%s.%s"%(self.classname, self.key) self.db._db.getas(tablename)
def setkey(self, propname): '''Select a String property of this class to be the key property.
edfb0422e5d47b84bd404fb037ad8914f3d11fc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/edfb0422e5d47b84bd404fb037ad8914f3d11fc1/back_metakit.py
def setkey(self, propname): '''Select a String property of this class to be the key property.
edfb0422e5d47b84bd404fb037ad8914f3d11fc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/edfb0422e5d47b84bd404fb037ad8914f3d11fc1/back_metakit.py
iv = self.db._db.view('_%s' % self.classname)
tablename = "_%s.%s"%(self.classname, self.key) iv = self.db._db.view(tablename)
def setkey(self, propname): '''Select a String property of this class to be the key property.
edfb0422e5d47b84bd404fb037ad8914f3d11fc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/edfb0422e5d47b84bd404fb037ad8914f3d11fc1/back_metakit.py
def setkey(self, propname): '''Select a String property of this class to be the key property.
edfb0422e5d47b84bd404fb037ad8914f3d11fc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/edfb0422e5d47b84bd404fb037ad8914f3d11fc1/back_metakit.py
iv = self.db._db.getas('_%s[k:S,i:I]' % self.classname)
iv = self.db._db.getas('_%s[k:S,i:I]' % tablename)
def setkey(self, propname): '''Select a String property of this class to be the key property.
edfb0422e5d47b84bd404fb037ad8914f3d11fc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/edfb0422e5d47b84bd404fb037ad8914f3d11fc1/back_metakit.py
return self.db._db.view("_%s" % self.classname).ordered(1)
tablename = "_%s.%s"%(self.classname, self.key) return self.db._db.view("_%s" % tablename).ordered(1)
def getindexview(self, RW=0): # XXX FIX ME -> The RW flag doesn't do anything. return self.db._db.view("_%s" % self.classname).ordered(1)
edfb0422e5d47b84bd404fb037ad8914f3d11fc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/edfb0422e5d47b84bd404fb037ad8914f3d11fc1/back_metakit.py
(self.classname, properties, property, form, type, sort, pagesize, filter)
(self.classname, properties, property, form, type, sort, pagesize, filter)
def classhelp(self, properties=None, label=''"(list)", width='500', height='400', property='', form='itemSynopsis', pagesize=50, inputtype="checkbox", sort=None, filter=None): '''Pop up a javascript window with class help
9d4fbdd4afbef077b260fa74e608879a962bd586 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9d4fbdd4afbef077b260fa74e608879a962bd586/templating.py
m.insert(0, '----------')
def generateChangeNote(self, nodeid, newvalues): """Generate a change note that lists property changes """ cn = self.classname cl = self.db.classes[cn] changed = {} props = cl.getprops(protected=0)
57c4560d6804a79bd8d7c2b40dd09a6dd57ff240 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c4560d6804a79bd8d7c2b40dd09a6dd57ff240/roundupdb.py
def list(self, sort=None, group=None, filter=None, columns=None, filterspec=None, show_customization=None, show_nodes=1, pagesize=None): ''' call the template index with the args
857fa46af33f8d1bde80071531bae814a3de1f09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/857fa46af33f8d1bde80071531bae814a3de1f09/cgi_client.py
index.render(filterspec, search_text, filter, columns, sort, group, show_customization=show_customization,
index.render(filterspec=filterspec, search_text=search_text, filter=filter, columns=columns, sort=sort, group=group, show_customization=show_customization,
def list(self, sort=None, group=None, filter=None, columns=None, filterspec=None, show_customization=None, show_nodes=1, pagesize=None): ''' call the template index with the args
857fa46af33f8d1bde80071531bae814a3de1f09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/857fa46af33f8d1bde80071531bae814a3de1f09/cgi_client.py
return cgi.escape(url)
return cgi.escape(html)
def html_quote(self, html): '''HTML-quote the supplied text.''' return cgi.escape(url)
eed8035a0f39778b53159f67be7c2c325fcea8e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eed8035a0f39778b53159f67be7c2c325fcea8e0/templating.py
"""Called once the schema initialisation has finished.
"""Called once the schema initialisation has finished.
def post_init(self): """Called once the schema initialisation has finished. If 'refresh' is true, we want to rebuild the backend structures. """ raise NotImplementedError
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
def storefile(self, classname, nodeid, property, content): '''Store the content of the file in the database. The property may be None, in which case the filename does not indicate which property is being saved. ''' raise NotImplementedError
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
def rollback(self): ''' Reverse all actions from the current transaction.
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
def create(self, **propvalues): """Create a new node of this class and return its id.
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
def create(self, **propvalues): """Create a new node of this class and return its id.
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
def create(self, **propvalues): """Create a new node of this class and return its id.
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
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.
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
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. """ raise NotImplementedError
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
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. """ raise NotImplementedError
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
def restore(self, nodeid): '''Restpre a retired node.
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
def destroy(self, nodeid): """Destroy a node. WARNING: this method should never be used except in extremely rare situations where there could never be links to the node being deleted
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
'propspec' consists of keyword args propname={nodeid:1,}
'propspec' consists of keyword args propname={nodeid:1,}
def find(self, **propspec): """Get the ids of nodes in this class which link to the given nodes.
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
def get(self, name, default=None):
def get(self, name, default=None):
def get(self, name, default=None): if self.has_key(name): return self[name] else: return default
f721476e668cd96aa0e9ebeac1df0a1750c12aad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f721476e668cd96aa0e9ebeac1df0a1750c12aad/hyperdb.py
if (cookie.has_key('roundup_user_2') and cookie['roundup_user_2'].value != 'deleted'):
if (cookie.has_key(self.cookie_name) and cookie[self.cookie_name].value != 'deleted'):
def determine_user(self): ''' Determine who the user is ''' # determine the uid to use self.opendb('admin') # clean age sessions self.clean_sessions() # make sure we have the session Class sessions = self.db.sessions
4d4a6e6ca055528d188bbc7f645ade423a905185 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4d4a6e6ca055528d188bbc7f645ade423a905185/client.py
self.session = cookie['roundup_user_2'].value
self.session = cookie[self.cookie_name].value
def determine_user(self): ''' Determine who the user is ''' # determine the uid to use self.opendb('admin') # clean age sessions self.clean_sessions() # make sure we have the session Class sessions = self.db.sessions
4d4a6e6ca055528d188bbc7f645ade423a905185 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4d4a6e6ca055528d188bbc7f645ade423a905185/client.py
'roundup_user_2=%s; expires=%s; Path=%s;'%(self.session, expire, self.cookie_path)
'%s=%s; expires=%s; Path=%s;'%(self.cookie_name, self.session, expire, self.cookie_path)
def set_cookie(self, user): ''' Set up a session cookie for the user and store away the user's login info against the session. ''' # TODO generate a much, much stronger session key ;) self.session = binascii.b2a_base64(repr(random.random())).strip()
4d4a6e6ca055528d188bbc7f645ade423a905185 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4d4a6e6ca055528d188bbc7f645ade423a905185/client.py
'roundup_user_2=deleted; Max-Age=0; expires=%s; Path=%s;'%(now, self.cookie_path)
'%s=deleted; Max-Age=0; expires=%s; Path=%s;'%(self.cookie_name, now, self.cookie_path)
def logout_action(self): ''' Make us really anonymous - nuke the cookie too ''' # log us out self.make_user_anonymous()
4d4a6e6ca055528d188bbc7f645ade423a905185 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4d4a6e6ca055528d188bbc7f645ade423a905185/client.py
else: cell.append(' <a href="%s%s">%s</a>,\n'%( classname, linkid, label))
label = None if label is not None: cell.append('%s: <a href="%s%s">%s</a>\n'%( classname, classname, args[k], label))
def do_history(self, direction='descending'): ''' list the history of the item
7126dff138470d997255132f11dacff27c6f037b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7126dff138470d997255132f11dacff27c6f037b/htmltemplate.py
print (sql, args)
def filter(self, search_matches, filterspec, sort, group): ''' 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
bd246529c42ed93d000792478e8fd75f1da0fc0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/bd246529c42ed93d000792478e8fd75f1da0fc0b/rdbms_common.py
print l
def filter(self, search_matches, filterspec, sort, group): ''' 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
bd246529c42ed93d000792478e8fd75f1da0fc0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/bd246529c42ed93d000792478e8fd75f1da0fc0b/rdbms_common.py
(FloatNumberOption, "timezone", "0", "Numeric timezone offset used when users do not choose their own\n" "in their settings.",
(TimezoneOption, "timezone", "UTC", "Default timezone offset," " applied when user's timezone is not set.",
def _value2str(self, value): if value is None: return self.null_strings[0] else: return value
39ce8a59efaaea583a3179fffbef9e1b52dfb1ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/39ce8a59efaaea583a3179fffbef9e1b52dfb1ad/configuration.py
<table width="100%%" bgcolor="
<table width="100%%" bgcolor="white" cellspacing=0 cellpadding=0 border=0>
def linereader(file=file, lnum=[lnum]): line = linecache.getline(file, lnum[0]) lnum[0] = lnum[0] + 1 return line
f3cf662078a4f0f74dff19025a3330732e5867b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f3cf662078a4f0f74dff19025a3330732e5867b8/cgitb.py
where.append(s)
where.append('(' + s +')')
def find(self, **propspec): '''Get the ids of nodes in this class which link to the given nodes.
8abcf2fcb72a8ff60bab69bd7ca3c519f051a883 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8abcf2fcb72a8ff60bab69bd7ca3c519f051a883/rdbms_common.py
where.append(' or '.join(["_%s._%s LIKE '%s'"%(cn, k, s) for s in v]))
where.append('(' +' or '.join(["_%s._%s LIKE '%s'"%(cn, k, s) for s in v]) +')')
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
8abcf2fcb72a8ff60bab69bd7ca3c519f051a883 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8abcf2fcb72a8ff60bab69bd7ca3c519f051a883/rdbms_common.py
where.append('(_%s._%s in (%s))'%(cn, k, s))
l.append('(_%s._%s in (%s))'%(cn, k, s))
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
8abcf2fcb72a8ff60bab69bd7ca3c519f051a883 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8abcf2fcb72a8ff60bab69bd7ca3c519f051a883/rdbms_common.py
where.append(' or '.join(l))
where.append('(' + ' or '.join(l) +')')
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
8abcf2fcb72a8ff60bab69bd7ca3c519f051a883 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8abcf2fcb72a8ff60bab69bd7ca3c519f051a883/rdbms_common.py
writer.addheader('Date', time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()))
writer.addheader('Date', formatdate(time.gmtime()))
def get_standard_message(self, to, subject, author=None): '''Form a standard email message from Roundup.
92ac0c443386f0fafefad2ec786e43d61f1373c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/92ac0c443386f0fafefad2ec786e43d61f1373c6/mailer.py
def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)')):
def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)'), mc=re.compile(r'(</?(.*?)>)')):
def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)')): ''' Determine the context of this page from the URL:
e4a893248de986ae5d4217a5ba5af3d10b8f9b01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e4a893248de986ae5d4217a5ba5af3d10b8f9b01/client.py
reg = self.addPermission(name="Register Web", description="User may register through the web") reg = self.addPermission(name="Register Email", description="User may register through the email")
def __init__(self, db): ''' Initialise the permission and role classes, and add in the base roles (for admin user). ''' self.db = weakref.proxy(db) # use a weak ref to avoid circularity
da9e988092f2322a93ac99e4a65e8ef4727c789d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/da9e988092f2322a93ac99e4a65e8ef4727c789d/security.py
def addPermissionToRole(self, rolename, permission): ''' Add the permission to the role's permission list.
da9e988092f2322a93ac99e4a65e8ef4727c789d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/da9e988092f2322a93ac99e4a65e8ef4727c789d/security.py
m.append("New submission from %s%s:"%(authname, authaddr))
m.append(_("New submission from %(authname)s%(authaddr)s:") % locals())
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
87ff7277acb0a7cd845d441009892917cacbb9d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/87ff7277acb0a7cd845d441009892917cacbb9d9/roundupdb.py
m.append("%s%s added the comment:"%(authname, authaddr)) else: m.append("System message:")
m.append(_("%(authname)%(authaddr)s added the comment:") % locals()) else: m.append(_("System message:"))
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
87ff7277acb0a7cd845d441009892917cacbb9d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/87ff7277acb0a7cd845d441009892917cacbb9d9/roundupdb.py
return 0
return 0
def sendEmail(self, to, subject, content): # send email to the user's email address message = StringIO.StringIO() writer = MimeWriter.MimeWriter(message) tracker_name = self.db.config.TRACKER_NAME writer.addheader('Subject', encode_header(subject)) writer.addheader('To', to) writer.addheader('From', roundupdb.straddr((...
287884f4726421f86442200f01c5a2c9aaa13893 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/287884f4726421f86442200f01c5a2c9aaa13893/client.py
raise Redirect, '%suser%s?@ok_message=%s&@template=%s'%(self.base, self.userid, urllib.quote(message), urllib.quote(self.template))
raise Redirect, '%suser%s?@ok_message=%s'%(self.base, self.userid, urllib.quote(message))
def confRegoAction(self): ''' Grab the OTK, use it to load up the new user details ''' # pull the rego information out of the otk database otk = self.form['otk'].value props = self.db.otks.getall(otk) for propname, proptype in self.db.user.getprops().items(): value = props.get(propname, None) if value is None: pass eli...
287884f4726421f86442200f01c5a2c9aaa13893 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/287884f4726421f86442200f01c5a2c9aaa13893/client.py
''' If the issue is currently 'unread', 'resolved' or 'done-cbb', then set it to 'chatting'
''' If the issue is currently 'unread', 'resolved', 'done-cbb' or None, then set it to 'chatting'
def chatty(db, cl, nodeid, newvalues): ''' If the issue is currently 'unread', 'resolved' or 'done-cbb', then set it to 'chatting' ''' # don't fire if there's no new message (ie. chat) if not newvalues.has_key('messages'): return if newvalues['messages'] == cl.get(nodeid, 'messages'): return # get the chatting state I...
31e73a43378d58f23a856b5ddb4a54479869fc8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/31e73a43378d58f23a856b5ddb4a54479869fc8e/statusauditor.py
if current_status in fromstates:
if current_status in fromstates + [None]:
def chatty(db, cl, nodeid, newvalues): ''' If the issue is currently 'unread', 'resolved' or 'done-cbb', then set it to 'chatting' ''' # don't fire if there's no new message (ie. chat) if not newvalues.has_key('messages'): return if newvalues['messages'] == cl.get(nodeid, 'messages'): return # get the chatting state I...
31e73a43378d58f23a856b5ddb4a54479869fc8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/31e73a43378d58f23a856b5ddb4a54479869fc8e/statusauditor.py
config["MAIL_TLS_CERFILE"])
config["MAIL_TLS_CERTFILE"])
def __init__(self, config):
88ed767e87d7e1904f2c4b8fafb4c323dae79423 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/88ed767e87d7e1904f2c4b8fafb4c323dae79423/mailer.py
(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d(\.\d+)?)
(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d?(\.\d+)?)
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>.+)? ...
ba7e589e2c5c6aeb9bd311d50693f075db0379dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ba7e589e2c5c6aeb9bd311d50693f075db0379dd/date.py
return '%4d%02d%02d%02d%02d%02d'%(self.year, self.month,
return '%4d%02d%02d%02d%02d%f'%(self.year, self.month,
def serialise(self): return '%4d%02d%02d%02d%02d%02d'%(self.year, self.month, self.day, self.hour, self.minute, self.second)
ba7e589e2c5c6aeb9bd311d50693f075db0379dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ba7e589e2c5c6aeb9bd311d50693f075db0379dd/date.py
def labelprop(self):
def labelprop(self, default_to_id=0):
def labelprop(self): return 'key'
57bf223c8d9229910faa86b92f75231f87b019d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57bf223c8d9229910faa86b92f75231f87b019d8/test_htmltemplate.py
self.header({'Set-Cookie': 'roundup_user="%s"; expires="%s"; Path="%s";' % (
self.header({'Set-Cookie': 'roundup_user=%s; expires=%s; Path=%s;' % (
def set_cookie(self, user, password): # construct the cookie user = binascii.b2a_base64('%s:%s'%(user, password)).strip() expire = Cookie._getdate(86400*365) path = '/'.join((self.env['SCRIPT_NAME'], self.env['INSTANCE_NAME'])) self.header({'Set-Cookie': 'roundup_user="%s"; expires="%s"; Path="%s";' % ( user, expire, p...
840711450a17a487dedb2c002794e3833b9f747b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/840711450a17a487dedb2c002794e3833b9f747b/cgi_client.py
'roundup_user=deleted; Max-Age=0; expires="%s"; Path="%s";'%(now,
'roundup_user=deleted; Max-Age=0; expires=%s; Path=%s;'%(now,
def logout(self, message=None): self.make_user_anonymous() # construct the logout cookie now = Cookie._getdate() path = '/'.join((self.env['SCRIPT_NAME'], self.env['INSTANCE_NAME'])) self.header({'Set-Cookie': 'roundup_user=deleted; Max-Age=0; expires="%s"; Path="%s";'%(now, path)}) return self.login()
840711450a17a487dedb2c002794e3833b9f747b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/840711450a17a487dedb2c002794e3833b9f747b/cgi_client.py
value = value.get_tuple()
if not isinstance(value, type('')): value = value.get_tuple()
def export_journals(self): '''Export a class's journal - generate a list of lists of CSV-able data:
a112b5d8089f1e02aa48a7378c8316fc140f3a12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a112b5d8089f1e02aa48a7378c8316fc140f3a12/back_anydbm.py
' 1 January 2000')
' 1 %s 2000' % time.strftime('%B', time.localtime(0)))
def testReldate_date(self): self.assertEqual(self.tf.do_reldate('date'), '- 2y 1m') self.assertEqual(self.tf.do_reldate('date', pretty=1), ' 1 January 2000')
d9cc36f0bebaaa796ab9335afc44369c78995d50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d9cc36f0bebaaa796ab9335afc44369c78995d50/test_htmltemplate.py
'nosy': ['1'], 'deadline': date.Date('2004-03-08')}):
'nosy': ['1'], 'deadline': date.Date('2004-03-08'), 'files': [f]}):
def filteringSetup(self): for user in ( {'username': 'bleep', 'age': 1}, {'username': 'blop', 'age': 1.5}, {'username': 'blorp', 'age': 2}): self.db.user.create(**user) iss = self.db.issue for issue in ( {'title': 'issue one', 'status': '2', 'assignedto': '1', 'foo': date.Interval('1:10'), 'priority': '3', 'deadline': ...
471951b114edf897e71e6d0184c67c2fd2a3fbda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/471951b114edf897e71e6d0184c67c2fd2a3fbda/db_test_base.py
file_content = ''.join([chr(i) for i in range(255)]) self.db.file.create(content=file_content)
def filteringSetup(self): for user in ( {'username': 'bleep', 'age': 1}, {'username': 'blop', 'age': 1.5}, {'username': 'blorp', 'age': 2}): self.db.user.create(**user) iss = self.db.issue for issue in ( {'title': 'issue one', 'status': '2', 'assignedto': '1', 'foo': date.Interval('1:10'), 'priority': '3', 'deadline': ...
471951b114edf897e71e6d0184c67c2fd2a3fbda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/471951b114edf897e71e6d0184c67c2fd2a3fbda/db_test_base.py
''' % cfg["TRACKER_WEB"]
''' % url
def run_demo(home): """Run the demo tracker installed in ``home``""" roundup_server.RoundupRequestHandler.TRACKER_HOMES = {'demo': home} cfg = configuration.CoreConfig(home) success_message = '''Server running - connect to: %s
9de476f1992f62a3ce5b3fb83b2dc465a1135980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9de476f1992f62a3ce5b3fb83b2dc465a1135980/demo.py
roundup_server.run(success_message=success_message)
roundup_server.run(port=port, success_message=success_message)
def run_demo(home): """Run the demo tracker installed in ``home``""" roundup_server.RoundupRequestHandler.TRACKER_HOMES = {'demo': home} cfg = configuration.CoreConfig(home) success_message = '''Server running - connect to: %s
9de476f1992f62a3ce5b3fb83b2dc465a1135980 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9de476f1992f62a3ce5b3fb83b2dc465a1135980/demo.py
if self._value:
if self._value and not isinstance(self._value, (str, unicode)):
def __init__(self, client, classname, nodeid, prop, name, value, anonymous=0): HTMLProperty.__init__(self, client, classname, nodeid, prop, name, value, anonymous) if self._value: self._value.setTranslator(self._client.translator)
ee719d9dea36b74f758d5e1dcda165445a5ede84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/ee719d9dea36b74f758d5e1dcda165445a5ede84/templating.py
self.classname = None
self.classname = self.nodeid = None
def inner_main(self): ''' Process a request.
9e4015809be12b70882e3ac4b5bb2e2982b6acae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9e4015809be12b70882e3ac4b5bb2e2982b6acae/client.py
if ok_message: self.ok_message.append(ok_message) if error_message: self.error_message.append(error_message)
def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)')): """ Determine the context of this page from the URL:
9e4015809be12b70882e3ac4b5bb2e2982b6acae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9e4015809be12b70882e3ac4b5bb2e2982b6acae/client.py
if not pops.has_key('type'):
if not props.has_key('type'):
def serve_file(self, designator, dre=re.compile(r'([^\d]+)(\d+)')): ''' Serve the file from the content property of the designated item. ''' m = dre.match(str(designator)) if not m: raise NotFound, str(designator) classname, nodeid = m.group(1), m.group(2)
9e4015809be12b70882e3ac4b5bb2e2982b6acae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9e4015809be12b70882e3ac4b5bb2e2982b6acae/client.py
if not pops.has_key('content'):
if not props.has_key('content'):
def serve_file(self, designator, dre=re.compile(r'([^\d]+)(\d+)')): ''' Serve the file from the content property of the designated item. ''' m = dre.match(str(designator)) if not m: raise NotFound, str(designator) classname, nodeid = m.group(1), m.group(2)
9e4015809be12b70882e3ac4b5bb2e2982b6acae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9e4015809be12b70882e3ac4b5bb2e2982b6acae/client.py
pt = Templates(self.instance.config.TEMPLATES).get(name, extension)
pt = templating.Templates(self.instance.config.TEMPLATES).get(name, extension)
def renderContext(self): ''' Return a PageTemplate for the named page ''' name = self.classname extension = self.template pt = Templates(self.instance.config.TEMPLATES).get(name, extension)
9e4015809be12b70882e3ac4b5bb2e2982b6acae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9e4015809be12b70882e3ac4b5bb2e2982b6acae/client.py
except NoTemplate, message:
except templating.NoTemplate, message:
def renderContext(self): ''' Return a PageTemplate for the named page ''' name = self.classname extension = self.template pt = Templates(self.instance.config.TEMPLATES).get(name, extension)
9e4015809be12b70882e3ac4b5bb2e2982b6acae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9e4015809be12b70882e3ac4b5bb2e2982b6acae/client.py
req = HTMLRequest(self)
req = templating.HTMLRequest(self)
def searchAction(self, wcre=re.compile(r'[\s,]+')): ''' Mangle some of the form variables.
9e4015809be12b70882e3ac4b5bb2e2982b6acae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/9e4015809be12b70882e3ac4b5bb2e2982b6acae/client.py
class RoundupService(win32serviceutil.ServiceFramework, RoundupHTTPServer):
class RoundupService(win32serviceutil.ServiceFramework, BaseHTTPServer.HTTPServer):
def error(): exc_type, exc_value = sys.exc_info()[:2] return _('Error: %s: %s' % (exc_type, exc_value))
c2874a130cae085f157621d4ed30e257b24eed52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c2874a130cae085f157621d4ed30e257b24eed52/roundup_server.py
RoundupHTTPServer.__init__(self, self.address,
BaseHTTPServer.HTTPServer.__init__(self, self.address,
def __init__(self, args): # redirect stdout/stderr to our logfile if LOGFILE: # appending, unbuffered sys.stdout = sys.stderr = open(LOGFILE, 'a', 0) win32serviceutil.ServiceFramework.__init__(self, args) RoundupHTTPServer.__init__(self, self.address, RoundupRequestHandler)
c2874a130cae085f157621d4ed30e257b24eed52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c2874a130cae085f157621d4ed30e257b24eed52/roundup_server.py
-l: sets a filename to log to (instead of stdout)
-l: sets a filename to log to (instead of stderr / stdout)
def usage(message=''): if RoundupService: win = ''' -c: Windows Service options. If you want to run the server as a Windows Service, you must configure the rest of the options by changing the constants of this program. You will at least configure one tracker in the TRACKER_HOMES variable. This option is mutually exc...
c2874a130cae085f157621d4ed30e257b24eed52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c2874a130cae085f157621d4ed30e257b24eed52/roundup_server.py
httpd = RoundupHTTPServer(address, RoundupRequestHandler)
httpd = BaseHTTPServer.HTTPServer(address, RoundupRequestHandler)
def run(port=PORT, success_message=None): ''' Script entry point - handle args and figure out what to to. ''' # time out after a minute if we can import socket if hasattr(socket, 'setdefaulttimeout'): socket.setdefaulttimeout(60) hostname = HOSTNAME pidfile = PIDFILE logfile = LOGFILE user = ROUNDUP_USER group = ROUND...
c2874a130cae085f157621d4ed30e257b24eed52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c2874a130cae085f157621d4ed30e257b24eed52/roundup_server.py
self.klass, self.property, self.check)
self.klass, self.properties, self.check)
def __repr__(self): return '<Permission 0x%x %r,%r,%r,%r>'%(id(self), self.name, self.klass, self.property, self.check)
298172c313578d9657a73bdeeb650cc7f1dd5d6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/298172c313578d9657a73bdeeb650cc7f1dd5d6c/security.py
accompanied by 'classname' (thus in the second case a Permission
accompanied by 'classname' (thus in the second case a Permission
def addPermissionToRole(self, rolename, permission, classname=None): ''' Add the permission to the role's permission list.
298172c313578d9657a73bdeeb650cc7f1dd5d6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/298172c313578d9657a73bdeeb650cc7f1dd5d6c/security.py
def login(self, message=None):
def login(self, message=None, newuser_form=None):
def login(self, message=None): self.pagehead('Login to roundup', message) self.write('''
085d354e85b8a858c41fdab4c799f10cf069bdd2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/085d354e85b8a858c41fdab4c799f10cf069bdd2/cgi_client.py
<td><input name="realname"></td></tr>
<td><input name="realname" value="%(realname)s"></td></tr>
def login(self, message=None): self.pagehead('Login to roundup', message) self.write('''
085d354e85b8a858c41fdab4c799f10cf069bdd2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/085d354e85b8a858c41fdab4c799f10cf069bdd2/cgi_client.py