Hacker News new | ask | show | jobs
by tinix 2227 days ago
https://docs.python.org/3/library/tempfile.html

  >>> tempfile.mkstemp(suffix='.pdf')
  (4, '/tmp/tmp0g7l3uq7.pdf')
one could take it a step further...

  >>> tempfile.mkstemp(suffix='.pdf', prefix=uuid.uuid4().hex)
  (5, '/tmp/7b7881400a2348bfae63d37b970d4489pqhz_1g2.pdf')