My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
#
# example of PyMetaInfo process usage
#

import sys
from pprint import pprint
from pyflowctrl.core4 import Packet, ProcessFlow
from pyflowctrl.core4.processes.pymetainfo1 import PyMetaInfo

if len(sys.argv) <> 2:
print "Please specify module"
sys.exit()

network = {
'processes': {
'meta_extract': PyMetaInfo(),
},
'links': {},
}

flow = ProcessFlow()
flow.upload(network)
flow.pmap['meta_extract'].input.put(Packet(module=sys.argv[1]))
flow.run()
pprint(flow.pmap['meta_extract'].output.get().dump())

Change log

fe1eb7ef5a3f by Andrey Usov <ownport> on Jan 11, 2012   Diff
pyflowctrl/core4/examples/pymetainfo1.py,
example of PyMetaInfo usage
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 562 bytes, 27 lines
Powered by Google Project Hosting