<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>If IDLE is so unhelpful as to not clarify where in this code the syntax error is, I suggest you use a more helpful tool.</div><div><br></div><div>Or even... why not just run POX on your local machine and load up this module to get a helpful error message from Python which will point out close to exactly where the syntax error is?  I can't imagine that would be any more time and trouble than asking the POX list to act as a Python syntax checker.</div><div><br></div><div>All that said, it appears you have unbalanced parentheses on the line where you set "Host1 IP address".  Remove the first opening "(".  Maybe that will help.</div><div><br></div><div>-- Murphy</div><div><br><div><div>On Apr 26, 2014, at 10:58 AM, kofi adu <<a href="mailto:kofiadubb@yahoo.com">kofiadubb@yahoo.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"><div class="" style=""><span class="" style="">Hello murphy</span></div><div class="" style="font-size: 16px; background-color: transparent"><span class="" style=""><br class="" style=""></span></div><div class="" style="font-size: 16px; background-color: transparent"><span class="" style="">i have developed a pox controller in python IDLE.  i tried to use RUN MODULE/ CHECK MODULE to check for syntax errors before i log it on my VM.  i get this syntax:</span></div><div class="" style="background-color: transparent"><span class="" style=""><br class="" style=""></span></div><div class="" style="background-color: transparent"><span class="" style="">:there is an error in your program-syntax error: (msg). do you know how i can fix that?</span></div><div class="" style="background-color:
 transparent"><span class="" style=""><br class="" style=""></span></div><div class="" style="background-color: transparent"><span class="" style="white-space: pre">       </span>msg = nx.nx_flow_mod()</div><div class="" style="background-color: transparent">        msg.data = event.ofp</div><div class="" style="background-color: transparent">        msg.table_id = 0</div><div class="" style="background-color: transparent">        msg.priority = 3323</div><div class="" style="background-color: transparent">        msg.idle_timeout = OFP_FLOW_PERMANENT</div><div class="" style="background-color: transparent">        msg.hard_timeout = OFP_FLOW_PERMANENT</div><div class="" style="background-color: transparent">        msg.flags = 1</div><div class="" style="background-color: transparent">        msg =
 of.ofp_match()</div><div class="" style="background-color: transparent">        msg.match.in_port = 3</div><div class="" style="background-color: transparent">        msg.match.dl_src = (EthAddr("b1:fe:aa:6e:76:5c")) #Host1 Mac address</div><div class="" style="background-color: transparent">        msg.match.dl_dst = (EthAddr("0")) # No dst Mac address.</div><div class="" style="background-color: transparent">        msg.match.dl_type = pkt.ethernet.IP_TYPE<span class="" style="white-space: pre">                   </span></div><div class="" style="background-color: transparent">        msg.match.nw_src = (IPAddr("192.168.20.1") #Host1 IP address <span class="" style="white-space: pre">                       </span></div><div class="" style="background-color: transparent">        msg.match.nw_dst = (IPAddr("192.168.48.0"), 24)</div><div class="" style="background-color: transparent">        msg.match.nw_proto = pkt.ipv4.UDP_PROTOCOL</div><div class="" style="background-color: transparent">        msg.match.tp_dst = 5004<span class="" style="white-space: pre">                             </span></div><div class="" style="background-color: transparent">        msg.actions.append(of.ofp_action_output(port = 4)) </div><div class="" style="background-color: transparent">        event.connection.send(msg)</div><div class="" style="background-color: transparent">        </div><div class="" style="background-color: transparent">        log.debug("Installing %s.%i -> %s.%i AND %s.%i -> %s.%i" %</div><div class="" style="background-color: transparent">            (packet.dst, dst_port, packet.src, event.ofp.in_port,</div><div class="" style="background-color:
 transparent"><span class="" style=""></span></div><div class="" style="background-color: transparent">             packet.src, event.ofp.in_port, packet.dst, dst_port))</div><div class="" style="background-color: transparent"><br class="" style=""></div><div class="" style="background-color: transparent"><br class="" style=""></div><div class="" style="background-color: transparent"><br class="" style=""></div><div class="" style="background-color: transparent">thanks </div><div class="" style="background-color: transparent">kofi</div><div class="" style=""><br class="" style=""></div><div class="" style=""><div class="" style="font-size: 12pt"><div class="" style="font-size: 12pt"><div dir="ltr" class="" style=""><font size="2" face="Arial" class="" style="">On Wednesday, April 16, 2014 8:52 PM, Murphy McCauley <<a href="mailto:murphy.mccauley@gmail.com">murphy.mccauley@gmail.com</a>> wrote:<br class="" style=""></font></div><div class="" style=""><div id="yiv7855663244" class="" style=""><div class="" style="">On Apr 16, 2014, at 3:27 AM, Shiyao Ma <<a rel="nofollow" shape="rect" ymailto="mailto:i@introo.me" target="_blank" href="mailto:i@introo.me" class="" style="color: rgb(25, 106, 212)">i@introo.me</a>> wrote:<br clear="none" class="" style=""><div class="" style=""><br clear="none" class="" style=""><blockquote type="cite" class="" style=""><div dir="ltr" class="" style=""><div class="" style=""><div class="" style=""><div class="" style=""><div class="" style="">Hi.</div></div></div></div></div></blockquote></div></div></div></div></div></div></div><div class="" style=""><br style=""></div></div></blockquote></div><br></div></body></html>