Un exemple:
- variables: minuscules (séparation des mots pas un underscore "_")
- fonctions: minuscules (séparation des mots par (…)
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
class MainWindows:
def __init__(self):
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
drawing_area = gtk.DrawingArea()
drawing_area.show()
drawable = drawing_area.window
gc = drawable.new_gc()
window.show_all()
def main():
gtk.main()
return (…)
class Server:
....def test:
........while True:
............while len(self.aClients)
................cl = Client()
................self.aClients.append(cl)
................cl.start()
##Recherche.py
...
def recherche(arguments divers)
...
try:
result_id = ldapconnection.search(basedn, scope, filtre)
except ldap.FILTER_ERROR, error_message:
print "Search filter error. (…)
= texte =
'''texte'''