summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-08-19 21:11:15 +0300
committerLars Wirzenius <liw@liw.fi>2017-08-19 21:11:15 +0300
commit6c03e0adb54afca6718e97bdaa916c723bd04353 (patch)
treeb176fcff752c2e2e8eacdf75bf38fbf87f8fbf72
parent83239e0d3844d67eed3d109d21f6bd8c3a5adf8c (diff)
downloadcliapp-6c03e0adb54afca6718e97bdaa916c723bd04353.tar.gz
Add: support Python3
-rw-r--r--example_runcmd.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/example_runcmd.py b/example_runcmd.py
index 31ff05d..df70b14 100644
--- a/example_runcmd.py
+++ b/example_runcmd.py
@@ -16,16 +16,17 @@
#
# =*= License: GPL-2+ =*=
+from __future__ import print_function
import cliapp
def cb():
- print 'callback called'
+ print('callback called')
-print 'sleeping 10'
+print('sleeping 10')
r = cliapp.runcmd_unchecked(
['sleep', '5'], output_timeout=2, timeout_callback=cb)
-print repr(r)
-print 'done'
+print(repr(r))
+print('done')