Changeset 1277
- Timestamp:
- Jun 2, 2014, 10:34:55 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/mcd/proto/cgi-bin/mcdcgi.py
r1078 r1277 18 18 import numpy as np 19 19 from modules import * 20 from modules import mcd21 20 22 21 import cStringIO … … 27 26 def gethtmlcoord(userinput,defmin,defmax): 28 27 import string 28 # remove leading and trailing space in order to use space as separator 29 userinput = userinput.strip() 29 30 # accepted separators. the symbol - should always be last. 30 separators = [":",";",",","/","_" ]31 separators = [":",";",",","/","_"," "] 31 32 # initial values 32 33 val = -9999. ; vals = None ; vale = None ; foundinterv = False … … 71 72 72 73 # create a MCD object 73 query=mcd.mcd() 74 # -- use in-code import to choose 75 # -- between official and dev versions 76 try: dev = form.getvalue("dev") 77 except: dev = "off" 78 if dev == "on": 79 from modules import mcd_dev 80 query=mcd_dev.mcd() 81 else: 82 from modules import mcd 83 query=mcd.mcd() 74 84 75 85 # set MCD version changes if needed … … 110 120 badinterv = (islatfree == -1) or (islonfree == -1) or (isloctfree == -1) or (isaltfree == -1) 111 121 if badinterv: 112 errormess = errormess+"<li>Bad syntax. Write a value (or) a range val1 ;val2 (or) 'all'. Separator shall be either ; : , / _"122 errormess = errormess+"<li>Bad syntax. Write a value (or) a range val1 val2 (or) 'all'. Separator shall be either ; : , / _ space" 113 123 badls = (query.datekey == 1 and (query.xdate < 0. or query.xdate > 360.)) 114 124 if badls: … … 215 225 try: reference = query.getnameset()+str(var1)+str(var2)+str(var3)+str(var4)+str(iswind)+str(isfixedlt)+str(iszonmean)+query.colorm+str(query.min2d)+str(query.max2d)+str(query.dpi)+str(islog) 216 226 except: reference = "test" 227 if dev == "on": reference = 'dev_'+reference 217 228 if yeaheps: figname = '../img/'+reference+'.eps' 218 229 else: figname = '../img/'+reference+'.png'
Note: See TracChangeset
for help on using the changeset viewer.