From The Compiler, 6 Years ago, written in Python.
This paste is a reply to plugin generator from The Compiler
- view diff
Embed
  1. if q1.upper() == "PYTHON": #Because we all love python!
  2.     global f
  3.     try:
  4.         f = open("%s.py" % q2, "w")
  5.     except IOError:
  6.         pass
  7.     else:
  8.         f.write("#This plugin is automatic generated.\n")
  9.         f.write("#Plugin by: %s\n\n" % q3)
  10.         f.write("import xchat\n\n")
  11.         f.write('__module_name__ = "%s"\n' % q2)
  12.         f.write('__module_version__ = "1.0"\n')
  13.         f.write('__module_description__ = "%s"\n' % q4)
  14.         print("")
  15.         print("Plugin created: %s.py" % q2)
  16.     finally:
  17.         f.close