Home | History | Annotate | Download | only in ipsgui
      1   1. so for comments:
      2  
      3   # Here is a comment
      4  
      5   2. For Doc strings (the one that will be visible for the user looking 
      6   for the api/function description) tripple """:
      7  
      8   def some_ips_function(self, directory):
      9        """Return the pathname of the IPS directory,
     10        by given name."""
     11  
     12   3. Naming of the functions (we have this fine):
     13   small letters with "_" between words so for example:
     14  
     15   def some_ips_function(self, directory):
     16  
     17   4. Class names with cap words, so for example (here also we are fine):
     18   class IpsGui:
     19   
     20   5.  Maintain a 80 column border for printing, use '\' if needed.
     21   
     22   6.  Use ### item  for quick jumps
     23  
     24  
     25   This will keep our code clean, before we have more and more lines, so 
     26   later on it will be impossible to keep it right.
     27  
     28   Also I have small problem with some functions, because we are using 
     29   different spacing/tabs, this wouldn't be a problem with other language, 
     30   but python needs that :-(
     31  
     32   So what about 3 spaces (no tabs) for everything, for example:
     33  
     34   class IpsGui:
     35       #<- here are 3 spaces
     36       def __init__(self,parent):
     37          #<- here are 6 spaces
     38          while 1:
     39             #<- here are 9 spaces
     40             try:
     41                #<- here are 12 spaces
     42                print "Hello"
     43             except:
     44                pass
     45  
     46       #<- here are 3 spaces
     47       def run_gui(self, flags):
     48          #<- here are 6 spaces
     49          pass
     50  
     51