[Tutor] Re: Self-Deleting

Andrei project5 at redrival.net
Thu Aug 12 19:34:48 CEST 2004

Ali Polatel wrote on Thu, 12 Aug 2004 04:55:18 -0700 (PDT):

> I have written a programme ...
> I also want to do a demo version of it which will delete itself after some days...
> It should find its path in the computer it is saved and delete itself or make himself useless
> Can a programme delete itself?

A python script can delete itself and it knows where it's located (look at
sys.argv). But this is really a very silly and entirely useless kind of
protection. All the user would have to do, is make a backup. If you want a
demo version, it's better to distribute a version which is not
feature-complete. Depending on how paranoid you are, you could leave out
certain reasonably important functionality completely (e.g. by not shipping
modules with the demo which take care of printing reports or importing data
- in this case it's impossible to crack the program, since that
functionality is simply not present - a cracker would have to implement the
missing modules, or steal them from a registered distro) or you could
disable/cripple the functionality and re-enable it once the user enters a
code (in this case, it's easier to crack the program, but it's also less
hassle for you and your customers).

Whatever you do, keep in mind that it's relatively simple to go from Python
bytecode to Python source code, even when packed with py2exe or similar
tools, so elaborate protections schemes are pretty much pointless. 

Last but not least, ask yourself if your program truly is worth paying for.
No disrespect meant, but you might be better off giving the stuff away than
going through the hassle of setting up a system for payments,
registrations, etc. and getting some small change or nothing at all in
return. Does it offer something new, or does it do something significantly
better than its competition (don't forget competing open source/freeware
products!)? If it doesn't, people won't pay for it anyway and you've wasted
your time.



Real contact info (decode with rot13):
cebwrpg5 at jnanqbb.ay. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V ernq
gur yvfg, fb gurer'f ab arrq gb PP.

More information about the Tutor mailing list