wiiutils.py
Go to the documentation of this file.
1 ################################################################################
2 #
3 # File: wiiutils.py
4 # RCS: $Header: $
5 # Description: Various handy utilities
6 # Author: Andreas Paepcke
7 # Created: Thu Aug 13 15:11:56 2009
8 # Modified: Thu Aug 13 15:22:45 2009 (Andreas Paepcke) paepcke@anw.willowgarage.com
9 # Language: Python
10 # Package: N/A
11 # Status: Experimental (Do Not Distribute)
12 #
13 #
14 ################################################################################
15 
16 import sys
17 import time
18 import wiimoteConstants as acConst
19 from math import sqrt
20 import numpy as np
21 import random
22 
23 #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
24 #
25 # Functions
26 #
27 #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
28 
29 
30 def report(str, debuglevel=acConst._DEBUGLEVEL):
31  """For error reporting, controlled by debuglevel."""
32  if debuglevel > 0:
33  print >> sys.stderr, str
34  return
35 
36 def log(str, file=None):
37  if acConst._MONITOR_LEVEL > 0:
38  print >> sys.stderr, str
39 
40 
41 def promptUsr(str):
42  """Prompting user."""
43  print >> sys.stderr, str
44  return
45 
47  """Return current time as float of seconds since beginning of Epoch."""
48  return time.time()
49 
50 
51 if __name__ == '__main__':
52 
53  foo = np.array([(4.0,3.0,3.0)])
54  bar = np.array([(4.0,3.0,3.0)])
55 
56  isGreater = np.greater(foo,bar)
57  isBad = np.greater(foo,bar).any()
58  test = (foo > bar).any()
59 
60 
61  print repr(isGreater)
62  print isBad
63  print test
64 
def getTimeStamp()
Definition: wiiutils.py:46
def report(str, debuglevel=acConst._DEBUGLEVEL)
Definition: wiiutils.py:30
def log(str, file=None)
Definition: wiiutils.py:36
def promptUsr(str)
Definition: wiiutils.py:41


wiimote
Author(s): Andreas Paepcke, Melonee Wise, Mark Horn
autogenerated on Mon Jun 10 2019 13:42:43