Should I switch to wxPython from Perl/Tk?

Don't answer too quick. This is a VERY specific
question. There is something which already I can
do in Perl. I need to know if I can also do it
just as well in Python. Please respond direct to
my email (I will join this list if the answer to
my first below question is "yes").

What I can do in Perl:

I can create a program with Perl/Tk, compile it
for Win32 using Perl.exe to create a binary executable
file Foo.exe. That standalone binary can then be
installed, by itself, on Win32.

What I want to do in Python:

I have program ported from Perl (except for the GUI)
which I want to sell for WinNT. My end-users will be
dumb-as-dirt automotive test lab engineers. So the
program I want to sell them has to be brainless
to install. It absolutely must be a stand-alone binary
executable.

So my question is:

Can I do that, yes or no? Can I write a program in
Python using wxPython, then compile it into a stand-
alone binary executable that will run on WinNT?

Why I want to switch to Python:

I am sick and tired of Perl's utter lack for an
interactive shell. I had gotten used to having one
first in Forth, then in PostScript. And I just can't
get used to doing without in Perl. So far Python is
very cool. But if I can't make what I need to sell,
then there is no point at all.

Thanks,

Gan Starling
Kalamazoo Michigan
USA

···

--

Mistera Sturno - Rarest Extinct Bird

<(+)__ Gan Uesli Starling
((__/)=- Kalamazoo, MI, USA
  `||`
   ++ http://starling.us

Gan Uesli Starling wrote:

Can I write a program in
Python using wxPython, then compile it into a stand-
alone binary executable that will run on WinNT?

Yes. There a couple of tools out there that can do this:

Py2exe and McMillian's Installer. From recent traffic on this list,
Installer sounds like a slightly better option, but Py2exe as worked
fine for me. A member of this list has also developed his own solution
that sounds pretty nice. He has said he wil try to make it generally
available.

Note: You aren't strickly speeking, getting a "binary" what you are
getting is the python interpreter, packaged up together with the byte
compiled code that you wrote. I'm pretty sure you're getting a similar
result with Perl as well. It does look like a regular old binary to the
user, however. You also don't get one file, you get an exe and a few
DLLs. The wxPython DLLs are pretty big ( maybe about 5 MB? ), but that
isn't much of an issue these days.

I am sick and tired of Perl's utter lack for an
interactive shell.

The interactive shell is very nice, and you will find Python to a much
more elegant language in many other ways once you have used it for a
while.

Another note: YOuc an use TK with Python as well. The module is called
tkinter. I'm sure you'll find all the people on this list prefer
wxPython, but if you are happy with TK, you may find it easier to port
your code from PerlTK to Python/tkinter that to wxPython. This is
particularly true if you make heavy use of the TK Canvas.

By the way, I'vbe posted this to the list, so you can get others
comments on my comments as well. In fact, if you had been following the
list in the last few days, you mwold have seen a discussion about this
very topic. I suggest you subscribe, or you might miss some of the
conversation. You can always unsubscribe later.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

I use py2exe, found here:

http://starship.python.net/crew/theller/py2exe/

which creates an executable and a bunch of dll's (for wxPython, and other
"third party add-ons").

Then optionally use UPX which squashes these executables (supposed to make
them load faster too, but I only notice a difference when I run them from
floppys) found here:

Then I use the nsis installer found here:

http://www.nullsoft.com/free/nsis/

Which creates a compressed self extracting, self-uninstalling executable
(with a whole scripting language of it's own allowing you to set registry
values, delete files, whatever...)

This makes a beautiful installation :slight_smile:

Matthew Sherborne

···

----- Original Message -----
From: "Chris Barker" <Chris.Barker@noaa.gov>
To: <wxPython-users@lists.wxwindows.org>; "Gan Uesli Starling"
<alias@starling.us>
Sent: Thursday, November 14, 2002 6:43 AM
Subject: Re: [wxPython-users] Should I switch to wxPython from Perl/Tk?

Gan Uesli Starling wrote:

