Click here to Skip to main content
15,886,639 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I used the ZipFile object in python to append a zip file to one of my executables to be accessed by that program, but I don't know what that zip file gets named as it is added. How would I find this out?
Posted

I'm sure this is a bad idea. Executable files are supposed to be never modified after they are built. Moreover, the technology of digital signature very effectively prevents such operations, as this is a very dangerous thing as such modifications are done by viruses and other malicious software. The legitimate way of including ZIP or any other resources in executable modules is including them in embedded resources.

—SA
 
Share this answer
 
Comments
IfIAmSangan 15-Aug-13 22:48pm    
How would I do that? The thing is, on this particular app, I want saves and resources native to the executable instead of the machine. Would embedded resources accomplish this?
Sergey Alexandrovich Kryukov 16-Aug-13 0:16am    
Sorry, I failed to understand this question. Could you tell it more accurately or in more detail? Accomplish what?
—SA
IfIAmSangan 16-Aug-13 14:08pm    
Would embedded resources allow me to have the resources somehow bound to the executable in a way that an absolute path is not required to access it? If so, how would I go about making the ZIP an embedded resource?
Sergey Alexandrovich Kryukov 16-Aug-13 14:35pm    
Well, you would be able to open the file and save compressed files anywhere you want. I haven't done it with Python though, as I never tried any compiled Python, only interpretive. (Do you use Python compiler for Windows? what is that?)
—SA
IfIAmSangan 16-Aug-13 14:47pm    
I looked into embedded resources for python and I don't think there is a good way to do that. However, I did come up with a way that I could do something similar. Thanks for your help.
Thanks to the input from Sergey Alexandrovich Kryukov, I found a way to do something similar to embedded resources that makes my goal possible.
 
Share this answer
 
Comments
Manfred Rudolf Bihy 16-Aug-13 15:09pm    
It would have been extremely considerate of you if you posted your findings and how you went about solving your problem. As it currently stands what you posted here is not a solution, but should have been a comment only. Please, for the benefit of all, post or at least summarize how you solved your problem.
If it would be to much information for a solution please do consider writing an article or at least a tip/trick so we can all learn something from your findings.

Regards,
Manfred

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900