Embedding exe file

Cameron Laird claird at lairds.us
Mon Jul 17 08:59:29 EDT 2006


In article <1153135006.269630.268450 at s13g2000cwa.googlegroups.com>,
Bayazee <bayazee at gmail.com> wrote:
>hi,ThanX
>but i dont want to save the exe file in temp file and run it . i want
>to run it directly from python . maybe such this :
>exec("file("test.exe","rw").read())")
>i want write a cd lock with python tp protect an binary file . and so i
>dont want save it in other temp file fom max security ....
			.
			.
			.
There's no easy way.  You can't have it.

That's the short answer.  There are messy alternatives specific
to a particular flavor of Windows that *should* make something
like you want barely feasible.  I've never felt enough motiva-
tion to make one of them work.  In general, though, Windows
insists on executing files in the real filesystem, thus forcing
you to rely on a temporary.



More information about the Python-list mailing list