Package itools :: Package core

Package core

Classes
  LRUCache
LRU stands for Least-Recently-Used.
  OrderedDict
  frozendict
  frozenlist
  lazy
  thingy
  thingy_lazy_property
  thingy_property
  thingy_type
Functions
 
add_type(mimetype, extension)
 
become_daemon()
pid
fork()
Fork a child process.
 
freeze(value)
 
get_abspath(local_path, mname=None)
Returns the absolute path to the required file.
 
get_pipe(command, cwd=None)
Wrapper around 'subprocess.Popen'
 
get_sizeof(obj)
Return the size of an object and all objects refered by it.
 
get_time_spent(mode='both', since=0.0)
Return the time spent by the current process in seconds.
 
get_version(mname=None)
 
guess_all_extensions(mimetype)
 
guess_extension(mimetype)
 
guess_type(filename)
 
has_encoding(extension)
 
has_extension(extension)
 
merge_dicts(d, *args, **kw)
Merge two or more dictionaries into a new dictionary object.
 
read_subprocess(command=None)
 
send_subprocess(command, wait=True)
 
start_subprocess(path)
This methods starts another process that will be used to make questions to git.
 
stop_subprocess()
 
vmsize()
Function Details

fork()

 
Fork a child process. Return 0 to child process and PID of child to parent process.
Returns: pid

get_time_spent(mode='both', since=0.0)

 

Return the time spent by the current process in seconds.

mode user -> time in user mode mode system -> time in system mode mode both -> time in user mode + time in system mode

start_subprocess(path)

 
This methods starts another process that will be used to make questions to git. This is done so because we fork to call the git commands, and using an specific process for this purpose minimizes memory usage (because fork duplicates the memory).