| hello,\ world lang:python | hello,\ world lang:c++ | hello,\ world lang:assembly |
| hello,\ world lang:perl | hello,\ world lang:c |
16: self.assertEquals( 17: text.flatten(A.normal['Hello, world.'], self.attrs), 18: 'Hello, world.') 19:
22: text.flatten(A.bold['Hello, world.'], self.attrs), 23: '\x1b[1mHello, world.')
26: self.assertEquals( 27: text.flatten(A.underline['Hello, world.'], self.attrs), 28: '\x1b[4mHello, world.') 29:
31: def test_c_char_p(self): 32: s = "Hello, World" 33: self.failUnlessEqual(3, grc(s))
73: s1 = "Hello, World" 74: s2 = "Hallo, Welt"
5: # hello -- 6: # Simple Tk script to create a button that prints "Hello, world". 7: # Click on the button to terminate the program.
17: button .hello -text "Hello, world" -command { 18: puts stdout "Hello, world"; destroy . 19: }
16: self.assertRaises(ValueError, getattr, x.str, "contents") 17: b = c_buffer("Hello, World") 18: from sys import getrefcount as grc
28: self.assertRaises(TypeError, setattr, x, "str", "Hello, World") 29:
37: self.failUnlessEqual(x.str, None) 38: x.str = "Hello, World" 39: self.failUnlessEqual(x.str, "Hello, World") 40: b = c_buffer("Hello, World") 41: self.failUnlessRaises(TypeError, setattr, x, "str", b)
129: for ch in 'hello, world': 130: kR(ch) 131: self.assertEquals(self.p.currentLineBuffer(), ('hello, world', '')) 132: 133: kR(self.pt.HOME) 134: self.assertEquals(self.p.currentLineBuffer(), ('', 'hello, world')) 135:
139: for ch in 'hello, world': 140: kR(ch) 141: self.assertEquals(self.p.currentLineBuffer(), ('hello, world', ''))
20: Example (Hello, World): 21: import Tkinter
25: frame.pack(fill=BOTH,expand=1) 26: label = Tkinter.Label(frame, text="Hello, World") 27: label.pack(fill=X, expand=1)
19: a = create_string_buffer(1000000) 20: p = "Hello, World" 21: result = memmove(a, p, len(p)) 22: self.failUnlessEqual(a.value, "Hello, World") 23: 24: self.failUnlessEqual(string_at(result), "Hello, World") 25: self.failUnlessEqual(string_at(result, 5), "Hello") 26: self.failUnlessEqual(string_at(result, 16), "Hello, World\0\0\0\0") 27: self.failUnlessEqual(string_at(result, 0), "")
Google Home - Google Code - Discuss - Terms of Service - Help - Submit Your Code
©2010 Google - Privacy