On Mar 9, 2013, at 3:28 PM, Senthil wrote:

> My database interface file - dbInterface.py that launches my pox componet - 
> dbInface  imports
>  
> 
> import psycopg2  -  to access psycopg2 pkg under 
> /usr/lib/python2.7/dist-packages/psycopg2
> 
> My module does not come up with 'import psycopg2' but is OK when I commented 
> out this one
> 
> I have added the following in pos/pox/boot.sh and the same result
> 
>  sys.path.append(os.path.abspath(os.path.join(sys.path[0], 
> '/usr/lib/python2.7/dist-packages/psycopg2/')))
> 
> How to import any non-pox modules in any pox files?

POX shouldn't really make this any more or less difficult than usual, though it 
may hide potentially useful traceback messages especially when run in 
"production mode".

Some things to try:
1) Try a simple program:
$ echo "import psycopg2" > testme.py
$ python testme.py

.. what happens?

2) Run POX in debug mode using debug-pox.py instead of pox.py:
$  ./debug-pox.py openflow <the rest of your components/config here>

3) Give us more information.  You indicate that it doesn't work, but what 
actually happens?  What does the log say?  Is there an error message?  A 
traceback?  Does your computer catch on fire?  In particular, if #2 doesn't 
work, it'd be useful to see what it prints out.

-- Murphy

Reply via email to