code: def drawstarsfile(self, filename, r = 10, colour = None):
          
          if not os.path.isfile(filename):
              print "File does not exist :"
              print filename
              print "Line format to write : name x y [other stuff ...]"
              raise RuntimeError, "Cannot read star catalog."
      
          catfile = open(filename, "r")
          lines = catfile.readlines()
          catfile.close
          dictlist=[] # We will append dicts here.
          for i, line in enumerate(lines):
              if line[0] == '#' or len(line) < 4:
                  continue
              elements = line.split()
              nbelements = len(elements)
              if nbelements < 3:
                  print "Format error on line", i+1, "of :"
                  print filename
                  print "We want : name x y [other stuff ...]"
                  raise RuntimeError, "Cannot read star catalog."
      
              name = elements[0]
              x = float(elements[1])
              y = float(elements[2])
              dictlist.append({"name":name, "x":x, "y":y})
      
          if self.verbose :
              print "I've read %i stars from :"
              print os.path.split(filename)[1]
          
          
          self.drawstarslist(dictlist, r = r, colour = colour)
docs: Same as drawstarlist but we read the stars from a file.
          Here we read a text file of hand picked stars. Same format as for cosmouline, that is :
          # comment
          starA    23.4    45.6    [other stuff...]
          Then we pass this to drawstarlist,