X-Git-Url: https://git.phdru.name/?p=xsetbg.git;a=blobdiff_plain;f=print-filename.py;h=676aed241a61f27339d011788d0bd5d7491f0ec3;hp=921f129bbed512d21e1e6a229623e2bead4e6237;hb=HEAD;hpb=5bf30e4e42543b6be01448937183f3470cc731f3 diff --git a/print-filename.py b/print-filename.py index 921f129..e9f217b 100755 --- a/print-filename.py +++ b/print-filename.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 """print(background filename) print(the filename of the current or previous background image.) @@ -58,4 +58,4 @@ index, output_encoding = get_args() filename = xsetbg_db.select('last_shown IS NOT NULL', orderBy='-last_shown')[index].full_name -print(filename.encode(output_encoding)) +sys.stdout.buffer.write(filename.encode(output_encoding) + b'\n')