1

the time has come and i start think about how to build demo version of my software to show it to my clints. i make buildings via pyinstaller. i need to create programm that will be stop working after 1 or 2 days of using.

it should be easy i hope ?) i cant find any information about this buildings via pyinstaller

pyinstaller --onefile script.py   

may be i need use other builder like pyfreeze ? or maybe i can do that in python logic level or setup setup file in builder?

Bach
  • 6,145
  • 7
  • 36
  • 61
Alice Polansky
  • 3,231
  • 3
  • 18
  • 25

1 Answers1

1

This could be done manually by hardcoding a timelimit at the top of script.py, using the time module.

import time
limit_str = 'Wed Feb 26 12:30:00 2014'
limit = time.mktime(time.strptime(limit_str))

if time.time() > limit:
    print 'Demo time expired!'
else:
    print 'Program logic here'
Tetrinity
  • 1,105
  • 8
  • 20