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.

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.

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.

-- Murphy

On Apr 26, 2014, at 10:58 AM, kofi adu <kofiad...@yahoo.com> wrote:

> Hello murphy
> 
> 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:
> 
> :there is an error in your program-syntax error: (msg). do you know how i can 
> fix that?
> 
>       msg = nx.nx_flow_mod()
>         msg.data = event.ofp
>         msg.table_id = 0
>         msg.priority = 3323
>         msg.idle_timeout = OFP_FLOW_PERMANENT
>         msg.hard_timeout = OFP_FLOW_PERMANENT
>         msg.flags = 1
>         msg = of.ofp_match()
>         msg.match.in_port = 3
>         msg.match.dl_src = (EthAddr("b1:fe:aa:6e:76:5c")) #Host1 Mac address
>         msg.match.dl_dst = (EthAddr("0")) # No dst Mac address.
>         msg.match.dl_type = pkt.ethernet.IP_TYPE                      
>         msg.match.nw_src = (IPAddr("192.168.20.1") #Host1 IP address          
>         
>         msg.match.nw_dst = (IPAddr("192.168.48.0"), 24)
>         msg.match.nw_proto = pkt.ipv4.UDP_PROTOCOL
>         msg.match.tp_dst = 5004                               
>         msg.actions.append(of.ofp_action_output(port = 4)) 
>         event.connection.send(msg)
>         
>         log.debug("Installing %s.%i -> %s.%i AND %s.%i -> %s.%i" %
>             (packet.dst, dst_port, packet.src, event.ofp.in_port,
>              packet.src, event.ofp.in_port, packet.dst, dst_port))
> 
> 
> 
> thanks 
> kofi
> 
> On Wednesday, April 16, 2014 8:52 PM, Murphy McCauley 
> <murphy.mccau...@gmail.com> wrote:
> On Apr 16, 2014, at 3:27 AM, Shiyao Ma <i...@introo.me> wrote:
> 
>> Hi.
> 
> 

Reply via email to