Commit 93c7246f authored by Yoann Pigné's avatar Yoann Pigné

rename...

parent 024d5eab
from gs_netstream.netstream_sender import NetStreamProxyGraph, NetStreamSender, Base64NetStreamTransport from gs_netstream.sender import NetStreamProxyGraph, NetStreamSender, Base64NetStreamTransport
transport = Base64NetStreamTransport("default","localhost",2001) transport = Base64NetStreamTransport("default","localhost",2001)
sender = NetStreamSender(transport) sender = NetStreamSender(transport)
proxy = NetStreamProxyGraph(sender) proxy = NetStreamProxyGraph(sender)
style = "node{fill-mode:plain;fill-color:gray;size:1px;} \ style = "node{fill-mode:plain;fill-color:gray;size:1px;}"
edge.one {fill-color:#EE44EE; size:3px;} \
edge.other {fill-color:lightgray;}"
proxy.addAttribute("stylesheet", style) proxy.addAttribute("stylesheet", style)
proxy.addAttribute("ui.antialias", True) proxy.addAttribute("ui.antialias", True)
...@@ -17,7 +14,5 @@ for i in range(0,500): ...@@ -17,7 +14,5 @@ for i in range(0,500):
proxy.addNode(str(i)) proxy.addNode(str(i))
if(i>0): if(i>0):
proxy.addEdge(str(i)+"_"+str(i-1), str(i), str(i-1),False) proxy.addEdge(str(i)+"_"+str(i-1), str(i), str(i-1),False)
proxy.addEdgeAttribute(str(i)+"_"+str(i-1), "ui.class", "one")
proxy.addEdge(str(i)+"__"+str(i/2), str(i), str(i/2), False) proxy.addEdge(str(i)+"__"+str(i/2), str(i), str(i/2), False)
proxy.addEdgeAttribute(str(i)+"__"+str(i/2), "ui.class", "other")
\ No newline at end of file
#!/usr/bin/env python #!/usr/bin/env python
# encoding: utf-8 # encoding: utf-8
""" """
graphstream.py common.py
Created by Yoann Pigné on 2011-08-21. Created by Yoann Pigné on 2011-08-21.
Copyright (c) 2011 University of Luxembourg. All rights reserved. Copyright (c) 2011 University of Luxembourg. All rights reserved.
......
#!/usr/bin/env python #!/usr/bin/env python
# encoding: utf-8 # encoding: utf-8
""" """
netstream_sender.py sender.py
This module implements a NetStream Sender This module implements a NetStream Sender
...@@ -15,8 +15,8 @@ import struct ...@@ -15,8 +15,8 @@ import struct
import types import types
import base64 import base64
from random import random from random import random
from graphstream import AttributeSink, ElementSink from common import AttributeSink, ElementSink
from netstream_constants import * from constants import *
class NetStreamTransport(object): class NetStreamTransport(object):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment