Did I find the right examples for you? yes no

All Samples(3842)  |  Call(3818)  |  Derive(0)  |  Import(24)
format(value[, format_spec]) -> string

Returns value.__format__(format_spec)
format_spec defaults to ""

src/a/b/abjad-HEAD/abjad/tools/rhythmmakertools/ExampleWrapper.py   abjad(Download)
    def _to_markup(self, class_):
        instance = class_(**self.arguments)
        string = format(instance, 'storage')
        string = string.replace('rhythmmakertools.', '')
        lines = string.split('\n')

src/c/o/control-0.6.1/examples/tfvis.py   control(Download)
    def set_poles(self, poles):
        """ Set the poles to the new positions"""
        self.denominator = make_poly(poles)
        self.denominator_widget.setentry(
            ' '.join([format(i,'.3g') for i in self.denominator]))
    def set_zeros(self, zeros):
        """ Set the zeros to the new positions"""
        self.numerator = make_poly(zeros)
        self.numerator_widget.setentry(
            ' '.join([format(i,'.3g') for i in self.numerator]))

src/p/u/puq-2.2.2/examples/wrappers/newdir_with_input_template/sim_file.py   puq(Download)
    # now write the result to 'output.txt'
    out = open('output.txt', 'w')
    print >> out, "The answer is %s." % format(a*x**2 + b*x + c, "e")
    out.close()
 

src/p/u/puq-2.2.2/examples/wrappers/newdir/sim_file.py   puq(Download)
    # now write the result to 'output.txt'
    out = open('output.txt', 'w')
    print >> out, "The answer is %s." % format(a*x**2 + b*x + c, "e")
    out.close()
 

src/p/y/pyjs-HEAD/examples/libtest/BuiltinTest.py   pyjs(Download)
            def __format__(self, format_spec):
                if format_spec == 'd':
                    return 'G(' + self.x + ')'
                return format(str(self), format_spec)
 
                issue524_solved = False
                try:
                    format(1.0, 'd')
                except ValueError:
                    issue524_solved = True

src/p/y/pysubs-0.1.1/examples/word_count.py   pysubs(Download)
words_total = sum(words_per_character.values())
 
print("Words in total:", format(words_total, ","))
print("Top 10 characters per word count:")
for name, count in words_per_character.most_common(10):

src/p/y/pysubs-HEAD/examples/word_count.py   pysubs(Download)
words_total = sum(words_per_character.values())
 
print("Words in total:", format(words_total, ","))
print("Top 10 characters per word count:")
for name, count in words_per_character.most_common(10):

src/a/b/abjad-HEAD/experimental/tools/musicexpressiontools/test/schematic_examples/test_schematic_example_X.py   abjad(Download)
    current_function_name = systemtools.TestManager.get_current_function_name()
    systemtools.TestManager.write_test_output(score, __file__, current_function_name)
    assert format(score) == systemtools.TestManager.read_test_output(__file__, current_function_name)
 
 
    current_function_name = systemtools.TestManager.get_current_function_name()
    systemtools.TestManager.write_test_output(score, __file__, current_function_name)
    assert format(score) == systemtools.TestManager.read_test_output(__file__, current_function_name)
 
 
    current_function_name = systemtools.TestManager.get_current_function_name()
    systemtools.TestManager.write_test_output(score, __file__, current_function_name)
    assert format(score) == systemtools.TestManager.read_test_output(__file__, current_function_name)
 
 
    current_function_name = systemtools.TestManager.get_current_function_name()
    systemtools.TestManager.write_test_output(score, __file__, current_function_name)
    assert format(score) == systemtools.TestManager.read_test_output(__file__, current_function_name)
 
 
    current_function_name = systemtools.TestManager.get_current_function_name()
    systemtools.TestManager.write_test_output(score, __file__, current_function_name)
    assert format(score) == systemtools.TestManager.read_test_output(__file__, current_function_name)
 
 

src/s/u/supybot_fixes-HEAD/plugins/ChannelStats/plugin.py   supybot_fixes(Download)
        """
        if msg.nick not in irc.state.channels[channel].users:
            irc.error(format('You must be in %s to use this command.', channel))
            return
        if name and ircutils.strEqual(name, irc.nick):
        try:
            stats = self.db.getUserStats(channel, id)
            s = format('%s has sent %n; a total of %n, %n, '
                       '%n, and %n; %s of those messages %s'
                       '%s has joined %n, parted %n, quit %n, '
            irc.reply(s)
        except KeyError:
            irc.error(format('I have no stats for that %s in %s.',
                             name, channel))
    stats = wrap(stats, ['channeldb', additional('something')])
        """
        if msg.nick not in irc.state.channels[channel].users:
            irc.error(format('You must be in %s to use this command.', channel))
            return
        # XXX I could do this the right way, and abstract out a safe eval,
        """
        if msg.nick not in irc.state.channels[channel].users:
            irc.error(format('You must be in %s to use this command.', channel))
            return
        try:

src/l/i/limnoria-2014.03.03/plugins/ChannelStats/plugin.py   limnoria(Download)
        """
        if msg.nick not in irc.state.channels[channel].users:
            irc.error(format('You must be in %s to use this command.', channel))
            return
        if name and ircutils.strEqual(name, irc.nick):
        try:
            stats = self.db.getUserStats(channel, id)
            s = format(_('%s has sent %n; a total of %n, %n, '
                       '%n, and %n; %s of those messages %s. '
                       '%s has joined %n, parted %n, quit %n, '
            irc.reply(s)
        except KeyError:
            irc.error(format(_('I have no stats for that %s in %s.'),
                             name, channel))
    stats = wrap(stats, ['channeldb', additional('something')])
        """
        if msg.nick not in irc.state.channels[channel].users:
            irc.error(format('You must be in %s to use this command.', channel))
            return
        # XXX I could do this the right way, and abstract out a safe eval,
            stats = self.db.getChannelStats(channeldb)
            curUsers = len(irc.state.channels[channel].users)
            s = format(_('On %s there %h been %i messages, containing %i '
                       'characters, %n, %n, and %n; '
                       '%i of those messages %s.  There have been '

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next