Advertisement
monsterherz

Untitled

May 14th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.37 KB | None | 0 0
  1. import re
  2.  
  3. translation_table = {‚En blanco‘:’In weiß‘,
  4. ‚En negro‘:’schwarz‘,
  5. ‚NARIZ‘:’Nase‘,
  6. ‚Brazos‘:’Arme‘,
  7. ‚BRAZOS‘:’Arme‘,
  8. ‚pe‘:’Stäbchen‘,
  9. ‚PIERNAS‘:’Beine‘,
  10. ‚pe‘:’Stäbchen‘,
  11. ‚Anillo mágico de‘:’Fadenring‘,
  12. ‚pb‘:’fM‘,
  13. ‚ronda‘:’Runde‘,
  14. ‚au‘:’zun‘,
  15. ‚mv‘:’halbes Stäbchen‘,
  16. in next st‘:’in die nächsten Maschen‘,
  17. in next 2 st‘:’in 2 Maschen‘,
  18. in next 8 st‘:’in die nächsten 8 Maschen‘,
  19. dis‘:’abn‘,
  20. 6 sc in magic ring‘:’6 fM in den Fadenring‘,
  21. in the next‘:’in die nächsten‘,
  22. ’sl st‘ :’KM‘,
  23. in all‘ : ‚in Alle‘,
  24. ’st‘:’Masche‘,
  25. in next‘:’in die nächsten‘,
  26. ‚repeat 3 times‘:’3x wiederholen‘,
  27. ‚repeat 4 times‘ : ‚4x wiederholen‘,
  28. ‚repeat 2 times‘ : ‚2x wiederholen‘,
  29. ‚fM in all 18 st‘:’fM in alle 61 Maschen‘,
  30. ‚CABEZA‘:’Kopf‘,
  31. ‚V1′:’Runde 1,
  32. ‚V2′:’Runde 2,
  33. ‚V3′:’Runde 3,
  34. ‚V4′:’Runde 4,
  35. ‚V5′:’Runde 5,
  36. ‚V6′:’Runde 6,
  37. ‚V7′:’Runde 7,
  38. ‚V8′:’Runde 8,
  39. ‚V9′:’Runde 9,
  40. ‚V10′:’Runde 10,
  41. ‚V11′:’Runde 11,
  42. ‚V12′:’Runde 12,
  43. ‚V13′:’Runde 13,
  44. ‚V14′:’Runde 14,
  45. ‚V15′:’Runde 15,
  46. ‚V16′:’Runde 16,
  47. ‚V17′:’Runde 17,
  48. ‚V18′:’Runde 18,
  49. ‚V19′:’Runde 19,
  50. ‚V20′:’Runde 20,
  51. ‚V21′:’Runde 21,
  52. ‚V22′:’Runde 22,
  53. ‚anillo magico de‘:’Fadenring‘,
  54. ‚vuelta‘:’wenden‘,
  55. ‚cad‘:’Luftmasche‘,
  56. ’nariz‘:’Nase‘,
  57. ‚PIERNAS‘:’Beine‘}
  58.  
  59. pattern = re.compile(r’\b(‚ + ‚|‘.join(translation_table.keys()) +r‘)\b‘)
  60. result = pattern.sub(lambda x : translation_table[x.group()], Anleitungstext)
  61. print(result)
  62.  
  63. # CODE tkinter
  64.  
  65. from tkinter import *
  66.  
  67. def buttonClick1():
  68. print(„Es wurde Englisch ausgewählt“)
  69. def buttonClick2():
  70. print („Es wurde Russisch ausgewählt“)
  71.  
  72. Fenster=Tk()
  73. Anzeige=Label(Fenster, text=“Hallo“)
  74. Anzeige.pack()
  75.  
  76. print („Bitte wählen Sie die Sprache“)
  77. Button1=Button (Fenster, text=“Englisch“ , command=buttonClick1())
  78. Button2=Button (Fenster, text=“Russisch“,command=buttonClick2() )
  79. Button1.pack()
  80. Button2.pack()
  81. Fenster.mainloop()
  82.  
  83. Sprache=“Englisch“
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement