Skip to content

Commit

Permalink
Change examples to use python3, make them executable.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Jul 22, 2021
1 parent eae19f6 commit af64c38
Show file tree
Hide file tree
Showing 22 changed files with 42 additions and 18 deletions.
Empty file modified examples/aws_iot.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion examples/client_logger.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2016 James Myatt <james@jamesmyatt.co.uk>
Expand Down
2 changes: 1 addition & 1 deletion examples/client_mqtt_clear_retain.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2013 Roger Light <roger@atchoo.org>
Expand Down
2 changes: 1 addition & 1 deletion examples/client_pub-wait.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2010-2013 Roger Light <roger@atchoo.org>
Expand Down
2 changes: 1 addition & 1 deletion examples/client_pub_opts.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2017 Jon Levell <levell@uk.ibm.com>
Expand Down
2 changes: 1 addition & 1 deletion examples/client_rpc_math.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2020 Frank Pagliughi <fpagliughi@mindspring.com>
Expand Down
2 changes: 1 addition & 1 deletion examples/client_session_present.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2014 Roger Light <roger@atchoo.org>
Expand Down
2 changes: 1 addition & 1 deletion examples/client_sub-class.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2013 Roger Light <roger@atchoo.org>
Expand Down
2 changes: 1 addition & 1 deletion examples/client_sub-multiple-callback.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2014 Roger Light <roger@atchoo.org>
Expand Down
2 changes: 1 addition & 1 deletion examples/client_sub-srv.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2010-2013 Roger Light <roger@atchoo.org>
Expand Down
2 changes: 1 addition & 1 deletion examples/client_sub-ws.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2010-2013 Roger Light <roger@atchoo.org>
Expand Down
2 changes: 1 addition & 1 deletion examples/client_sub.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2010-2013 Roger Light <roger@atchoo.org>
Expand Down
2 changes: 1 addition & 1 deletion examples/client_sub_opts.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2017 Jon Levell <levell@uk.ibm.com>
Expand Down
Empty file modified examples/context.py
100644 → 100755
Empty file.
Empty file modified examples/loop_trio.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion examples/publish_multiple.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2014 Roger Light <roger@atchoo.org>
Expand Down
2 changes: 1 addition & 1 deletion examples/publish_single.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2014 Roger Light <roger@atchoo.org>
Expand Down
2 changes: 1 addition & 1 deletion examples/publish_utf8-27.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2014 Roger Light <roger@atchoo.org>
Expand Down
24 changes: 24 additions & 0 deletions examples/publish_utf8-3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2014 Roger Light <roger@atchoo.org>
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Distribution License v1.0
# which accompanies this distribution.
#
# The Eclipse Distribution License is available at
# http://www.eclipse.org/org/documents/edl-v10.php.
#
# Contributors:
# Roger Light - initial implementation

# This shows an example of using the publish.single helper function with unicode topic and payload.

import context # Ensures paho is in PYTHONPATH

import paho.mqtt.publish as publish

topic = u"paho/test/single/ô"
payload = u'German umlauts like "ä" ü"ö" are not supported'
publish.single(topic, payload, hostname="test.mosquitto.org")
2 changes: 1 addition & 1 deletion examples/server_rpc_math.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2020 Frank Pagliughi <fpagliughi@mindspring.com>
Expand Down
2 changes: 1 addition & 1 deletion examples/subscribe_callback.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2016 Roger Light <roger@atchoo.org>
Expand Down
2 changes: 1 addition & 1 deletion examples/subscribe_simple.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
# -*- coding: utf-8 -*-

# Copyright (c) 2016 Roger Light <roger@atchoo.org>
Expand Down

0 comments on commit af64c38

Please sign in to comment.