Skip to content

Instantly share code, notes, and snippets.



Last active Dec 13, 2015
What would you like to do?
AutoKey code snippet to insert the current date. The original version did not work, I think because I am using Python3
This is for use in the AutoKey text expander under Linux
The version of this script that came with the program does not work
on my system...
I think it's because I use python3
Returns the current date. in the dd/mm/yyyy format
version 1.0
mlongval _at_ gmail _dot_ com
NB: hacked together in a few minutes... not really tested
use at your own risk
tags: autokey, date, linux, python3
# imports
import subprocess
# definitions
def decodeAndStrip(value):
value = value.decode("utf-8")
value = value.strip()
#end def decodeAndStrip
# main()
theDate = subprocess.check_output('date +"%d/%m/%Y"', shell=True)
#end program

This comment has been minimized.

Copy link
Owner Author

@mlongval mlongval commented Feb 14, 2013

Updated, for error in last line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.