sumolib.miscutils
index
/home/delphi/gcc/sumo/tools/sumolib/miscutils.py

# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2012-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0/
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the Eclipse
# Public License 2.0 are satisfied: GNU General Public License, version 2
# or later which is available at
# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later

 
Modules
       
colorsys
math
os
random
socket
sys
time

 
Classes
       
Colorgen
working_dir

 
class Colorgen
     Methods defined here:
__call__(self)
return constant or randomized rgb-color string
__init__(self, hsv, cycleLength=10.67)
byteTuple(self)
return color as a tuple of bytes each in [0,255]
floatTuple(self)
return color as a tuple of floats each in [0,1]
get_value(self, opt, index)

Data and other attributes defined here:
DISTINCT = [(0.17, 1.0, 0.5), (0.0, 0.9, 1.0), (0.35, 0.67, 0.71), (0.14, 0.9, 1.0), (0.56, 1.0, 0.78), (0.07, 0.8, 0.96), (0.79, 0.83, 0.71), (0.5, 0.71, 0.94), (0.84, 0.79, 0.94), (0.2, 0.76, 0.96), (0.0, 0.24, 0.98), (0.5, 1.0, 0.5), (0.77, 0.25, 1.0), (0.09, 0.76, 0.67), (0.15, 0.22, 1.0), (0.0, 1.0, 0.5), (0.38, 0.33, 1.0), (0.67, 1.0, 0.5)]

 
class working_dir
    temporarily change working directory using 'with' statement
 
  Methods defined here:
__enter__(self)
__exit__(self, type, value, traceback)
__init__(self, dir)

 
Functions
       
benchmark(func)
decorator for timing a function
euclidean(a, b)
# euclidean distance between two coordinates in the plane
getFreeSocketPort(numTries=10)
getSocketStream(port, mode='rb')
humanReadableTime(seconds)
parseBool(val)
parseTime(t, factor=1)

 
Data
        absolute_import = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0), 16384)
division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)
print_function = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536)
uMax = uMax
uMin = uMin