From 6c03e0adb54afca6718e97bdaa916c723bd04353 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 19 Aug 2017 21:11:15 +0300 Subject: Add: support Python3 --- example_runcmd.py | 9 +++++---- 1 file 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') -- cgit v1.2.1