> Can I write a program in
> Python using wxPython, then compile it into a stand-
> alone binary executable that will run on WinNT?

Yes. There a couple of tools out there that can do this:

Py2exe and McMillian's Installer. From recent traffic on this list,
Installer sounds like a slightly better option, but Py2exe as worked
fine for me. A member of this list has also developed his own solution
that sounds pretty nice. He has said he wil try to make it generally
available.

Note: You aren't strickly speeking, getting a "binary" what you are
getting is the python interpreter, packaged up together with the byte
compiled code that you wrote. I'm pretty sure you're getting a similar
result with Perl as well. It does look like a regular old binary to the
user, however. You also don't get one file, you get an exe and a few
DLLs. The wxPython DLLs are pretty big ( maybe about 5 MB? ), but that
isn't much of an issue these days.

> I am sick and tired of Perl's utter lack for an
> interactive shell.

The interactive shell is very nice, and you will find Python to a much
more elegant language in many other ways once you have used it for a
while.

Another note: YOuc an use TK with Python as well. The module is called
tkinter. I'm sure you'll find all the people on this list prefer
wxPython, but if you are happy with TK, you may find it easier to port
your code from PerlTK to Python/tkinter that to wxPython. This is
particularly true if you make heavy use of the TK Canvas.

By the way, I'vbe posted this to the list, so you can get others
comments on my comments as well. In fact, if you had been following the
list in the last few days, you mwold have seen a discussion about this
very topic. I suggest you subscribe, or you might miss some of the
conversation. You can always unsubscribe later.

-Chris

--
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

Hi Gan,

Skip Perl. You're much better of with Python and together with wxWindows
it really rocks for GUI development.

To build a standalone executable use one of the following packages:

http://www.mcmillan-inc.com/install1.html
http://py2exe.sourceforge.net/

I only have experience with the McMillan installer (and it works very
well), but py2exe also looks like a promising package.

