Skip to content

Commit 7b23734

Browse files
committed
Fix readme formatting
1 parent 83fd618 commit 7b23734

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

README.rst

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,28 @@ How do I use it?
5656

5757
Here's an example:
5858

59-
```python
60-
from zeroconf import raw_input, ServiceBrowser, Zeroconf
61-
62-
63-
class MyListener(object):
64-
65-
def removeService(self, zeroconf, type, name):
66-
print("Service %s removed" % (name,))
67-
68-
def addService(self, zeroconf, type, name):
69-
info = zeroconf.getServiceInfo(type, name)
70-
print("Service %s added, service info: %s" % (name, info))
71-
72-
73-
zeroconf = Zeroconf()
74-
listener = MyListener()
75-
browser = ServiceBrowser(zeroconf, "_http._tcp.local.", listener)
76-
try:
77-
raw_input("Press enter to exit...\n\n")
78-
finally:
79-
zeroconf.close()
80-
```
59+
.. code-block:: python
60+
61+
from zeroconf import raw_input, ServiceBrowser, Zeroconf
62+
63+
64+
class MyListener(object):
65+
66+
def removeService(self, zeroconf, type, name):
67+
print("Service %s removed" % (name,))
68+
69+
def addService(self, zeroconf, type, name):
70+
info = zeroconf.getServiceInfo(type, name)
71+
print("Service %s added, service info: %s" % (name, info))
72+
73+
74+
zeroconf = Zeroconf()
75+
listener = MyListener()
76+
browser = ServiceBrowser(zeroconf, "_http._tcp.local.", listener)
77+
try:
78+
raw_input("Press enter to exit...\n\n")
79+
finally:
80+
zeroconf.close()
8181
8282
See examples directory for more.
8383

0 commit comments

Comments
 (0)