microprobe.utils.misc

microprobe.utils.misc module

Functions

RNDFP([x, y])

Returns a random floating point between x and y

RNDINT([maxmin])

Returns a random integer between 0 and 2^32.

closest_divisor(target, closer)

param target:

compress_file(source)

dict2OrderedDict(my_dict)

param my_dict:

findfiles(paths, regexp[, full, maxcount])

param paths:

getnextf(itr)

int_to_twocs(val, bits)

compute the two compliment of a int

iter_flatten(iterable)

param iterable:

longest_common_substr(str1, str2)

param str1:

move_file(source, target)

natural_sort(input_list)

param input_list:

open_generic_fd(filename, mode)

primes(number)

param number:

range_to_sequence(start, *args)

range_to_sequence_float(start, *args)

shift_with_sign(val, bits, shift)

shift value extending sign in twocs format

smart_copy_dict(olddict)

param olddict:

twocs_to_int(val, bits)

compute the int value of a two compliment int

which(program)

param program:

Classes

Pickable()

A helper class to implement the pickling interface.

Progress(total[, msg, out])

A counting progress indicator.

RejectingDict

A dictionary that raise an exception if the key is already set.

RejectingOrderedDict

An ordered dictionary that raises an exception if key is already set.

Classes diagram

Inheritance diagram of Pickable, Progress, RejectingDict, RejectingOrderedDict



Functions

RNDFP(x=0, y=1)[source]

Returns a random floating point between x and y

RNDINT(maxmin=None)[source]

Returns a random integer between 0 and 2^32.

closest_divisor(target, closer)[source]
Parameters:
  • target

  • closer

compress_file(source)[source]
dict2OrderedDict(my_dict)[source]
Parameters:

my_dict

findfiles(paths, regexp, full=False, maxcount=10000)[source]
Parameters:
  • paths

  • regexp

getnextf(itr)[source]
int_to_twocs(val, bits)[source]

compute the two compliment of a int

iter_flatten(iterable)[source]
Parameters:

iterable

longest_common_substr(str1, str2)[source]
Parameters:
  • str1

  • str2

move_file(source, target)[source]
natural_sort(input_list)[source]
Parameters:

input_list

open_generic_fd(filename, mode)[source]
primes(number)[source]
Parameters:

number

range_to_sequence(start, *args)[source]
range_to_sequence_float(start, *args)[source]
shift_with_sign(val, bits, shift)[source]

shift value extending sign in twocs format

smart_copy_dict(olddict)[source]
Parameters:

olddict

twocs_to_int(val, bits)[source]

compute the int value of a two compliment int

which(program)[source]
Parameters:

program