When using McMillan you can choose between distributing your application
as a single .exe (which will be quite large since it will have all the
required dll's embedded, which will be extracted at runtime) or as a
single directory where an exe will be built and copied together with all
required dll's into a specific installation directory.

Wrap it all up with InstallShield or maybe even better with the free
Windows installer builder Inno Setup
Inno Setup and you can distribute your
programs in a professional way.

Hope this helps...

Regards
    //Jan Persson

-----Ursprungligt meddelande-----
Från: Gan Uesli Starling [mailto:alias@starling.us]
Skickat: den 13 november 2002 15:16
Till: wxpython-users@lists.wxwindows.org
Ämne: [wxPython-users] Should I switch to wxPython from Perl/Tk?

Don't answer too quick. This is a VERY specific
question. There is something which already I can
do in Perl. I need to know if I can also do it
just as well in Python. Please respond direct to
my email (I will join this list if the answer to
my first below question is "yes").

What I can do in Perl:

I can create a program with Perl/Tk, compile it
for Win32 using Perl.exe to create a binary executable
file Foo.exe. That standalone binary can then be
installed, by itself, on Win32.

What I want to do in Python:

I have program ported from Perl (except for the GUI)
which I want to sell for WinNT. My end-users will be
dumb-as-dirt automotive test lab engineers. So the
program I want to sell them has to be brainless
to install. It absolutely must be a stand-alone binary
executable.

So my question is:

Can I do that, yes or no? Can I write a program in
Python using wxPython, then compile it into a stand-
alone binary executable that will run on WinNT?

Why I want to switch to Python:

I am sick and tired of Perl's utter lack for an
interactive shell. I had gotten used to having one
first in Forth, then in PostScript. And I just can't
get used to doing without in Perl. So far Python is
very cool. But if I can't make what I need to sell,
then there is no point at all.

Thanks,

Gan Starling
Kalamazoo Michigan
USA

--

Mistera Sturno - Rarest Extinct Bird

<(+)__ Gan Uesli Starling
((__/)=- Kalamazoo, MI, USA
  `||`
   ++ http://starling.us

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail:

wxPython-users-help@lists.wxwindows.org

Chris Barker wrote:

Gan Uesli Starling wrote:

> Can I write a program in
> Python using wxPython, then compile it into a stand-
> alone binary executable that will run on WinNT?

Yes. There a couple of tools out there that can do this:
Py2exe and McMillian's Installer.

As an additional note, since you specified that your end-users need for the
installation of this program to be as simple as possible, you may wish to
look into Inno Setup (not sure of the URL, but that's what Google's for
<wink>). This is a freely available installer-builder, which will let you
create a single executable that, when run, will properly install your
program on the user's system. By the way, Inno Setup has no special
connection with Python, and could probably be used just as well for your
PerlTK program.

Python does have some features, like distutils, that assist in distributing
modules and such, but these are aimed more at other developers than
nontechnical end-users. Still, look into distutils as well, it may do all
that you need. (There should be documentation on distutils in the Python
Library Reference, or browse through the module docstring.)

Jeff Shannon
Technician/Programmer
Credit International

BTW: UPX also protects your code from decompiling a little.

Matthew Sherborne

I do not know perl very much,
but kick it!

wxPython is the best invention since the commodore 64 :slight_smile:

Greetings, Andre'

···

On Thu, 14 Nov 2002 00:09:16 +0100 "Jan Persson" <jan@bitmine.se> wrote:

Hi Gan,

Skip Perl. You're much better of with Python and together with wxWindows
it really rocks for GUI development.

To build a standalone executable use one of the following packages:

HOAX.COM: unravelling the truth from fiction, past to present...
http://py2exe.sourceforge.net/

I only have experience with the McMillan installer (and it works very
well), but py2exe also looks like a promising package.

When using McMillan you can choose between distributing your application
as a single .exe (which will be quite large since it will have all the
required dll's embedded, which will be extracted at runtime) or as a
single directory where an exe will be built and copied together with all
required dll's into a specific installation directory.

Wrap it all up with InstallShield or maybe even better with the free
Windows installer builder Inno Setup
Inno Setup and you can distribute your
programs in a professional way.

Hope this helps...

Regards
    //Jan Persson

> -----Ursprungligt meddelande-----
> Från: Gan Uesli Starling [mailto:alias@starling.us]
> Skickat: den 13 november 2002 15:16
> Till: wxpython-users@lists.wxwindows.org
> Ämne: [wxPython-users] Should I switch to wxPython from Perl/Tk?
>
> Don't answer too quick. This is a VERY specific
> question. There is something which already I can
> do in Perl. I need to know if I can also do it
> just as well in Python. Please respond direct to
> my email (I will join this list if the answer to
> my first below question is "yes").
>
> What I can do in Perl:
>
> I can create a program with Perl/Tk, compile it
> for Win32 using Perl.exe to create a binary executable
> file Foo.exe. That standalone binary can then be
> installed, by itself, on Win32.
>
> What I want to do in Python:
>
> I have program ported from Perl (except for the GUI)
> which I want to sell for WinNT. My end-users will be
> dumb-as-dirt automotive test lab engineers. So the
> program I want to sell them has to be brainless
> to install. It absolutely must be a stand-alone binary
> executable.
>
> So my question is:
>
> Can I do that, yes or no? Can I write a program in
> Python using wxPython, then compile it into a stand-
> alone binary executable that will run on WinNT?
>
> Why I want to switch to Python:
>
> I am sick and tired of Perl's utter lack for an
> interactive shell. I had gotten used to having one
> first in Forth, then in PostScript. And I just can't
> get used to doing without in Perl. So far Python is
> very cool. But if I can't make what I need to sell,
> then there is no point at all.
>
> Thanks,
>
> Gan Starling
> Kalamazoo Michigan
> USA
>
> --
>
> Mistera Sturno - Rarest Extinct Bird
>
> <(+)__ Gan Uesli Starling
> ((__/)=- Kalamazoo, MI, USA
> `||`
> ++ http://starling.us
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
> For additional commands, e-mail:
wxPython-users-help@lists.wxwindows.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org