Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Python Real time Applications with Storm

You're reading from   Building Python Real time Applications with Storm Learn to process massive real-time data streams using Storm and Python—no Java required!

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781784392857
Length 122 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Installing Winpdb


Activate your Petrel virtual environment and then use pip to install it:

source <virtualenv directory>/bin/activate
pip install winpdb

Add Winpdb breakpoint

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.

Launching and attaching the debugger

Now run the topology:

petrel submit --config topology.yaml

Once 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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image