~ubuntu-branches/ubuntu/oneiric/python2.6/oneiric

« back to all changes in this revision

Viewing changes to Lib/idlelib/configHandler.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-08-07 20:03:08 UTC
  • mfrom: (10.1.27 sid)
  • Revision ID: james.westby@ubuntu.com-20100807200308-bwsyymoc4donr9a9
Tags: 2.6.6~rc1-1ubuntu1
* Merge with Debian; remaining changes:
  - Regenerate the control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import os
21
21
import sys
22
22
import string
23
 
import macosxSupport
 
23
from idlelib import macosxSupport
24
24
from ConfigParser import ConfigParser, NoOptionError, NoSectionError
25
25
 
26
26
class InvalidConfigType(Exception): pass
654
654
                helpPath=value[1].strip()
655
655
            if menuItem and helpPath: #neither are empty strings
656
656
                helpSources.append( (menuItem,helpPath,option) )
657
 
        helpSources.sort(self.__helpsort)
 
657
        helpSources.sort(key=lambda x: int(x[2]))
658
658
        return helpSources
659
659
 
660
 
    def __helpsort(self, h1, h2):
661
 
        if int(h1[2]) < int(h2[2]):
662
 
            return -1
663
 
        elif int(h1[2]) > int(h2[2]):
664
 
            return 1
665
 
        else:
666
 
            return 0
667
 
 
668
660
    def GetAllExtraHelpSourcesList(self):
669
661
        """
670
662
        Returns a list of tuples containing the details of all additional help