Bundle ability of Python GUIed apps

2 views
Skip to first unread message

Ed Howland

unread,
Sep 18, 2010, 4:24:08 PM9/18/10
to gr...@googlegroups.com
Hi all,

If I wanted to write a X-P;atform TkInter app (Max/Win/Linux) could it
be distributed within a single directory (or even 3 directories one
for each platform)?

I think with Linux (most distros anyway) it is just a python script(s)
and the resources. I assume this is true for the Mac since Idle starts
and runs fine w/o me installing anything. But what about Windows?

I'd like to be able to bundle the app, requiring no install process on
the user's part. I would distribute it on external HDs/thumb drives.

Can this be done?

Thanks,
Ed

Ed Howland
http://greenprogrammer.wordpress.com
http://twitter.com/ed_howland

Ben Rousch

unread,
Sep 19, 2010, 8:45:38 AM9/19/10
to gr...@googlegroups.com
On Sat, Sep 18, 2010 at 4:24 PM, Ed Howland <ed.ho...@gmail.com> wrote:
> Hi all,
>
> If I wanted to write a X-P;atform TkInter app (Max/Win/Linux) could it
> be distributed within a single directory (or even 3 directories one
> for each platform)?
>
> I think with Linux (most distros anyway) it is just a python script(s)
> and the resources. I assume this is true for the Mac since Idle starts
> and runs fine w/o me installing anything. But what about Windows?
>
>
> I'd like to be able to bundle the app, requiring no install process on
> the user's part. I would distribute it on external HDs/thumb drives.
>
> Can this be done?

As you pointed out, the problem with Windows is that Python is most
likely not installed on your targets' computers. A parallel problem is
that any dependencies your program has outside of Python's standard
lib are also not installed, and have to be hunted down separately.
There are a few solutions to these problems:

1. (obvious, but impractical) Install Python, install your
dependencies, install your program (so you have at least 2 installs)
2. Compile your program to a Windows executable using py2exe.
http://www.py2exe.org/
3. Create a custom bundle and installer including Python with a custom
PATH, your dependencies, and your program.

I have only tried #1 and #2. #1 is most likely to work, especially if
your dependencies require an executable install of some kind. I have
had some luck with #2 if the program is small and coded with py2exe in
mind.

We haven't dealt with desktop programs a lot at GRPUG, but I hope some
others will pipe up with suggestions.


--
  Ben Rousch
  bro...@gmail.com
  http://ishmilok.blogspot.com/

Dave Brondsema

unread,
Sep 23, 2010, 5:40:13 PM9/23/10
to gr...@googlegroups.com
On 9/18/10 4:24 PM, Ed Howland wrote:
> Hi all,
>
> If I wanted to write a X-P;atform TkInter app (Max/Win/Linux) could it
> be distributed within a single directory (or even 3 directories one
> for each platform)?
>
> I think with Linux (most distros anyway) it is just a python script(s)
> and the resources. I assume this is true for the Mac since Idle starts
> and runs fine w/o me installing anything. But what about Windows?
>
> I'd like to be able to bundle the app, requiring no install process on
> the user's part. I would distribute it on external HDs/thumb drives.
>
> Can this be done?
>

Hi Ed,
http://www.reddit.com/r/Python/comments/d7clc/creating_crossplatform_standalone_apps_with_python/
might have some useful pointers


--
Dave Brondsema : da...@brondsema.net
http://www.brondsema.net : personal
http://www.splike.com : programming
<><

Ed Howland

unread,
Sep 23, 2010, 6:34:57 PM9/23/10
to gr...@googlegroups.com
Thanks, Dave. Looks like this might work.

Cheers,
Ed

> --
> You received this message because you are subscribed to the Google Groups "GRPUG: Grand Rapids Python Users Group" group.
> To post to this group, send email to gr...@googlegroups.com.
> To unsubscribe from this group, send email to grpug+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/grpug?hl=en.
>
>

Steve Romanow

unread,
Sep 23, 2010, 7:18:55 PM9/23/10
to gr...@googlegroups.com
Easygui is a set of convenience classes for Tk. It is nto event driven,
but based on your needs it is certainly easy.
Reply all
Reply to author
Forward
0 new messages