Skip to content

Instantly share code, notes, and snippets.

@haschdl
Last active May 15, 2019 19:30
Show Gist options
  • Save haschdl/473917019b6015c65f44fe5546e5b2c2 to your computer and use it in GitHub Desktop.
Save haschdl/473917019b6015c65f44fe5546e5b2c2 to your computer and use it in GitHub Desktop.
# example on how to save Processing sketch in Python mode
# copy and paste to your sketch
from datetime import datetime
def keyPressed():
if key == 'S' or key == 's':
saveSketch()
# example on how to save Processing sketch in Python mode
# copy and paste to your sketch
def saveSketch():
s = datetime.now().strftime('%Y%m%d%H%M%S_.%f')
save(str.format("/out/sketch_{0}.jpg", s ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment