-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Building Python Real time Applications with Storm
By :
Activate your Petrel virtual environment and then use pip to install it:
source <virtualenv directory>/bin/activate pip install winpdb
In the splitsentence.py file, add the following at the beginning of the run() function:
import rpdb2 rpdb2.start_embedded_debugger('password')
The 'password' value can be anything; this is simply the password that you will use in the next step to attach to splitsentence.py.
When this line of code executes, the script will freeze for a default period of 5 minutes, waiting for a debugger to attach.
Now run the topology:
petrel submit --config topology.yamlOnce you see log messages from the spout, you will know that the topology is up and running, so you can connect with the debugger.
Launch Winpdb simply by running winpdb.
For more details on how to use Winpdb for embedded debugging, see the documentation at http://winpdb.org/docs/embedded-debugging/.
When the window appears, select File...
Change the font size
Change margin width
Change background colour