Code Point
September 10, 2010, 07:22:11 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Geshi Sintax Hilighting Mod Installed. Tens of languages available.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Sintax Highlighting  (Read 2943 times)
CPN
Administrator
Jr. Member
*****

Karma: 0
Offline Offline

Posts: 11


WWW
« on: August 28, 2006, 05:45:36 PM »

The Geshi Sintax Highlighting Mod has been installed providing sintax coloring for tens of languages.

To use it open the combo box named Geshi and choose the language. Then add the code between the tags.

Code
class Super:
  def __init__(self): pass
  def method(self):
     print 'in Super.method'
  def delegate(self):
     self.action()
 
class Inheritor(Super):
  pass
 
class Replacer(Super):
  def method(self):
     print 'in Replacer.method'
 
class Extender(Super):
  def method(self):
     print 'starting Extender.method'
     Super.method(self)
     print 'ending Extender.method'
     
class Provider(Super):
  def action(self):
     print 'in Provider.action'
     
if __name__ == '__main__':
  for klass in (Inheritor, Replacer, Extender):
     print '\n' + klass.__name__ + '...'
     klass().method()
     
print '\nProvider'
x = Provider()
x.delegate()
 
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!