[Bio] / FigKernelPackages / FIG.py Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4, Mon Feb 23 22:58:03 2004 UTC revision 1.5, Mon Mar 15 23:06:47 2004 UTC
# Line 236  Line 236 
236      new_url = urlparse.urlunparse(p)      new_url = urlparse.urlunparse(p)
237      return new_url      return new_url
238    
239    def get_seed_id():
240        #
241        # Retrieve the seed identifer from FIGdisk/config/seed_id.
242        #
243        # If it's not there, create one, and make it readonly.
244        #
245    
246        id_file = os.path.join(FIG_Config.fig_disk, "config", "seed_id")
247        if not os.path.isfile(id_file):
248    
249            fh = os.popen("uuidgen", "r")
250    
251            newid = fh.readline()
252    
253            fh.close()
254    
255            fh = open(id_file, "w")
256            print >>fh, newid
257            fh.close()
258    
259            os.chmod(id_file, 0444)
260    
261        fh = open(id_file)
262        id = fh.readline()
263        fh.close()
264        id = id.strip()
265        return id
266    
267  if __name__ == "__main__":  if __name__ == "__main__":
268    
269      print get_local_hostname()      print get_local_hostname()
270      print cgi_url()      print cgi_url()
271      print temp_url()      print temp_url()
272    
273        print get_seed_id()

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3