summaryrefslogtreecommitdiff
path: root/bin/pychart/pychart_types.py
diff options
context:
space:
mode:
authorVo Minh Thu <vmt@openerp.com>2011-02-07 13:57:23 +0100
committerVo Minh Thu <vmt@openerp.com>2011-02-07 13:57:23 +0100
commitf8572e5c602798f37c2a94d54ab5e3ac79ff0185 (patch)
tree35687977b932ac91bd31fece229ab78cc70926f5 /bin/pychart/pychart_types.py
parent9c287abc143a7b187635c75751a29baeefa58c15 (diff)
[IMP] openerp python module.
- Some logging code moved from netsvc.py to loglevels.py - Changed imports to use the new openerp module - config and netsvc initialization calls move to openerp-server.py - Moved openerp-server.py outside the old bin directory - Some imports in tools moved inside the methods to break mutual-dependencies bzr revid: vmt@openerp.com-20110207125723-ooee7d7ng5elmkso
Diffstat (limited to 'bin/pychart/pychart_types.py')
-rw-r--r--bin/pychart/pychart_types.py71
1 files changed, 0 insertions, 71 deletions
diff --git a/bin/pychart/pychart_types.py b/bin/pychart/pychart_types.py
deleted file mode 100644
index e8d8a4174f4..00000000000
--- a/bin/pychart/pychart_types.py
+++ /dev/null
@@ -1,71 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2000-2005 by Yasushi Saito (yasushi.saito@gmail.com)
-#
-# Jockey is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2, or (at your option) any
-# later version.
-#
-# Jockey is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
-#
-import pychart_util
-import types
-AnyType = 9998
-
-def CoordType(val):
- if type(val) != types.TupleType and type(val) != types.ListType:
- return (" not a valid coordinate.")
- if len(val) != 2:
- return "Coordinate must be a pair of numbers.\n"
- if val[0] != None:
- error = NumType(val[0])
- if error: return error
- if val[1] != None:
- error = NumType(val[1])
- if error: return error
- return None
-
-def IntervalType(val):
- if type(val) in (types.IntType, types.LongType,
- types.FloatType, types.FunctionType):
- return None
- return "Expecting a number or a function"
-
-def CoordOrNoneType(val):
- if type(val) not in (types.TupleType, types.ListType):
- return "Expecting a tuple or a list."
- if len(val) != 2:
- return "Coordinate must be a pair of numbers.\n"
- for v in val:
- if v != None and NumType(val[0]) != None:
- return "Expecting a pair of numbers"
- return None
-
-def NumType(val):
- if type(val) in (types.IntType, types.LongType, types.FloatType):
- return None
- else:
- return "Expecting a number, found \"" + str(val) + "\""
-
-def UnitType(val):
- if type(val) in (types.IntType, types.LongType, types.FloatType):
- return None
- else:
- return "Expecting a unit, found \"" + str(val) + "\""
-
-def ShadowType(val):
- if type(val) not in (types.TupleType, types.ListType):
- return "Expecting tuple or list."
- if len(val) != 3:
- return "Expecting (xoff, yoff, fill)."
- return None
-
-def FormatType(val):
- if type(val) in (types.StringType, types.FunctionType):
- return None
- return "Format must be a string or a function"
-