This seems to work, thanks! I'm going to test it a bit more, add an
--ipython argument to the launch function, and make a PR when I'm
done.
--Alison

2014-11-17 18:50 GMT-05:00 Murphy McCauley <murphy.mccau...@gmail.com>:
> How about replacing the code.interact() call in py.py with...
> from IPython import embed
> embed(user_global_ns=self.variables)
> ?
>
> (And then just running POX with py as usual -- not using ipython to run it.)
>
> As a starting point, anyway.  I'm not sure of the semantics for 
> user_global_ns are exactly right here.
>
> We could add an --ipython argument to launch() which tries to do this and 
> falls back if it's unavailable.
>
> -- Murphy
>
> On Nov 17, 2014, at 9:24 AM, Alison Chan <chan7...@kettering.edu> wrote:
>
>> ipython pox.py 'works' as in pox starts up, but doesn't give me the
>> nice features of ipython like object? for object details. It also
>> doesn't tab complete pox objects like core.openflow.
>>
>> alisonc $ ipython pox.py py openflow.of_01
>> POX 0.3.0 (dart) / Copyright 2011-2014 James McCauley, et al.
>> INFO:core:POX 0.3.0 (dart) is up.
>> Ready.
>> POX> core?
>>  File "<console>", line 1
>>    core?
>>        ^
>> SyntaxError: invalid syntax
>>
>> ./pox.py py --completion also doesn't tab complete stuff.
>>
>> Cheers,
>> Alison
>>
>> 2014-11-14 21:59 GMT-05:00 Murphy McCauley <murphy.mccau...@gmail.com>:
>>> At one point, I think I made some tweaks to make sure that it worked with 
>>> ipython if you just run ipython pox.py.  Have you tried that?  Maybe it's 
>>> gotten broken -- I'll admit to not testing that regularly (ever :) ).
>>>
>>> Also if you run py --completion, you can often get some tab-completion with 
>>> even without ipython.
>>>
>>> -- Murphy
>>>
>>> On Nov 14, 2014, at 1:07 PM, Alison Chan <chan7...@kettering.edu> wrote:
>>>
>>>> Hey pox-dev,
>>>>
>>>> Is there any component that is like py, but provides the enhanced
>>>> features of the ipython console? I often use the py console to push
>>>> static flows and prototype stuff before it goes into my real
>>>> controller code, but I especially miss the tab completion that ipython
>>>> gives me.
>>>>
>>>> If there is such a component, then awesome, but if not, then I could
>>>> write one and send a PR.
>>>>
>>>> Cheers,
>>>> --
>>>> Alison Chan
>>>> Kettering University
>>>> chan7...@kettering.edu
>>>> +1 909 278 7753
>>>
>>
>>
>>
>> --
>> Alison Chan
>> Kettering University
>> chan7...@kettering.edu
>> +1 909 278 7753
>



-- 
Alison Chan
Kettering University
chan7...@kettering.edu
+1 909 278 7753

Reply via email to