Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7b23734

Browse filesBrowse files
committed
Fix readme formatting
1 parent 83fd618 commit 7b23734
Copy full SHA for 7b23734

File tree

1 file changed

+22
-22
lines changed
Filter options

1 file changed

+22
-22
lines changed

‎README.rst

Copy file name to clipboardExpand all lines: README.rst
+22-22Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.