You can't import core, it relies on pycomponent which requires the core C++ symbols which Python doesn't have.

However, if you just need the packets and openflow, you should be able to import both of those without problem:

n...@kuato:~/noxrepo/noxcore/build/src$ python
Python 2.5.2 (r252:60911, May 28 2008, 08:35:32)
[GCC 4.2.4 (Debian 4.2.4-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from nox.lib.openflow import *
>>> from nox.lib.packet import *
>>>

If you actually do want to use core, then you can always use NOX as you would use the Python interpreter ...

.martin

I have a chunk of code written in regular Python that interacts with code in NOX via a socket. I would like the regular Python code to import the NOX core module, to get access to OpenFlow defined constants, as well as re-use the packet generation libraries.
When I import nox.lib.core within the NOX app, no issues.

When I import nox.lib.core within the Python code, I get the following:
File "/home/brandonh/nox/noxcore/src/nox/lib/core.py", line 22, in <module>
    import nox.lib.openflow as openflow
ImportError: No module named openflow

I really don't know if this is due to a swig .i file, or if NOX handles imports differently, or something else.

Any ideas?

Thanks,
Brandon



------------------------------------------------------------------------

_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org


_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to