rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
. Multilink values are printed as lists of node designators joined by commas. When given as an argument, node designators and key strings are both accepted; an empty string, a single node, or a list of nodes joined by commas is accepted. | . Multilink values are printed as lists of node designators joined by commas. When given as an argument, node designators and key strings are both accepted; an empty string, a single node, or a list of nodes joined by commas is accepted. | def help_all(self): print _(''' | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
valuu must contain a quote character, it must be backslash-quoted or inside | value must contain a quote character, it must be backslash-quoted or inside | def help_all(self): print _(''' | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
Roch\'e Compaan (2 tokens: Roch'e Compaan) | Roch\\'e Compaan (2 tokens: Roch'e Compaan) | def help_all(self): print _(''' | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
\\ (1 token: \) \n\r\t (1 token: a newline, carriage-return and tab) | \\\\ (1 token: \\) \\n\\r\\t (1 token: a newline, carriage-return and tab) | def help_all(self): print _(''' | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
The command will prompt for the tracker home directory (if not supplied through TRACKER_HOME or the -i option). The template, backend and admin password may be specified on the command-line as arguments, in that order. | The command will prompt for the tracker home directory (if not supplied through TRACKER_HOME or the -i option). The template, backend and admin password may be specified on the command-line as arguments, in that order. | def do_install(self, tracker_home, args): ""'''Usage: install [template [backend [admin password]]] Install a new Roundup tracker. | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
If you wish to modify the default schema, you should also edit the database initialisation file: | If you wish to modify the default schema, you should also edit the database initialisation file: | def do_install(self, tracker_home, args): ""'''Usage: install [template [backend [admin password]]] Install a new Roundup tracker. | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
Retrieves the property value of the nodes specified by the designators. | Retrieves the property value of the nodes specified by the designators. | def do_get(self, args): ""'''Usage: get property designator[,designator]* Get the given property of one or more designator(s). | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
given. If the value is missing (ie. "property=") then the property is un-set. If the property is a multilink, you specify the linked ids for the multilink as comma-separated numbers (ie "1,2,3"). | given. If the value is missing (ie. "property=") then the property is un-set. If the property is a multilink, you specify the linked ids for the multilink as comma-separated numbers (ie "1,2,3"). | def do_set(self, args, pwre = re.compile(r'{(\w+)}(.+)')): ""'''Usage: set items property=value property=value ... Set the given properties of one or more items(s). | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
Find the nodes of the given class with a given link property value. The value may be either the nodeid of the linked node, or its key value. | Find the nodes of the given class with a given link property value. The value may be either the nodeid of the linked node, or its key value. | def do_find(self, args): ""'''Usage: find classname propname=value ... Find the nodes of the given class with a given link property value. | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
specified, the "label" property is used. The label property is tried in order: the key, "name", "title" and then the first property, alphabetically. With -c, -S or -s print a list of item id's if no property specified. If property specified, print list of that property for every class instance. | specified, the "label" property is used. The label property is tried in order: the key, "name", "title" and then the first property, alphabetically. With -c, -S or -s print a list of item id's if no property specified. If property specified, print list of that property for every class instance. | def do_list(self, args): ""'''Usage: list classname [property] List the instances of a class. | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
specified, all properties are displayed. By default, the column widths are the width of the largest value. The width may be explicitly defined by defining the property as "name:width". For example:: | specified, all properties are displayed. By default, the column widths are the width of the largest value. The width may be explicitly defined by defining the property as "name:width". For example:: | def do_table(self, args): ""'''Usage: table classname [property[,property]*] List the instances of a class in tabular form. | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
This action indicates that a particular node is not to be retrieved by the list or find commands, and its key value may be re-used. | This action indicates that a particular node is not to be retrieved by the list or find commands, and its key value may be re-used. | def do_retire(self, args): ""'''Usage: retire designator[,designator]* Retire the node specified by designator. | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
Import a database from the directory containing CSV files, two per class to import. | Import a database from the directory containing CSV files, two per class to import. | def do_import(self, args): ""'''Usage: import import_dir Import a database from the directory containing CSV files, two per class to import. | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
This will re-generate the search indexes for a tracker. This will typically happen automatically. | This will re-generate the search indexes for a tracker. This will typically happen automatically. | def do_reindex(self, args): ""'''Usage: reindex Re-generate a tracker's search indexes. | eb552e06b9df2d7c4092851c8b0de350e72c3daf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/eb552e06b9df2d7c4092851c8b0de350e72c3daf/admin.py |
key, entry, self.properties[key].classname) | k, entry, self.properties[k].classname) | def filter(self, filterspec, sort, group, num_re = re.compile('^\d+$')): ''' 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 ''' cn = self.classname | 4ab653ad5fcdbe27263cb4841d4a8d3de815d69f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4ab653ad5fcdbe27263cb4841d4a8d3de815d69f/hyperdb.py |
key, entry, self.properties[key].classname) | k, entry, self.properties[k].classname) | def filter(self, filterspec, sort, group, num_re = re.compile('^\d+$')): ''' 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 ''' cn = self.classname | 4ab653ad5fcdbe27263cb4841d4a8d3de815d69f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4ab653ad5fcdbe27263cb4841d4a8d3de815d69f/hyperdb.py |
def Choice(name, *options): cl = Class(db, name, name=hyperdb.String(), order=hyperdb.String()) for i in range(len(options)): cl.create(name=option[i], order=i) return hyperdb.Link(name) | 4ab653ad5fcdbe27263cb4841d4a8d3de815d69f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4ab653ad5fcdbe27263cb4841d4a8d3de815d69f/hyperdb.py | ||
if not fuzzy and str: | if not fuzzy and str and not str.startswith('\0'): | def add(id, str, fuzzy): "Add a non-fuzzy translation to the dictionary." global MESSAGES if not fuzzy and str: MESSAGES[id] = str | 4a4f66801da281dbb0f51b92fdb953c4b45dbad4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4a4f66801da281dbb0f51b92fdb953c4b45dbad4/msgfmt.py |
if len(msgstr) > 0: msgstr += '\0' | def make(filename, outfile): ID = 1 STR = 2 # Compute .mo name from .po name and arguments if filename.endswith('.po'): infile = filename else: infile = filename + '.po' if outfile is None: outfile = os.path.splitext(infile)[0] + '.mo' try: lines = open(infile).readlines() except IOError, msg: print >> sys.stderr, ms... | 4a4f66801da281dbb0f51b92fdb953c4b45dbad4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4a4f66801da281dbb0f51b92fdb953c4b45dbad4/msgfmt.py | |
def create_check(self): ''' Raise the Unauthorised exception if the user's not permitted to create items of this class. ''' if not self.is_create_ok(): raise Unauthorised("create", self._classname, translator=self._client.translator) | def create_check(self): ''' Raise the Unauthorised exception if the user's not permitted to create items of this class. ''' if not self.is_create_ok(): raise Unauthorised("create", self._classname, translator=self._client.translator) | 255019908dee8088372ec8e25ae2176f9dacef12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/255019908dee8088372ec8e25ae2176f9dacef12/templating.py | |
return self.is_create_ok() | return self.is_edit_ok() | def is_view_ok(self): ''' Is the user allowed to View the current class? ''' if self._db.security.hasPermission('View', self._client.userid, self._classname): return 1 return self.is_create_ok() | 255019908dee8088372ec8e25ae2176f9dacef12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/255019908dee8088372ec8e25ae2176f9dacef12/templating.py |
return self.is_view_ok() and not self.is_create_ok() | return self.is_view_ok() and not self.is_edit_ok() | def is_only_view_ok(self): ''' Is the user only allowed to View (ie. not Create) the current class? ''' return self.is_view_ok() and not self.is_create_ok() | 255019908dee8088372ec8e25ae2176f9dacef12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/255019908dee8088372ec8e25ae2176f9dacef12/templating.py |
interval = now - okts.get(sessid, '__time') | interval = now - otks.get(sessid, '__time') | def clean_sessions(self): ''' Age sessions, remove when they haven't been used for a week. Do it only once an hour. | 329d912a16b2a6279a615d80e1d1bd3811cb049a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/329d912a16b2a6279a615d80e1d1bd3811cb049a/client.py |
otk.destroy(sessid) | otks.destroy(sessid) | def clean_sessions(self): ''' Age sessions, remove when they haven't been used for a week. Do it only once an hour. | 329d912a16b2a6279a615d80e1d1bd3811cb049a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/329d912a16b2a6279a615d80e1d1bd3811cb049a/client.py |
try: smtp = smtplib.SMTP(self.db.config.MAILHOST) smtp.sendmail(self.db.config.ADMIN_EMAIL, [to], message.getvalue()) except socket.error, value: self.error_message.append("Error: couldn't send email: " "mailhost %s"%value) return 0 except smtplib.SMTPException, value: self.error_message.append("Error: couldn't send... | if SENDMAILDEBUG: open(SENDMAILDEBUG, 'a').write('FROM: %s\nTO: %s\n%s\n'%( self.db.config.ADMIN_EMAIL, ', '.join(to),message.getvalue())) else: try: smtp = smtplib.SMTP(self.db.config.MAILHOST) smtp.sendmail(self.db.config.ADMIN_EMAIL, [to], message.getvalue()) except socket.error, value: self.error_message.append... | 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((... | 329d912a16b2a6279a615d80e1d1bd3811cb049a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/329d912a16b2a6279a615d80e1d1bd3811cb049a/client.py |
self.db.addnode(self.classname, newid, d) | def import_list(self, propnames, proplist): ''' Import a node - all information including "id" is present and should not be sanity checked. Triggers are not triggered. The journal should be initialised using the "creator" and "created" information. | 01f0ef6c6dae68879d65d11a3bdae2c995f2fccc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/01f0ef6c6dae68879d65d11a3bdae2c995f2fccc/rdbms_common.py | |
from roundup.backends import anydbm | backend = backends.get_backend('anydbm') | def setUp(self): from roundup.backends import anydbm # remove previous test, ignore errors if os.path.exists(config.DATABASE): shutil.rmtree(config.DATABASE) os.makedirs(config.DATABASE + '/files') self.db = anydbm.Database(config, 'admin') setupSchema(self.db, 1, anydbm) | 657819e594b4ea6caf657857b0fb8df8939109a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/657819e594b4ea6caf657857b0fb8df8939109a9/test_security.py |
self.db = anydbm.Database(config, 'admin') setupSchema(self.db, 1, anydbm) | self.db = backend.Database(config, 'admin') setupSchema(self.db, 1, backend) | def setUp(self): from roundup.backends import anydbm # remove previous test, ignore errors if os.path.exists(config.DATABASE): shutil.rmtree(config.DATABASE) os.makedirs(config.DATABASE + '/files') self.db = anydbm.Database(config, 'admin') setupSchema(self.db, 1, anydbm) | 657819e594b4ea6caf657857b0fb8df8939109a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/657819e594b4ea6caf657857b0fb8df8939109a9/test_security.py |
def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(PermissionTest)) return suite | 657819e594b4ea6caf657857b0fb8df8939109a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/657819e594b4ea6caf657857b0fb8df8939109a9/test_security.py | ||
else: propvalues[key] = None | def create_inner(self, **propvalues): ''' Called by create, in-between the audit and react calls. ''' if propvalues.has_key('id'): raise KeyError, '"id" is reserved' | a8acbbb5a688b3fe6b2804f57ef870262e75beda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a8acbbb5a688b3fe6b2804f57ef870262e75beda/back_anydbm.py | |
self.db.indexer.add_text((self.classname, newid, 'content'), content, mime_type) | def create(self, **propvalues): ''' Snarf the "content" propvalue and store in a file ''' # we need to fire the auditors now, or the content property won't # be in propvalues for the auditors to play with self.fireAuditors('create', None, propvalues) | a8acbbb5a688b3fe6b2804f57ef870262e75beda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a8acbbb5a688b3fe6b2804f57ef870262e75beda/back_anydbm.py | |
self.assertEqual(self.dex.find(['world']), {2: 'testing2', 1: 'testing1'}) self.assertEqual(self.dex.find(['blah']), {2: 'testing2'}) self.assertEqual(self.dex.find(['blah', 'hello']), {}) | self.assertEqual(self.dex.find(['world']), ['testing1', 'testing2']) self.assertEqual(self.dex.find(['blah']), ['testing2']) self.assertEqual(self.dex.find(['blah', 'hello']), []) | def test_basics(self): self.dex.add_text('testing1', 'a the hello world') self.assertEqual(self.dex.words, {'HELLO': {1: 1}, 'WORLD': {1: 1}}) self.dex.add_text('testing2', 'blah blah the world') self.assertEqual(self.dex.words, {'BLAH': {2: 2}, 'HELLO': {1: 1}, 'WORLD': {2: 1, 1: 1}}) self.assertEqual(self.dex.find(['... | f28496f5dfe23961a6278cc87324965deb6fbe45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f28496f5dfe23961a6278cc87324965deb6fbe45/test_indexer.py |
''' Age sessions, remove when they haven't been used for a week. | """Age sessions, remove when they haven't been used for a week. | def clean_sessions(self): ''' Age sessions, remove when they haven't been used for a week. Do it only once an hour. | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
Do it only once an hour. Note: also cleans One Time Keys, and other "session" based stuff. ''' | Do it only once an hour. Note: also cleans One Time Keys, and other "session" based stuff. """ | def clean_sessions(self): ''' Age sessions, remove when they haven't been used for a week. Do it only once an hour. | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
''' Determine who the user is | '''Determine who the user is. | def determine_user(self): ''' Determine who the user is ''' # open the database as admin self.opendb('admin') | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
''' Determine the context of this page from the URL: | """ Determine the context of this page from the URL: | def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)')): ''' Determine the context of this page from the URL: | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
''' | """ | def determine_context(self, dre=re.compile(r'([^\d]+)(\d+)')): ''' Determine the context of this page from the URL: | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
''' Set up a session cookie for the user and store away the user's login info against the session. ''' | """Set up a session cookie for the user. Also store away the user's login info against the session. """ | 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() | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
self.ok_message.append('Password reset and email sent to %s'%address) | self.ok_message.append('Password reset and email sent to %s' % address) | def passResetAction(self): ''' Handle password reset requests. | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
''' Determine whether the user has permission to edit this item. Base behaviour is to check the user can edit this class. If we're editing the "user" class, users are allowed to edit their own details. Unless it's the "roles" property, which requires the special Permission "Web Roles". ''' | """Determine whether the user has permission to edit this item. Base behaviour is to check the user can edit this class. If we're editing the"user" class, users are allowed to edit their own details. Unless it's the "roles" property, which requires the special Permission "Web Roles". """ | def editItemPermission(self, props): ''' Determine whether the user has permission to edit this item. | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
''' Performs an edit of all of a class' items in one go. | """ Performs an edit of all of a class' items in one go. | def editCSVAction(self): ''' Performs an edit of all of a class' items in one go. | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
''' | """ | def editCSVAction(self): ''' Performs an edit of all of a class' items in one go. | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
''' Item properties and their values are edited with html FORM | """ Item properties and their values are edited with html FORM | def parsePropsFromForm(self, num_re=re.compile('^\d+$')): ''' Item properties and their values are edited with html FORM variables and their values. You can: | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
''' | """ | def parsePropsFromForm(self, num_re=re.compile('^\d+$')): ''' Item properties and their values are edited with html FORM variables and their values. You can: | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
if not props.get('content', ''): del all_props[(cn, id)] | if not props.get('content', ''): del all_props[(cn, id)] | propdef = all_propdef[cn] | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
raise FormError, _('File is empty') | raise FormError, _('File is empty') | propdef = all_propdef[cn] | f11907437836b035b89a935141d5777def9d1278 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f11907437836b035b89a935141d5777def9d1278/client.py |
def get_backend(name): '''Get a specific backend by name.''' vars = globals() # if requested backend has been imported yet, return current instance if vars.has_key(name): return vars[name] # import the backend module module_name = 'back_%s' % name try: module = __import__(module_name, vars) except: # import failed, but... | 80b6c8e93ffaa0d9768f0fe55b7e5eb1253d2b10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/80b6c8e93ffaa0d9768f0fe55b7e5eb1253d2b10/__init__.py | ||
def inner_run_cgi(self): ''' This is the inner part of the CGI handling ''' rest = self.path | 209027ff5265309bf666575800a3eef86a5849a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/209027ff5265309bf666575800a3eef86a5849a2/roundup_server.py | ||
try: import win32serviceutil except: RoundupService = None else: import win32service import win32event from win32event import * from win32file import * SvcShutdown = "ServiceShutdown" class RoundupService(win32serviceutil.ServiceFramework, BaseHTTPServer.HTTPServer): ''' A Roundup standalone server for Win32 by Ewou... | def address_string(self): if self.LOG_IPADDRESS: return self.client_address[0] else: host, port = self.client_address return socket.getfqdn(host) | 209027ff5265309bf666575800a3eef86a5849a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/209027ff5265309bf666575800a3eef86a5849a2/roundup_server.py | |
address = (hostname, port) | def run(): ''' 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 = '' port = 8080 pidfile = None logfile = None try: # handle the command-line args try: optlist, args = getopt.... | 209027ff5265309bf666575800a3eef86a5849a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/209027ff5265309bf666575800a3eef86a5849a2/roundup_server.py | |
if RoundupService: RoundupService.address = address return win32serviceutil.HandleCommandLine(RoundupService) elif not hasattr(os, 'fork'): | if not hasattr(os, 'fork'): | def run(): ''' 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 = '' port = 8080 pidfile = None logfile = None try: # handle the command-line args try: optlist, args = getopt.... | 209027ff5265309bf666575800a3eef86a5849a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/209027ff5265309bf666575800a3eef86a5849a2/roundup_server.py |
httpd = BaseHTTPServer.HTTPServer(address, RoundupRequestHandler) | def run(): ''' 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 = '' port = 8080 pidfile = None logfile = None try: # handle the command-line args try: optlist, args = getopt.... | 209027ff5265309bf666575800a3eef86a5849a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/209027ff5265309bf666575800a3eef86a5849a2/roundup_server.py | |
init.initialise(self.dirname, 'sekrit') self.instance = instance.open(self.dirname) | self.instance = tracker = instance.open(self.dirname) if tracker.exists(): tracker.nuke() tracker.init(password.Password('sekrit')) | def setUp(self): self.dirname = '_test_cgi_form' try: shutil.rmtree(self.dirname) except OSError, error: if error.errno not in (errno.ENOENT, errno.ESRCH): raise # create the instance init.install(self.dirname, 'templates/classic') init.write_select_db(self.dirname, 'anydbm') init.initialise(self.dirname, 'sekrit') # ... | cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39/test_cgi.py |
test = self.instance.dbinit.Class(self.db, "test", | test = self.instance.get_backend().Class(self.db, "test", | def setUp(self): self.dirname = '_test_cgi_form' try: shutil.rmtree(self.dirname) except OSError, error: if error.errno not in (errno.ENOENT, errno.ESRCH): raise # create the instance init.install(self.dirname, 'templates/classic') init.write_select_db(self.dirname, 'anydbm') init.initialise(self.dirname, 'sekrit') # ... | cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39/test_cgi.py |
self.assertEqual(cl.parsePropsFromForm(create=1), | self.assertEqual(cl.parsePropsFromForm(create=1), | def testMixedMultilink(self): form = cgi.FieldStorage() form.list.append(cgi.MiniFieldStorage('nosy', '1,2')) form.list.append(cgi.MiniFieldStorage('nosy', '3')) cl = client.Client(self.instance, None, {'PATH_INFO':'/'}, form) cl.classname = 'issue' cl.nodeid = None cl.db = self.db self.assertEqual(cl.parsePropsFromFor... | cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39/test_cgi.py |
self.assertEqual(self.parseForm({'nosy': ''}, 'issue', nodeid), | self.assertEqual(self.parseForm({'nosy': ''}, 'issue', nodeid), | def testEmptyMultilinkSet(self): nodeid = self.db.issue.create(nosy=['1','2']) self.assertEqual(self.parseForm({'nosy': ''}, 'issue', nodeid), ({('issue', nodeid): {'nosy': []}}, [])) nodeid = self.db.issue.create(nosy=['1','2']) self.assertEqual(self.parseForm({'nosy': ' '}, 'issue', nodeid), ({('issue', nodeid): {'no... | cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39/test_cgi.py |
self.assertEqual(self.parseForm({'nosy': ' '}, 'issue', nodeid), | self.assertEqual(self.parseForm({'nosy': ' '}, 'issue', nodeid), | def testEmptyMultilinkSet(self): nodeid = self.db.issue.create(nosy=['1','2']) self.assertEqual(self.parseForm({'nosy': ''}, 'issue', nodeid), ({('issue', nodeid): {'nosy': []}}, [])) nodeid = self.db.issue.create(nosy=['1','2']) self.assertEqual(self.parseForm({'nosy': ' '}, 'issue', nodeid), ({('issue', nodeid): {'no... | cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39/test_cgi.py |
self.assertEqual(self.parseForm({'date': '2003-01-01'}, 'test', | self.assertEqual(self.parseForm({'date': '2003-01-01'}, 'test', | def testSetDate(self): self.assertEqual(self.parseForm({'date': '2003-01-01'}), ({('test', None): {'date': date.Date('2003-01-01')}}, [])) nodeid = self.db.test.create(date=date.Date('2003-01-01')) self.assertEqual(self.parseForm({'date': '2003-01-01'}, 'test', nodeid), ({('test', nodeid): {}}, [])) | cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39/test_cgi.py |
self.assertEqual(self.parseForm({'date': ''}, 'test', nodeid), | self.assertEqual(self.parseForm({'date': ''}, 'test', nodeid), | def testEmptyDateSet(self): nodeid = self.db.test.create(date=date.Date('.')) self.assertEqual(self.parseForm({'date': ''}, 'test', nodeid), ({('test', nodeid): {'date': None}}, [])) nodeid = self.db.test.create(date=date.Date('1970-01-01.00:00:00')) self.assertEqual(self.parseForm({'date': ' '}, 'test', nodeid), ({('t... | cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39/test_cgi.py |
self.assertEqual(self.parseForm({'date': ' '}, 'test', nodeid), | self.assertEqual(self.parseForm({'date': ' '}, 'test', nodeid), | def testEmptyDateSet(self): nodeid = self.db.test.create(date=date.Date('.')) self.assertEqual(self.parseForm({'date': ''}, 'test', nodeid), ({('test', nodeid): {'date': None}}, [])) nodeid = self.db.test.create(date=date.Date('1970-01-01.00:00:00')) self.assertEqual(self.parseForm({'date': ' '}, 'test', nodeid), ({('t... | cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39/test_cgi.py |
def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(FormTestCase)) suite.addTest(unittest.makeSuite(MessageTestCase)) return suite | cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf3a1ba5bb05cb09dd642ded3a53a72d13c7fc39/test_cgi.py | ||
config.read([os.path.join(home_dir, self.INI_FILE)]) | config.read([config_path]) | def load_ini(self, config_path, defaults=None): """Set options from config.ini file in given home_dir | d8bdf15b2c719758695a84bc710e34da8a7b951e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d8bdf15b2c719758695a84bc710e34da8a7b951e/configuration.py |
def __init__(self, s): rfc822.Message.__init__(self, StringIO(s.strip())) | c767e0438a475436665f5be3b77d5e06e8a45bca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c767e0438a475436665f5be3b77d5e06e8a45bca/test_mailgw.py | ||
self.fp.read() == other.fp.read()) | self.fp.read() == other.fp.read()) | def __eq__(self, other): return (self.dict == other.dict and self.fp.read() == other.fp.read()) | c767e0438a475436665f5be3b77d5e06e8a45bca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c767e0438a475436665f5be3b77d5e06e8a45bca/test_mailgw.py |
def compareMessages(self, new, old): """Compare messages for semantic equivalence.""" new, old = Message(new), Message(old) del new['date'], old['date'] | c767e0438a475436665f5be3b77d5e06e8a45bca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c767e0438a475436665f5be3b77d5e06e8a45bca/test_mailgw.py | ||
init.initialise(self.dirname, 'sekrit') self.instance = instance.open(self.dirname) | self.instance = tracker = instance.open(self.dirname) if tracker.exists(): tracker.nuke() tracker.init(password.Password('sekrit')) | def setUp(self): MailgwTestCase.count = MailgwTestCase.count + 1 self.dirname = '_test_mailgw_%s'%self.count try: shutil.rmtree(self.dirname) except OSError, error: if error.errno not in (errno.ENOENT, errno.ESRCH): raise # create the instance init.install(self.dirname, 'templates/classic') init.write_select_db(self.di... | c767e0438a475436665f5be3b77d5e06e8a45bca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c767e0438a475436665f5be3b77d5e06e8a45bca/test_mailgw.py |
def _handle_mail(self, message): handler = self.instance.MailGW(self.instance, self.db) handler.trapExceptions = 0 ret = handler.main(StringIO(message)) # handler can close the db on us and open a new one self.db = handler.db return ret | c767e0438a475436665f5be3b77d5e06e8a45bca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c767e0438a475436665f5be3b77d5e06e8a45bca/test_mailgw.py | ||
userlist = self.db.user.list() | userlist = self.db.user.list() | def testAlternateAddress(self): self._handle_mail('''Content-Type: text/plain; | c767e0438a475436665f5be3b77d5e06e8a45bca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c767e0438a475436665f5be3b77d5e06e8a45bca/test_mailgw.py |
# def testMultipart(self): | c767e0438a475436665f5be3b77d5e06e8a45bca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c767e0438a475436665f5be3b77d5e06e8a45bca/test_mailgw.py | ||
Content-Type: multipart/mixed; boundary="bCsyhTFzCvuiizWE" Content-Disposition: inline Content-Type: text/plain; charset=us-ascii Content-Disposition: inline test attachment binary Content-Type: application/octet-stream Content-Disposition: attachment; filename="main.dvi" xxxxxx | Content-Type: multipart/mixed; boundary="bCsyhTFzCvuiizWE" Content-Disposition: inline --bCsyhTFzCvuiizWE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline test attachment binary --bCsyhTFzCvuiizWE Content-Type: application/octet-stream Content-Disposition: attachment; filename="main.dvi" xxxx... | def testContentDisposition(self): self.doNewIssue() self._handle_mail('''Content-Type: text/plain; | c767e0438a475436665f5be3b77d5e06e8a45bca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c767e0438a475436665f5be3b77d5e06e8a45bca/test_mailgw.py |
''') | ''') | def testFollowupOnNonIssue(self): self.db.keyword.create(name='Foo') self._handle_mail('''Content-Type: text/plain; | c767e0438a475436665f5be3b77d5e06e8a45bca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c767e0438a475436665f5be3b77d5e06e8a45bca/test_mailgw.py |
def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(MailgwTestCase)) return suite | c767e0438a475436665f5be3b77d5e06e8a45bca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c767e0438a475436665f5be3b77d5e06e8a45bca/test_mailgw.py | ||
if self.value is None: value = '' | if self._value is None: value = '' | def email(self, escape=1): ''' fudge email ''' if self.value is None: value = '' else: value = str(self._value) value = value.replace('@', ' at ') value = value.replace('.', ' ') if escape: value = cgi.escape(value) return value | 7bb31e056f05d0ae91e0fed8c9316d5e807cea6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/7bb31e056f05d0ae91e0fed8c9316d5e807cea6e/templating.py |
data = part.fp.read() | def handle_message(self, message): ''' message - a Message instance | c559531b2814b00cf98d06402ad97aff0b464cb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c559531b2814b00cf98d06402ad97aff0b464cb8/mailgw.py | |
data = binascii.a2b_base64(data) | data = binascii.a2b_base64(part.fp.read()) | def handle_message(self, message): ''' message - a Message instance | c559531b2814b00cf98d06402ad97aff0b464cb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c559531b2814b00cf98d06402ad97aff0b464cb8/mailgw.py |
data = quopri.decode(data) | decoded = cStringIO.StringIO() quopri.decode(part.fp, decoded) data = decoded.getvalue() | def handle_message(self, message): ''' message - a Message instance | c559531b2814b00cf98d06402ad97aff0b464cb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c559531b2814b00cf98d06402ad97aff0b464cb8/mailgw.py |
data = binascii.a2b_uu(data) | data = binascii.a2b_uu(part.fp.read()) | def handle_message(self, message): ''' message - a Message instance | c559531b2814b00cf98d06402ad97aff0b464cb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c559531b2814b00cf98d06402ad97aff0b464cb8/mailgw.py |
sys.stdout.write('Importing %s - %d\r'%(classname, n)) sys.stdout.flush() | if self.verbose : sys.stdout.write('Importing %s - %d\r'%(classname, n)) sys.stdout.flush() | def do_import(self, args): ""'''Usage: import import_dir Import a database from the directory containing CSV files, two per class to import. | 65a7eaad5c50f18bb3357b517a1cb9d0d67505f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/65a7eaad5c50f18bb3357b517a1cb9d0d67505f9/admin.py |
opts, args = getopt.getopt(sys.argv[1:], 'i:u:hcdsS:v') | opts, args = getopt.getopt(sys.argv[1:], 'i:u:hcdsS:vV') | def main(self): try: opts, args = getopt.getopt(sys.argv[1:], 'i:u:hcdsS:v') except getopt.GetoptError, e: self.usage(str(e)) return 1 | 65a7eaad5c50f18bb3357b517a1cb9d0d67505f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/65a7eaad5c50f18bb3357b517a1cb9d0d67505f9/admin.py |
return str(psycopg.QuotedString(str(value)))[1:-1] | return str(QuotedString(str(value)))[1:-1] | def sql_stringquote(self, value): ''' psycopg.QuotedString returns a "buffer" object with the single-quotes around it... ''' return str(psycopg.QuotedString(str(value)))[1:-1] | 0d015bdc397103a1191b2f4069ab3376f78f26aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/0d015bdc397103a1191b2f4069ab3376f78f26aa/back_postgresql.py |
if os.path.isfile(schemafile): if os.path.getmtime(schemafile) < dbtm: self.fastopen = 1 else: | if os.path.isfile(schemafile) \ and (os.path.getmtime(schemafile) < dbtm): | def __open(self): ''' Open the metakit database ''' # make the database dir if it doesn't exist if not os.path.exists(self.config.DATABASE): os.makedirs(self.config.DATABASE) | 11db2eae4efbeeb29b6378b53800c14465f24cf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/11db2eae4efbeeb29b6378b53800c14465f24cf2/back_metakit.py |
nodeid = int(nodeid) journaldate = date.Date(journaldate) params = eval(params) | journaldate = str(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] | cb3c17db5aa6e38da3c146eb747e5f1be11563cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cb3c17db5aa6e38da3c146eb747e5f1be11563cf/back_mysql.py |
propdef = all_propdef[cn] | 8a3a169c9289ccce134da243675b2b686404345d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a3a169c9289ccce134da243675b2b686404345d/client.py | ||
cl = self.db.classes[cn] if not isinstance(cl, hyperdb.FileClass): continue if not props.get('content', ''): del all_props[(cn, id)] | if isinstance(self.db.classes[cn], hyperdb.FileClass): if id == '-1': if not props.get('content', ''): del all_props[(cn, id)] elif props.has_key('content') and not props['content']: raise ValueError, _('File is empty') | propdef = all_propdef[cn] | 8a3a169c9289ccce134da243675b2b686404345d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a3a169c9289ccce134da243675b2b686404345d/client.py |
def indexargs_href(self, url, args): | def indexargs_url(self, url, args): | def indexargs_href(self, url, args): ''' embed the current index args in a URL ''' l = ['%s=%s'%(k,v) for k,v in args.items()] if self.columns and not args.has_key(':columns'): l.append(':columns=%s'%(','.join(self.columns))) if self.sort[1] is not None and not args.has_key(':sort'): if self.sort[0] == '-': val = '-'+s... | 115eccc515e13ea8a1ed186a0ae73aa56b951a99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/115eccc515e13ea8a1ed186a0ae73aa56b951a99/templating.py |
def length(self): self.sequence_length = l = len(self._sequence) return l | def length(self): self.sequence_length = l = len(self._sequence) return l | 115eccc515e13ea8a1ed186a0ae73aa56b951a99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/115eccc515e13ea8a1ed186a0ae73aa56b951a99/templating.py | |
return DateHTMLProperty(self._client, self._nodeid, self._prop, self._formname, self._value.local(offset)) | return DateHTMLProperty(self._client, self._classname, self._nodeid, self._prop, self._formname, self._value.local(offset)) | def local(self, offset): ''' Return the date/time as a local (timezone offset) date/time. ''' self.view_check() | f5f6ad5aedecfc4d1614391dbb8bef6c71dc70d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f5f6ad5aedecfc4d1614391dbb8bef6c71dc70d2/templating.py |
raise KeyErorr, item | raise KeyError, item | def __getitem__(self, item): ''' return an HTMLProperty instance ''' #print 'HTMLItem.getitem', (self, item) if item == 'id': return self._nodeid | 66afe649e120fc6fd3c2a4c5fe0daf570b0b61d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/66afe649e120fc6fd3c2a4c5fe0daf570b0b61d9/templating.py |
cell.append('%s: <a href="%s%s">%s</a>\n'%(k, classname, args[k], label)) | old = '<a href="%s%s">%s</a>'%(classname, args[k], label) | def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] comments = {} history = self._klass.history(self._nodeid) his... | 66afe649e120fc6fd3c2a4c5fe0daf570b0b61d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/66afe649e120fc6fd3c2a4c5fe0daf570b0b61d9/templating.py |
cell.append('%s: %s' % (k,label)) | old = label; cell.append('%s: %s' % (k,old)) if k in current: cell[-1] += ' -> %s'%current[k] current[k] = old | def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] comments = {} history = self._klass.history(self._nodeid) his... | 66afe649e120fc6fd3c2a4c5fe0daf570b0b61d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/66afe649e120fc6fd3c2a4c5fe0daf570b0b61d9/templating.py |
cell.append('%s: (no value)\n'%k) | if k not in current: cell.append('%s: (no value)'%k) else: cell.append('%s: %s'%(k, current[k])) current[k] = '(no value)' | def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] comments = {} history = self._klass.history(self._nodeid) his... | 66afe649e120fc6fd3c2a4c5fe0daf570b0b61d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/66afe649e120fc6fd3c2a4c5fe0daf570b0b61d9/templating.py |
cell.append('%s: %s\n'%(k, str(args[k]))) | cell.append('%s: %s'%(k, str(args[k]))) if k in current: cell[-1] += ' -> %s'%current[k] current[k] = str(args[k]) | def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] comments = {} history = self._klass.history(self._nodeid) his... | 66afe649e120fc6fd3c2a4c5fe0daf570b0b61d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/66afe649e120fc6fd3c2a4c5fe0daf570b0b61d9/templating.py |
if file is None: | if index is None or file is None: | def html(context=5): etype, evalue = sys.exc_type, sys.exc_value if type(etype) is types.ClassType: etype = etype.__name__ pyver = 'Python ' + string.split(sys.version)[0] + '<br>' + sys.executable head = pydoc.html.heading( '<font size=+1><strong>%s</strong>: %s</font>'%(str(etype), str(evalue)), '#ffffff', '#aa55cc',... | 2c7170ec710659e7072d9996f56ba56c74d34134 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/2c7170ec710659e7072d9996f56ba56c74d34134/cgitb.py |
interval = now - self.get(sessid, '__timestamp', default=time.time()) | sess = self.get(sessid, '__timestamp', None) if sess is None: sess=time.time() self.updateTimestamp(sessid) interval = now - sess | def clean(self, now): """Age sessions, remove when they haven't been used for a week. """ week = 60*60*24*7 for sessid in self.list(): interval = now - self.get(sessid, '__timestamp', default=time.time()) if interval > week: self.destroy(sessid) | 1fc17d01f7ad8185245123f9672f67173535bea9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1fc17d01f7ad8185245123f9672f67173535bea9/sessions_dbm.py |
filename = os.path.join(self.instance.config.TEMPLATES, file) | prefix = getattr(self.instance.config, 'STATIC_FILES', self.instance.config.TEMPLATES) filename = os.path.normpath(os.path.join(prefix, file)) if not filename.startswith(prefix): raise NotFound, file | def serve_static_file(self, file): ''' Serve up the file named from the templates dir ''' filename = os.path.join(self.instance.config.TEMPLATES, file) | bbc7441f79e685e3bfb41bae37baa6d46791cff0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/bbc7441f79e685e3bfb41bae37baa6d46791cff0/client.py |
if filterspec: | if self.classname and filterspec: | def indexargs_form(self, columns=1, sort=1, group=1, filter=1, filterspec=1): ''' return the current index args as form elements ''' l = [] sc = self.special_char s = self.input(type="hidden",name="%s",value="%s") if columns and self.columns: l.append(s%(sc+'columns', ','.join(self.columns))) if sort and self.sort[1] i... | 1fcedf669200e41300c9ba959649dd2ea52c4770 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1fcedf669200e41300c9ba959649dd2ea52c4770/templating.py |
props = self.client.db.getclass(self.classname).getprops() q = urllib.quote for k,v in self.filterspec.items(): if not args.has_key(k): if type(v) == type([]): if isinstance(props[k], hyperdb.String): l.append('%s=%s'%(k, '%20'.join([q(i) for i in v]))) | if self.classname and self.filterspec: props = self.client.db.getclass(self.classname).getprops() q = urllib.quote for k,v in self.filterspec.items(): if not args.has_key(k): if type(v) == type([]): if isinstance(props[k], hyperdb.String): l.append('%s=%s'%(k, '%20'.join([q(i) for i in v]))) else: l.append('%s=%s'%(k, ... | def indexargs_url(self, url, args): ''' Embed the current index args in a URL ''' sc = self.special_char l = ['%s=%s'%(k,v) for k,v in args.items()] | 1fcedf669200e41300c9ba959649dd2ea52c4770 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1fcedf669200e41300c9ba959649dd2ea52c4770/templating.py |
l.append('%s=%s'%(k, ','.join([q(i) for i in v]))) else: l.append('%s=%s'%(k, q(v))) | l.append('%s=%s'%(k, q(v))) | def indexargs_url(self, url, args): ''' Embed the current index args in a URL ''' sc = self.special_char l = ['%s=%s'%(k,v) for k,v in args.items()] | 1fcedf669200e41300c9ba959649dd2ea52c4770 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1fcedf669200e41300c9ba959649dd2ea52c4770/templating.py |
props, changed = parsePropsFromForm(self.db, cl, self.form, self.nodeid) | props = parsePropsFromForm(self.db, cl, self.form, self.nodeid) | def shownode(self, message=None): ''' display an item ''' cn = self.classname cl = self.db.classes[cn] | 3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py |
if changed: | if props: | def shownode(self, message=None): ''' display an item ''' cn = self.classname cl = self.db.classes[cn] | 3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.