A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Untitled - Stikked
From Funky Cat, 12 Years ago, written in Python.
Embed
  1. from Tkinter import *
  2. from ttk import *
  3. import urllib2
  4.  
  5. meme = StringVar()
  6. status = StringVar()
  7.  
  8. class App(Frame):
  9.  
  10.     def __init__(self, parent):
  11.         Frame.__init__(self, parent)  
  12.          
  13.         self.parent = parent
  14.        
  15.         self.initUI()
  16.        
  17.     def getMeme():
  18.         status.set("Connecting to the API...")
  19.         api = urllib2.urlopen("http://api.automeme.net/text")
  20.         status.set("Fetching...")
  21.         data = api.read()
  22.         meme_list = data.split('\n')
  23.         meme.set(meme_list[0])
  24.         status.set("Meme fetched.")
  25.         api.close()
  26.        
  27.     def initUI(self):
  28.         w = Label(self, text="Meme generator, By aha2Y.").pack(pady=01)
  29.         e = Entry(self, width=100, textvariable = meme).pack(pady=15)
  30.         b = Button(self, text="Generate meme", command=self.getMeme).pack()
  31.         l = Label(self, textvariable = status, borderwidth = 1, relief = SUNKEN, width=120).pack(pady=15)
  32.  
  33. def main():
  34.     root = Tk()
  35.     root.wm_title("Meme generator")
  36.     root.geometry("%dx%d%+d%+d" % (700, 145, 0, 0))
  37.     root.mainloop()  
  38.  
  39. if __name__ == '__main__':
  40.     main()  
  41.  
  42. ##Error:
  43.  
  44. Traceback (most recent call last):
  45.   File "C:\Users\Freenode\Desktop\test.py", line 5, in <module>
  46.     meme = StringVar()
  47.   File "C:\Program Files (x86)\Python\lib\lib-tk\Tkinter.py", line 251, in __ini
  48. t__
  49.     Variable.__init__(self, master, value, name)
  50.   File "C:\Program Files (x86)\Python\lib\lib-tk\Tkinter.py", line 182, in __ini
  51. t__
  52.     self._tk = master.tk
  53. AttributeError: 'NoneType' object has no attribute 'tk'
  54. Exception AttributeError: "StringVar instance has no attribute '_tk'" in <bound
  55. method StringVar.__del__ of <Tkinter.StringVar instance at 0x02049AA8>> ignored
  56.