]> git.phdru.name Git - xsetbg.git/blobdiff - print-filename.py
Fix(DB): Fix column encoding
[xsetbg.git] / print-filename.py
index 921f129bbed512d21e1e6a229623e2bead4e6237..e9f217b75b46920f4561b72ce29c0ac6dfcd0cf8 100755 (executable)
@@ -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')