By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,767 Members | 1,995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,767 IT Pros & Developers. It's quick & easy.

Happy Christmas & Happy New Year from kudos

kudos
Expert 100+
P: 126
Its turned into a tradition, making small tkinter "cards". Here is one for the christmas and new year. Paste and run from python!



Expand|Select|Wrap|Line Numbers
  1. import Tkinter
  2. import random
  3. import time
  4.  
  5. #hc&hy kudos@spray.no
  6.  
  7. logo = """
  8. #define im_width 165
  9. #define im_height 63
  10. static char im_bits[] = {
  11. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  12. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  13. 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  14. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0x07,0x00,0x00,0x00,0x00,
  15. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  16. 0xf0,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  17. 0x00,0x00,0x00,0x00,0x00,0x0f,0x10,0x0e,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,
  18. 0x00,0x1c,0x38,0x0e,0x70,0x00,0x00,0x00,0x00,0x00,0xf0,0x79,0x10,0x06,0x0f,
  19. 0x1b,0x00,0x0c,0x38,0xe0,0x01,0xc0,0x16,0x6c,0x1b,0xd8,0x00,0x87,0x03,0xfe,
  20. 0x07,0x4d,0xc0,0x33,0xc2,0x99,0x11,0x00,0x1e,0x26,0x1c,0x03,0xf0,0x31,0xc6,
  21. 0x60,0x04,0x83,0xcd,0x86,0x03,0xcf,0xc7,0x00,0x62,0x33,0x90,0x11,0xf0,0x11,
  22. 0x42,0x06,0x02,0x98,0x21,0xc2,0xc0,0x07,0x7c,0x28,0x82,0x00,0x6c,0xc6,0x30,
  23. 0xf2,0x99,0xf9,0x31,0x98,0x11,0x42,0x39,0x01,0x88,0x21,0x82,0x01,0x0e,0x70,
  24. 0x38,0x82,0x00,0x26,0x86,0x31,0xff,0x8f,0x1f,0xe0,0x8f,0x31,0x82,0xf1,0x00,
  25. 0x88,0x21,0x82,0x01,0x0c,0xe0,0x30,0x82,0xf1,0x23,0x86,0x81,0x07,0x1c,0x0f,
  26. 0xe0,0x0f,0x20,0x82,0xe1,0x00,0x88,0x21,0x03,0x63,0x1e,0xb3,0x30,0x02,0x31,
  27. 0x30,0x86,0x03,0x3f,0x3c,0xfc,0x31,0x0f,0x20,0x81,0x83,0x07,0x06,0xe0,0x19,
  28. 0xe3,0x11,0x8f,0x11,0x02,0x22,0x1e,0x80,0x03,0x2c,0xe4,0xc0,0xd1,0x07,0xc0,
  29. 0x19,0x1d,0x18,0x06,0xc3,0x18,0x43,0x10,0x02,0x01,0x02,0xe2,0x1f,0x84,0xe3,
  30. 0x24,0xc4,0xc7,0xf3,0x27,0xc0,0x18,0xf9,0x18,0x8c,0x43,0x3c,0x22,0x10,0x03,
  31. 0x3b,0x02,0x06,0x17,0x0e,0xe3,0x64,0x78,0x6f,0xe3,0x3a,0x04,0x3c,0xfe,0x07,
  32. 0xc8,0x86,0x67,0x20,0x10,0x01,0x3e,0x02,0xc4,0x11,0x0b,0x73,0x3e,0x3c,0x1f,
  33. 0x33,0x4e,0xef,0x27,0xe2,0x03,0x78,0xc4,0x60,0x33,0x90,0x01,0x0c,0x03,0x7c,
  34. 0xf0,0x98,0x4f,0xce,0x13,0x0e,0x1b,0xc0,0xe5,0x60,0xe3,0x01,0x00,0x24,0xe0,
  35. 0x0f,0x70,0x00,0x84,0x01,0x18,0x00,0xd8,0x60,0x7f,0xf0,0x03,0x06,0x00,0x1e,
  36. 0xe0,0x3f,0x00,0x00,0x1c,0x00,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x70,0xe0,
  37. 0x01,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  38. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
  39. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  40. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  41. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  42. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  43. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  44. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  45. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  46. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x00,
  47. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x80,
  48. 0x1b,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  49. 0x00,0x00,0x00,0x00,0x3c,0xc0,0xd0,0x01,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,
  50. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x80,0x31,0x06,0x00,
  51. 0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  52. 0x00,0x46,0x30,0x11,0x0c,0x00,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  53. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x86,0x7c,0x11,0x70,0x00,0x42,0x00,0x00,
  54. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x84,
  55. 0x31,0xc0,0x01,0x82,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  56. 0x00,0x00,0x00,0x00,0x82,0x05,0x31,0x00,0x01,0x83,0x00,0x00,0x00,0x00,0x00,
  57. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x05,0x30,0x8c,0x00,
  58. 0x89,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  59. 0x80,0x19,0x07,0x70,0x4c,0xc0,0x18,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  60. 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x18,0x06,0x70,0x20,0x40,0x18,0x01,0x00,
  61. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x3e,0x62,
  62. 0x70,0x18,0x40,0x3f,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  63. 0x00,0x00,0x00,0xc0,0x63,0xba,0x70,0x0e,0xc0,0x21,0x02,0x00,0x00,0x00,0x00,
  64. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x0f,0xd9,0x03,0x00,
  65. 0x20,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  66. 0x00,0xc0,0x01,0x0e,0x00,0x00,0xe0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  67. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  68. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  69. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  70. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  71. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  72. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  73. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  74. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,
  75. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  76. 0x00,0x00,0xc0,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  77. 0x00,0x00,0x00,0x00,0x00,0xe0,0x03,0x00,0xc0,0x08,0x00,0x00,0x00,0x00,0x00,
  78. 0x01,0x00,0x00,0x00,0x18,0x38,0x04,0x20,0x00,0x00,0x00,0x30,0x02,0x00,0x80,
  79. 0x09,0x00,0x00,0x00,0x80,0xe1,0x0f,0x00,0x00,0x00,0x16,0x2c,0x1f,0xf8,0x00,
  80. 0x06,0x03,0x30,0xf2,0x00,0x00,0x09,0x10,0xd8,0x03,0x60,0x33,0x78,0x00,0x00,
  81. 0xe0,0x13,0xc6,0x31,0x8c,0x81,0xc7,0x06,0x60,0x1e,0x3f,0x70,0x09,0x3c,0x76,
  82. 0xfc,0x20,0x32,0x80,0x00,0x00,0xb8,0x31,0xc6,0xc0,0x07,0xce,0x68,0x02,0x4e,
  83. 0x06,0x3e,0xd8,0x09,0x67,0x33,0xf8,0x20,0x26,0x88,0x00,0x00,0x88,0x21,0x82,
  84. 0x00,0x07,0x78,0x38,0x82,0x71,0x0e,0x07,0x88,0x09,0xc3,0x31,0x3c,0x30,0x64,
  85. 0xdc,0x00,0x00,0x88,0x21,0x82,0x01,0x0c,0x60,0x38,0x82,0x60,0x12,0xff,0x8f,
  86. 0x09,0xc2,0x51,0xfc,0x13,0x4c,0x68,0x00,0x00,0x88,0x21,0x83,0x63,0x1e,0xf3,
  87. 0x30,0x82,0x00,0x0e,0xf8,0x09,0x09,0xc6,0x71,0xe0,0x11,0xc8,0xe0,0x01,0x00,
  88. 0x0c,0x60,0x19,0xe3,0x13,0x9f,0x31,0x82,0x01,0x0c,0xfe,0x01,0x0c,0x84,0x38,
  89. 0xf8,0xd9,0x88,0x00,0x03,0x00,0x06,0xc0,0x18,0xc3,0x10,0x06,0x01,0x82,0x00,
  90. 0x3c,0x7b,0x23,0x04,0x0c,0xf8,0xec,0xcf,0x90,0x30,0x03,0x00,0x8c,0x43,0x38,
  91. 0x62,0x10,0x03,0x39,0x82,0x08,0x24,0x3e,0x62,0x04,0xc8,0x88,0xf8,0xc6,0x91,
  92. 0x38,0x01,0x00,0xc8,0x06,0x2f,0x22,0x10,0x01,0x3f,0x82,0x1c,0x64,0x18,0x72,
  93. 0x04,0xf8,0x88,0x61,0xf6,0xb3,0xbd,0x01,0x00,0x68,0xc4,0x61,0x32,0x90,0x01,
  94. 0x1c,0x82,0x27,0x44,0x06,0xdc,0x04,0x60,0x08,0x39,0x0e,0x32,0x97,0x01,0x00,
  95. 0x38,0x64,0xe0,0x1f,0xf0,0x00,0x04,0x01,0x61,0xc3,0x03,0x8c,0x06,0x30,0x0c,
  96. 0x0f,0x00,0x1f,0x91,0x00,0x00,0x00,0x3c,0x80,0x00,0x00,0x00,0xfc,0x00,0xc0,
  97. 0x01,0x00,0x80,0x01,0xf0,0x07,0x00,0x00,0x04,0x70,0x00,0x00,0x00,0x08,0x00,
  98. 0x00,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x03,0x00,0x00,0x00,
  99. 0x30,0x00,0x00
  100. };"""
  101.  
  102. logo2 = """
  103. #define im_width 165
  104. #define im_height 63
  105. static char im_bits[] = {
  106. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  107. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  108. 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  109. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x03,0x00,0x00,0x00,0x00,
  110. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  111. 0xf0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  112. 0x00,0x00,0x00,0x00,0x00,0x06,0xe0,0x03,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,
  113. 0x00,0x1c,0x38,0x0c,0x60,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf,0xe0,0x01,0x07,
  114. 0x0e,0x00,0x0c,0x38,0xe0,0x00,0x40,0x1e,0x3c,0x1f,0xf8,0x00,0x06,0x03,0xfe,
  115. 0x05,0xf9,0xff,0xe3,0xc1,0x1f,0x0f,0x00,0x0e,0x3c,0xf8,0x01,0x60,0x1f,0xfc,
  116. 0x7f,0xfc,0x83,0xc7,0x83,0xff,0xcf,0x7d,0xff,0x81,0xf0,0x0f,0x0f,0x70,0x0f,
  117. 0x3c,0xfe,0x01,0xf8,0x1e,0x7c,0xff,0xfb,0xdf,0xef,0x03,0xff,0xe3,0x7d,0xdf,
  118. 0x31,0x70,0xe6,0x3f,0xf8,0x1e,0x7e,0x4e,0x00,0x70,0x3e,0xfe,0xfe,0xff,0xff,
  119. 0xcf,0x03,0x5f,0xe1,0x79,0xff,0xfc,0xf7,0xf8,0xff,0xfb,0x1f,0x7c,0x1f,0x00,
  120. 0xf8,0x1e,0xfe,0xfe,0xf3,0x9f,0xef,0x01,0x1f,0xe0,0x7b,0x7e,0xfd,0xef,0xf3,
  121. 0x1f,0xf8,0x1f,0xfe,0xfe,0x00,0xf8,0x3f,0xfe,0xbd,0xf1,0x0d,0xdf,0x01,0x1e,
  122. 0xe0,0xff,0xfe,0xc7,0xe3,0x3f,0x1e,0xfb,0x3f,0xfe,0xf8,0x07,0xfc,0x3f,0xe7,
  123. 0x7d,0xe0,0x03,0xfe,0x01,0x1c,0xf6,0xff,0xbc,0xc7,0x03,0x7f,0xde,0xf9,0x7f,
  124. 0xe7,0xe1,0x0f,0xf8,0xfe,0xff,0x3d,0xe0,0x01,0xfe,0x01,0xfc,0xe3,0xfa,0x3c,
  125. 0xc3,0xc7,0x38,0x7e,0xdc,0xff,0xff,0x19,0x07,0x70,0xfc,0xc7,0x3f,0xe0,0x01,
  126. 0xc6,0x01,0xf8,0xe1,0xf1,0x9c,0xc3,0xff,0x19,0x3e,0x86,0xf9,0xc5,0x1d,0x01,
  127. 0x38,0x7c,0xc0,0x1f,0xe0,0x00,0xf0,0x01,0x38,0xe0,0xf0,0xc4,0xf9,0xe1,0x07,
  128. 0x0e,0xc0,0x98,0xc0,0xff,0x00,0x00,0x18,0xc0,0x0c,0x60,0x00,0xf8,0x01,0x08,
  129. 0x00,0xf0,0x80,0x3b,0x60,0x01,0x02,0x00,0x18,0xc0,0x2c,0x00,0x00,0x0c,0x00,
  130. 0x00,0x00,0x00,0x6c,0x00,0x00,0x00,0x10,0xc0,0x00,0x00,0x00,0x00,0x00,0x06,
  131. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  132. 0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  133. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  134. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  135. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  136. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  137. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  138. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  139. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  140. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  141. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,
  142. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x80,
  143. 0x0d,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  144. 0x00,0x00,0x00,0x00,0x18,0x00,0xcf,0x01,0x00,0x1c,0x00,0x00,0x00,0x00,0x00,
  145. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0xea,0x03,0x00,
  146. 0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  147. 0x00,0x74,0x20,0x6e,0x0f,0x00,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  148. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x5c,0x78,0xce,0x5a,0x00,0x74,0x00,0x00,
  149. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf4,0xdc,
  150. 0x6a,0xef,0x00,0x5e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  151. 0x00,0x00,0x00,0x00,0xac,0x70,0xcf,0x6a,0x00,0xea,0x00,0x00,0x00,0x00,0x00,
  152. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb6,0xac,0x4a,0x33,0x00,
  153. 0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  154. 0x00,0xe7,0xd9,0x9b,0x16,0x00,0xe7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  155. 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x2a,0x55,0xc6,0x0a,0x80,0x55,0x01,0x00,
  156. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x41,0x95,
  157. 0x1a,0x03,0x80,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  158. 0x00,0x00,0x00,0x00,0xc0,0x09,0xca,0x00,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,
  159. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,
  160. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  161. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  162. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  163. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  164. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  165. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  166. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  167. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  168. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  169. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  170. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  171. 0x00,0x00,0x80,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  172. 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,
  173. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
  174. 0x04,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x14,0x10,0x08,0x10,0x00,
  175. 0x00,0x00,0x40,0x41,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x04,0x00,0x00,
  176. 0x00,0x00,0x24,0x05,0xa0,0x00,0x01,0x01,0x00,0x90,0x00,0x00,0x04,0x00,0x48,
  177. 0x02,0x40,0x00,0x29,0x00,0x00,0xa0,0x14,0x00,0x50,0x10,0x02,0x02,0x00,0x80,
  178. 0x00,0x02,0x20,0x00,0x14,0x00,0x01,0x00,0x81,0x00,0x00,0x00,0x00,0x00,0x54,
  179. 0x05,0x84,0x04,0x84,0x00,0x04,0x91,0x00,0x00,0x02,0x20,0x04,0x00,0x00,0x00,
  180. 0x02,0x00,0x00,0x50,0x12,0x00,0x50,0x51,0x90,0x40,0x00,0x12,0x00,0x00,0x50,
  181. 0x00,0x00,0x00,0x05,0x20,0x02,0x10,0x00,0x00,0x00,0x04,0x24,0x04,0x00,0x04,
  182. 0x04,0x01,0x40,0x42,0x04,0x02,0x01,0x20,0x02,0x20,0x40,0x00,0x00,0x00,0x00,
  183. 0x20,0x21,0x80,0x10,0x80,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x20,
  184. 0x00,0x00,0x08,0x82,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x00,0x02,
  185. 0x80,0x10,0x84,0x00,0x08,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x24,0x40,
  186. 0x04,0x40,0x00,0x40,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,
  187. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,
  188. 0x02,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  189. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,
  190. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
  191. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  192. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  193. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  194. 0x00,0x00,0x00
  195. };"""
  196.  
  197. logo3 = """
  198. #define im_width 165
  199. #define im_height 63
  200. static char im_bits[] = {
  201. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  202. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  203. 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  204. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
  205. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  206. 0x70,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  207. 0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  208. 0x00,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x0f,0xe0,0x01,0x00,
  209. 0x0c,0x00,0x00,0x10,0x00,0x00,0x00,0x1c,0x38,0x0e,0x70,0x00,0x00,0x02,0x10,
  210. 0x00,0xf0,0xff,0xe0,0x01,0x0f,0x0f,0x00,0x0c,0x38,0xf0,0x01,0x40,0x1e,0xbc,
  211. 0x3f,0xf8,0x01,0x87,0x03,0xfe,0x07,0x7d,0xff,0xc3,0xe1,0x1f,0x0f,0x40,0x0e,
  212. 0x3c,0xfc,0x01,0xf0,0x1e,0x7c,0xff,0xf8,0xc7,0xc7,0x83,0xff,0xc7,0x79,0xdf,
  213. 0x01,0x60,0x06,0x0f,0x70,0x0f,0x7c,0xee,0x00,0x70,0x1e,0x7c,0xff,0xff,0xbf,
  214. 0xef,0x01,0xff,0xe3,0x7d,0xdf,0x7c,0xf2,0xf0,0x7f,0xf9,0x1e,0x7c,0x0e,0x00,
  215. 0xf8,0x3e,0xfe,0xfe,0xf7,0xbf,0xcf,0x03,0x1f,0xe0,0x79,0xfe,0xfc,0xf7,0xf3,
  216. 0xbf,0xf8,0x1f,0xfe,0x3e,0x00,0xf0,0x1e,0xfe,0xbe,0xf1,0x0d,0xef,0x01,0x1e,
  217. 0xe0,0x7b,0xfe,0xe3,0xe3,0x1f,0x1f,0xfa,0x1f,0xfe,0xfc,0x01,0xf8,0x3f,0xe6,
  218. 0xdc,0xe0,0x06,0xff,0x01,0x1e,0xe0,0xff,0xfc,0xc7,0x83,0x7f,0x9e,0xf9,0x3f,
  219. 0xf7,0xf0,0x0f,0xfc,0xbf,0xff,0x3d,0xe0,0x01,0xfe,0x01,0x1c,0xf7,0xff,0x3c,
  220. 0xc3,0x03,0x7a,0xce,0xfc,0xff,0xf7,0xa1,0x07,0x78,0xfc,0xef,0x3f,0xe0,0x01,
  221. 0xe6,0x01,0xfc,0xe1,0xf1,0x9c,0xc3,0xdf,0x11,0x3e,0xcc,0xff,0xef,0x19,0x03,
  222. 0x78,0xfc,0xc0,0x3f,0xe0,0x01,0xe0,0x01,0x78,0xe0,0xf0,0x8c,0xc3,0xe7,0x0e,
  223. 0x1e,0x84,0xb9,0xc0,0xdf,0x00,0x10,0x38,0xc0,0x1d,0xe0,0x00,0xf8,0x01,0x18,
  224. 0x60,0xf0,0xc4,0xfb,0xe0,0x03,0x06,0x00,0x18,0xc0,0x7e,0x00,0x00,0x1c,0x80,
  225. 0x00,0x20,0x00,0xfc,0x00,0x00,0x00,0x70,0xc0,0x08,0x20,0x00,0x00,0x00,0x0c,
  226. 0x40,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x40,
  227. 0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  228. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  229. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  230. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  231. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  232. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  233. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  234. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  235. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  236. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  237. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  238. 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  239. 0x00,0x00,0x00,0x00,0x30,0x80,0x8f,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
  240. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0xce,0x01,0x00,
  241. 0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  242. 0x00,0x3c,0x00,0xff,0x07,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  243. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x30,0xee,0x1f,0x00,0x7c,0x00,0x00,
  244. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x7c,
  245. 0xef,0xff,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  246. 0x00,0x00,0x00,0x00,0xfe,0xfc,0xdf,0xff,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,
  247. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xf8,0xcf,0x77,0x00,
  248. 0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  249. 0x00,0xe7,0xfd,0xdf,0x33,0x00,0xf7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  250. 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xfd,0xcf,0x1f,0x80,0xff,0x01,0x00,
  251. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc7,0xbd,
  252. 0x9f,0x0f,0xc0,0xc3,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  253. 0x00,0x00,0x00,0x80,0xc0,0x0f,0xdf,0x03,0x80,0xc0,0x01,0x00,0x00,0x00,0x00,
  254. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x8e,0x00,0x00,
  255. 0xc0,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  256. 0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  257. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  258. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  259. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  260. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  261. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  262. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  263. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  264. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  265. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  266. 0x00,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  267. 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x80,0x07,0x00,0x00,0x00,0x00,0x00,
  268. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x03,0x00,0x00,
  269. 0x0e,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x18,0x38,0x04,0x20,0x00,
  270. 0x00,0x00,0xe0,0x01,0x00,0x00,0x0e,0x00,0x00,0x00,0x80,0xe1,0x0f,0x00,0x00,
  271. 0x40,0x1e,0x3c,0x1f,0xf8,0x00,0x02,0x03,0xc0,0xf3,0x11,0x20,0x0e,0x18,0xdc,
  272. 0x47,0xe0,0xe1,0xff,0x00,0x00,0x60,0x1f,0xfc,0x7f,0xfc,0x83,0xc7,0x03,0xc0,
  273. 0xfb,0x0f,0x70,0x06,0x3c,0xee,0x3f,0xe0,0xc3,0x7f,0x00,0x00,0x70,0x1e,0x7c,
  274. 0xff,0xfb,0xdf,0xef,0x03,0xcf,0xf3,0x01,0x70,0x0e,0x3e,0xdf,0x07,0xe0,0xc3,
  275. 0x77,0x00,0x00,0x78,0x1e,0x7e,0xfe,0xff,0xbf,0xcf,0x01,0xdf,0xf3,0xb1,0xf2,
  276. 0x06,0x7c,0xcf,0xc7,0xe1,0x87,0x3f,0x00,0x00,0xf0,0x3e,0xfe,0xfe,0xf3,0x1f,
  277. 0xcf,0x01,0xff,0xf3,0x1f,0xff,0x07,0x7c,0xcf,0x7f,0xe0,0x87,0xbf,0x00,0x00,
  278. 0xf8,0x3f,0xf6,0x9e,0xe0,0x04,0xff,0x01,0xff,0xfb,0x01,0xff,0x07,0x78,0xef,
  279. 0x0f,0x70,0x0f,0xff,0x01,0x00,0xfc,0x3f,0xef,0x7d,0xe0,0x03,0xfe,0x01,0xff,
  280. 0xc3,0x31,0xfe,0x07,0xf8,0x0f,0x87,0x79,0x0f,0xcf,0x01,0x00,0xf8,0xfc,0xff,
  281. 0x3d,0xe0,0x01,0xee,0x01,0xff,0xc3,0x1d,0x9c,0x03,0x70,0x0f,0x77,0xfc,0x0f,
  282. 0xcf,0x00,0x00,0x78,0xfc,0xc1,0x3f,0xe0,0x01,0xe2,0x81,0xe7,0xc7,0x07,0x9c,
  283. 0x07,0x10,0x0f,0x3f,0x1c,0x1e,0xe7,0x00,0x00,0x18,0x3c,0xc0,0x1f,0xe0,0x00,
  284. 0xf0,0x01,0xc1,0xc3,0x03,0x8c,0x03,0x80,0x0f,0x0f,0x00,0x1c,0xe1,0x00,0x00,
  285. 0x00,0x38,0xc0,0x04,0x20,0x00,0xfc,0x00,0x80,0x81,0x00,0x00,0x03,0xe0,0x07,
  286. 0x02,0x00,0x06,0x70,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x70,0x00,0x80,
  287. 0x00,0x00,0x00,0x00,0x40,0x01,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
  288. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  289. 0x00,0x00,0x00
  290. };"""
  291.  
  292.  
  293. root = Tkinter.Tk()
  294. w = Tkinter.Canvas(root, width=400, height=400, background="#000000")
  295. w.pack()
  296.  
  297. logos = Tkinter.BitmapImage(data=logo,foreground="#ffffff", background="#000000", maskdata=logo)
  298. logos2 = Tkinter.BitmapImage(data=logo2,foreground="#ff0000", background="#000000", maskdata=logo2)
  299. logos3 = Tkinter.BitmapImage(data=logo3,foreground="#ffff00", background="#000000", maskdata=logo3)
  300.  
  301. star = []
  302. stars = 100
  303. for i in range(stars):
  304.  star.append([random.random()*400,random.random()*400,(random.random()*90)/100,w.create_line(0,0,0,0,fill="#ffffff")])
  305.  
  306. w.create_image(200,200,image=logos3) 
  307. w.create_image(200,200,image=logos2) 
  308. w.create_image(200,200,image=logos) 
  309.  
  310. try:
  311.  while 1:
  312.     for s in star:
  313.      x2 = s[0] - (200 - s[0]) * s[2] / (20.0 - (0 * 15.0))
  314.      y2 = s[1] - (200 - s[1]) * s[2] / (20.0 - (0 * 15.0))
  315.      w.coords(s[3],s[0],s[1],x2,y2)
  316.      s[0]-= (200 - s[0]) * 10 * s[2] / (200.0 - (0 * 150.0));
  317.      s[1]-= (200 - s[1]) * 10 * s[2] / (200.0 - (0 * 150.0));
  318.  
  319.      if((s[0] < 0 or s[1] < 0 or s[0] > 400 or s[1] > 400) or (s[0] == 200 and s[1] == 200)):
  320.       s[0] = random.random() * 400;
  321.       s[1] = random.random() * 400;
  322.     time.sleep(0.01)    
  323.     root.update_idletasks() # redraw
  324.     root.update() # process events
  325. except:
  326.  pass
  327.  
Dec 31 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.