[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.11.2.1, Fri Jun 17 18:16:56 2005 UTC revision 1.13, Mon Dec 5 19:06:30 2005 UTC
# Line 1  Line 1 
1    #
2    # Copyright (c) 2003-2006 University of Chicago and Fellowship
3    # for Interpretations of Genomes. All Rights Reserved.
4    #
5    # This file is part of the SEED Toolkit.
6    #
7    # The SEED Toolkit is free software. You can redistribute
8    # it and/or modify it under the terms of the SEED Toolkit
9    # Public License.
10    #
11    # You should have received a copy of the SEED Toolkit Public License
12    # along with this program; if not write to the University of Chicago
13    # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14    # Genomes at veronika@thefig.info or download a copy from
15    # http://www.theseed.org/LICENSE.TXT.
16    #
17    
18  import urlparse  import urlparse
19  import socket  import socket
20  import os  import os
# Line 253  Line 270 
270    
271      return ip      return ip
272    
273    def top_link():
274    
275        #
276        # Determine if this is a toplevel cgi or one in one of the subdirs (currently
277        # just /p2p).
278        #
279    
280        sname = os.getenv("SCRIPT_NAME")
281    
282        if sname is not None:
283            parts = os.getenv("SCRIPT_NAME").split('/');
284    
285            if len(parts) > 2 and parts[-2] == 'FIG':
286                top = '.'
287            elif len(parts) > 3 and parts[-3] == 'FIG':
288                top = '..'
289            else:
290                top = FIG_Config.cgi_base
291        else:
292            top = FIG_Config.cgi_base
293    
294    
295    
296        return top
297    
298  def cgi_url():  def cgi_url():
299      return plug_url(FIG_Config.cgi_url)      return top_link()
300        # return plug_url(FIG_Config.cgi_url)
301    
302  def temp_url():  def temp_url():
303      return plug_url(FIG_Config.temp_url)      return plug_url(FIG_Config.temp_url)
# Line 275  Line 318 
318      new_url = urlparse.urlunparse(p)      new_url = urlparse.urlunparse(p)
319      return new_url      return new_url
320    
 def verify_dir(d):  
     if not os.path.isdir(d):  
         dirname = os.path.dirname(d)  
         verify_dir(dirname)  
         os.mkdir(d)  
         print "mkdir ", d  
   
         os.chmod(d, 0777)  
   
321  def get_seed_id():  def get_seed_id():
322      #      #
323      # Retrieve the seed identifer from FIGdisk/config/seed_id.      # Retrieve the seed identifer from FIGdisk/config/seed_id.

Legend:
Removed from v.1.11.2.1  
changed lines
  Added in v.1.13

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3