Untitled

From lovetox, 2 Years ago, written in Plain Text, viewed 137 times. This paste will kick the bucket in 1 Second.
URL https://paste.gajim.org/view/9c529f48 Embed
Download Paste or View Raw
  1. import gi
  2. gi.require_version('Gtk', '3.0')
  3. from gi.repository import Gtk
  4.  
  5. xml = '''
  6. <interface>
  7.   <menu id="appmenu">
  8.     <section>
  9.       <item>
  10.         <attribute name="label">%s</attribute>
  11.       </item>
  12.     </section>
  13.   </menu>
  14. </interface>
  15. '''
  16.  
  17. a = '¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶'
  18. print(len(a))
  19.  
  20. int_ = [ord(char) for char in a]
  21. print(int_)
  22.  
  23. xml = xml % a
  24.  
  25. builder = Gtk.Builder()
  26. builder.add_from_string(xml)
  27.  

Reply to "Untitled"

Here you can reply to the paste above