source: TI03-DataExtractor/branches/old_stuff/dx_source/for_usr_local/dx/doc/common.html @ 793

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/old_stuff/dx_source/for_usr_local/dx/doc/common.html@793
Revision 793, 9.1 KB checked in by astephen, 13 years ago (diff)

Put all the old code in the old_stuff branch.

Line 
1
2<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module common</title>
4</head><body bgcolor="#f0f0f8">
5
6<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
7<tr bgcolor="#7799ee">
8<td valign=bottom>&nbsp;<br>
9<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>common</strong></big></big></font></td
10><td align=right valign=bottom
11><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/dx-0.1.1/common.py">/usr/local/dx-0.1.1/common.py</a></font></td></tr></table>
12    <p><tt>common.py<br>
13=========<br>
14&nbsp;<br>
15Holds&nbsp;common&nbsp;functions&nbsp;and&nbsp;classes&nbsp;used&nbsp;in&nbsp;the&nbsp;Data&nbsp;Extractor&nbsp;software.</tt></p>
16<p>
17<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
18<tr bgcolor="#aa55cc">
19<td colspan=3 valign=bottom>&nbsp;<br>
20<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
21   
22<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
23<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br>
24</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
25<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
26<tr bgcolor="#ee77aa">
27<td colspan=3 valign=bottom>&nbsp;<br>
28<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
29   
30<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
31<td width="100%"><dl>
32<dt><font face="helvetica, arial"><a href="common.html#RedirectStdout">RedirectStdout</a>
33</font></dt></dl>
34 <p>
35<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
36<tr bgcolor="#ffc8d8">
37<td colspan=3 valign=bottom>&nbsp;<br>
38<font color="#000000" face="helvetica, arial"><a name="RedirectStdout">class <strong>RedirectStdout</strong></a></font></td></tr>
39   
40<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
41<td colspan=2><tt><a href="#RedirectStdout">RedirectStdout</a>&nbsp;class&nbsp;-&nbsp;used&nbsp;to&nbsp;direct&nbsp;standard&nbsp;output&nbsp;away&nbsp;from<br>
42the&nbsp;screen&nbsp;in&nbsp;CGI&nbsp;scripts.<br>&nbsp;</tt></td></tr>
43<tr><td>&nbsp;</td>
44<td width="100%">Methods defined here:<br>
45<dl><dt><a name="RedirectStdout-flush"><strong>flush</strong></a>(self)</dt><dd><tt>Method&nbsp;to&nbsp;do&nbsp;nothing,&nbsp;again!</tt></dd></dl>
46
47<dl><dt><a name="RedirectStdout-write"><strong>write</strong></a>(self, item)</dt><dd><tt>write&nbsp;method&nbsp;-&nbsp;allows&nbsp;dummy&nbsp;standard&nbsp;out&nbsp;to&nbsp;work.</tt></dd></dl>
48
49</td></tr></table></td></tr></table><p>
50<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
51<tr bgcolor="#eeaa77">
52<td colspan=3 valign=bottom>&nbsp;<br>
53<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
54   
55<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
56<td width="100%"><dl><dt><a name="-checkSubDirectory"><strong>checkSubDirectory</strong></a>(user<font color="#909090">=None</font>)</dt><dd><tt>checkSubDirectory&nbsp;method&nbsp;-&nbsp;checks&nbsp;if&nbsp;the&nbsp;required&nbsp;sub-directory&nbsp;exists<br>
57to&nbsp;write&nbsp;the&nbsp;output&nbsp;and&nbsp;if&nbsp;not&nbsp;it&nbsp;creates&nbsp;it.</tt></dd></dl>
58 <dl><dt><a name="-compareAxes"><strong>compareAxes</strong></a>(ax1, ax2)</dt><dd><tt>Takes&nbsp;2&nbsp;cdms&nbsp;axis&nbsp;objects&nbsp;returning&nbsp;1&nbsp;if&nbsp;they&nbsp;are&nbsp;essentially<br>
59the&nbsp;same&nbsp;and&nbsp;0&nbsp;if&nbsp;not.</tt></dd></dl>
60 <dl><dt><a name="-compareGrids"><strong>compareGrids</strong></a>(grid1, grid2)</dt><dd><tt>Takes&nbsp;2&nbsp;cdms&nbsp;grid&nbsp;objects&nbsp;returning&nbsp;1&nbsp;if&nbsp;they&nbsp;are&nbsp;essentially&nbsp;<br>
61the&nbsp;same&nbsp;and&nbsp;0&nbsp;if&nbsp;not.</tt></dd></dl>
62 <dl><dt><a name="-createTimeKeyList"><strong>createTimeKeyList</strong></a>()</dt><dd><tt>Returns&nbsp;all&nbsp;the&nbsp;separate&nbsp;date&nbsp;and&nbsp;time&nbsp;component&nbsp;arguments&nbsp;required&nbsp;as&nbsp;a&nbsp;list.</tt></dd></dl>
63 <dl><dt><a name="-getValuesInRange"><strong>getValuesInRange</strong></a>(start, end, array)</dt><dd><tt>getValuesInRange&nbsp;function&nbsp;-&nbsp;takes&nbsp;a&nbsp;start&nbsp;and&nbsp;end&nbsp;value&nbsp;and&nbsp;returns&nbsp;the<br>
64values&nbsp;in&nbsp;the&nbsp;array&nbsp;that&nbsp;are&nbsp;between&nbsp;them.</tt></dd></dl>
65 <dl><dt><a name="-isUndefined"><strong>isUndefined</strong></a>(dict, item)</dt><dd><tt>Function&nbsp;that&nbsp;returns&nbsp;1&nbsp;if&nbsp;item&nbsp;is&nbsp;not&nbsp;a&nbsp;key&nbsp;in&nbsp;dict&nbsp;or<br>
66is&nbsp;defined&nbsp;as&nbsp;None&nbsp;in&nbsp;dict.</tt></dd></dl>
67 <dl><dt><a name="-makeDirsAndPerms"><strong>makeDirsAndPerms</strong></a>(basedir, dirs, permissions, owner, verbose<font color="#909090">='no'</font>)</dt><dd><tt>A&nbsp;function&nbsp;for&nbsp;making&nbsp;directories&nbsp;recursively&nbsp;and&nbsp;setting&nbsp;permissions/ownership.</tt></dd></dl>
68 <dl><dt><a name="-overlap"><strong>overlap</strong></a>(list1, list2)</dt><dd><tt>overlap&nbsp;function&nbsp;-&nbsp;returns&nbsp;a&nbsp;list&nbsp;of&nbsp;overlapping&nbsp;items&nbsp;in&nbsp;list1&nbsp;and&nbsp;list2.&nbsp;<br>
69Otherwise&nbsp;returns&nbsp;None.</tt></dd></dl>
70</td></tr></table><p>
71<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
72<tr bgcolor="#55aa55">
73<td colspan=3 valign=bottom>&nbsp;<br>
74<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
75   
76<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
77<td width="100%"><strong>ADMIN_MAIL_ADDRESS</strong> = 'yourmail@yourhost'<br>
78<strong>ADMIN_NOTIFICATION</strong> = 0<br>
79<strong>BASEDIR</strong> = '/usr/local/dx'<br>
80<strong>CDAT_BIN_PATH</strong> = '/usr/local/cdat/bin'<br>
81<strong>CF_METADATA_GLOBAL_ATTRIBUTES</strong> = {'comments': 'Created by test data extractor.'}<br>
82<strong>CF_METADATA_GLOBAL_ATTRIBUTE_KEYS</strong> = ['Conventions', 'title', 'source', 'institution', 'history', 'references', 'comment']<br>
83<strong>CGI_NAME</strong> = 'http://localhost/cgi-bin/dxui.py'<br>
84<strong>CONFIRMATION_PAGE</strong> = 1<br>
85<strong>DEBUG</strong> = 1<br>
86<strong>DOMAIN_PARAMS</strong> = ('start_time', 'end_time', 'time_interval', 'horiz_domain', 'resolution', 'vertical_units', 'vertical_domain', 'outputFormat')<br>
87<strong>EXTRAS_DIR</strong> = '/dx_extra'<br>
88<strong>HORIZ_KEYS</strong> = ['northernExtent', 'easternExtent', 'southernExtent', 'westernExtent']<br>
89<strong>HTML_DIR</strong> = '/usr/local/dx/html'<br>
90<strong>HTTP_HEADER</strong> = 'Content-Type: text/html<font color="#c040c0">\n\n</font>'<br>
91<strong>HTTP_OUTPUT_DIR</strong> = 'http://localhost/output'<br>
92<strong>HTTP_REQUEST_XML_DIR</strong> = 'http://localhost/request_xmls'<br>
93<strong>INPUT_DATASETS_FILE</strong> = '/usr/local/dx/datasets/inputDatasets.xml'<br>
94<strong>LEFT_LOGO</strong> = 'dx_logo.jpg'<br>
95<strong>LOCAL_CGI_NAME</strong> = '/srv/www/cgi-bin/cgiInterface.py'<br>
96<strong>LOCAL_MAIL_HOST</strong> = 'youroutbox.yourdomain'<br>
97<strong>LOCAL_PYTHONPATH</strong> = ['YOUR_CDAT/lib/python2.4', 'YOUR_CDAT/lib/python2.4/site-packages', 'YOUR_CDAT/cdat/lib/python2.4/site-packages/Numeric', 'YOUR_CDAT/lib/python2.3', 'YOUR_CDAT/lib/python2.3/site-packages', 'YOUR_CDAT/cdat/lib/python2.3/site-packages/Numeric']<br>
98<strong>LOCAL_RULES</strong> = 0<br>
99<strong>LOGO_DIR</strong> = '/dx_extra/logos'<br>
100<strong>MAP_APPLET</strong> = '/dx_extra/LiveMap_30/extractorMap.html'<br>
101<strong>MAX_FILE_SIZE</strong> = 1<br>
102<strong>MAX_NUM_DATASETS</strong> = 2<br>
103<strong>MESSAGE_TO_USERS</strong> = 'This is a test version of the Data Extractor so ...error occurs so that we can improve this service.'<br>
104<strong>NAPPY_PATH</strong> = '/usr/local/nappy'<br>
105<strong>OUTPUT_DIR</strong> = '/srv/www/htdocs/output'<br>
106<strong>OUTPUT_DIR_PERMISSION</strong> = 493<br>
107<strong>OUTPUT_FILE_GROUP</strong> = 'users'<br>
108<strong>OUTPUT_FILE_PERMISSION</strong> = 420<br>
109<strong>OUTPUT_FILE_USER</strong> = 'wwwrun'<br>
110<strong>OUTPUT_FORMATS</strong> = ['NetCDF', 'NASA Ames']<br>
111<strong>PACKAGE_NAME</strong> = 'Data Extractor'<br>
112<strong>PROCESS_LIST_DIR</strong> = '/usr/local/dx/processes'<br>
113<strong>REGISTRATION_PAGE</strong> = 'http://yourhost/your_link.html'<br>
114<strong>REQUEST_DIR</strong> = '/usr/local/dx/requests'<br>
115<strong>REQUEST_SIZE_LIMIT</strong> = 100<br>
116<strong>REQUEST_XML_DIR</strong> = '/srv/www/htdocs/request_xmls'<br>
117<strong>RESTRICTED_DATA</strong> = 0<br>
118<strong>RIGHT_LOGO</strong> = 'dx_logo.jpg'<br>
119<strong>STAGES</strong> = ['DatasetGroupPage', 'DatasetPage', 'VariablesPage', 'DomainPage', 'ResultsPage']<br>
120<strong>TIME_KEYS</strong> = ['Year', 'Month', 'Day', 'Hour', 'Minute', 'Second']<br>
121<strong>TIMING_SCALE_FACTOR</strong> = 1.0000000000000001e-05<br>
122<strong>TOP_LEVEL</strong> = 'datasetGroup'<br>
123<strong>USER_HOMEDIR</strong> = '/var/lib/wwwrun'<br>
124<strong>VISUALISOR_NAME</strong> = '/cgi-bin/splatui-0.1.1.py'</td></tr></table>
125</body></html>
Note: See TracBrowser for help on using the repository browser.