-
Notifications
You must be signed in to change notification settings - Fork 7
/
.pythonrc
51 lines (45 loc) · 1019 Bytes
/
.pythonrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
# import rlcompleter
#readline.parse_and_bind("tab: complete")
import sys
import os
import vtk
import numpy
import cdtime
import vcs
import cdms2
import cdat_info
import cdutil
import genutil
# VTK
# renWin = vtk.vtkRenderWindow()
# ren = vtk.vtkRenderer()
# renWin.AddRenderer(ren)
# a = vtk.vtkActor()
# m = vtk.vtkPolyDataMapper()
# Sample data
try:
smpl_prfx = cdat_info.get_sampledata_path()
except:
smpl_prfx = os.path.join(sys.prefix,"sample_data")
fnm = os.path.join(smpl_prfx,'clt.nc')
fnmirr=os.path.join(smpl_prfx,'sampleGenGrid3.nc')
fnmcurv=os.path.join(smpl_prfx, 'sampleCurveGrid4.nc')
f=cdms2.open(fnm)
s=f("clt")
cdutil.times.setTimeBoundsMonthly(s)
t = s.getTime()
tc = t.asComponentTime()
# VCS
x=vcs.init(geometry={"width":800,"height":600})
iso=x.createisofill()
T=x.createtemplate()
def Classes(obj, firsttime=True):
if firsttime:
obj = obj.__class__
res = set()
for c in obj.__bases__:
res.add(c)
res.update(Classes(c, False))
return res
"""