Skip to content

MapColonies/osmeterium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OSMeterium

The osmeterium is a defensive organ found in all papilionid larvae, in all stages.

A simple wrapper for Popen to meet MapColonies org needs for running background processes and pipe the output.

Usage

Async

t = run_command_async('ping -c 5 www.google.com',
        (lambda x: print('Hey this stdout output {0}'.format(x))),
        (lambda x: print('Hey this stderr output {0}'.format(x))),
        (lambda y: print('This is exit code ${0}'.format(y))),
        (lambda: print('Command success'))) #  return a Thread Object
t.join()

Sync

run_command('ping -c 5 www.google.com',
        (lambda x: print('Hey this stdout output {0}'.format(x))),
        (lambda x: print('Hey this stderr output {0}'.format(x))),
        (lambda y: print('This is exit code ${0}'.format(y))),
        (lambda: print('Command success')))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages