File Install Program Using Python?

Dave Brueck dave at pythonapocrypha.com
Fri Jan 23 11:40:28 EST 2004


CB Hamlyn wrote:
> Hello, I'm currently working on a Modification for the PC game Battlefield
> 1942.  I'm a pretty good VBA Programmer with some Foxpro under belt as well.
> After reading a ton of stuff on-line I'm simply floored by everything Python
> has to offer.
>
> Anyway, I want to create an installation program that takes a folder and all
> it's sub-folders and copies them from a compressed form into the proper
> directory.  Basically a simplified version InstallSheild or whatever.
>
> I assume Python is capable of such a feat and I'm wondering if anyone can
> spin me around, point me in the right direction and shove me toward my goal.

It's definitely possible, but are you more interested in doing it for your own
educational purposes or for getting the job done? If it's the latter then free
installers like InnoSetup and the WinAmp installer will save you a lot of time
since they already work well.

If you just want to do this to learn more, then look into the ZipFile class in
the zipfile module for starters. You can add a lightweight GUI using Mark
Hammond's win32 extensions or Venster, and finally convert it into an
executable with py2exe or one of the other packagers out there.

-Dave





More information about the Python-list mailing list