473,761 Members | 10,276 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Distributing applications

I've learned enough of the Python language to be mildly dangerous and
have used it in a few personal projects. All my development of
commercial (or production) products over the past dozen years have been
done with C++ or Java.

For a program I'm planning -- to begin during the summer -- having an
interpreter as part of the application would be very desirable to allow
sophisticated users to provide their own extensions. Java would be
do-able, but....

My problems are:
- I'd like the process of installing the application to be one step;
no "first download a Python interpreter then a GUI library" kind of
thing.
- I also need the core part of the application to be reasonably
protected. I'm not looking to defeat hackers, but something equivalent
to the way Java's class files stored in jars stay where they're supposed
to be and aren't immediately readable.

I've looked at various web sites for this topic, but most I've found are
just arguments for using the Python language. OK, I'll pretend I'm
convinced...now any comments or references on the mechanics of creating
a self-contained distribution?

--
Phillip Mills
Multi-platform software development
(416) 224-0714

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 18 '05 #1
14 1881
On Wednesday 02 March 2005 14:12, Phillip Mills wrote:
now any comments or references on the mechanics of creating
a self-contained distribution?


Run to http://starship.python.net/crew/theller/py2exe/
--
Toby Dickenson
Jul 18 '05 #2
I wanted a nice tightly-wrapped distribution of my own and really
didn't want to go the py2exe route. I may have used a sledgehammer to
kill a fly, but here is what I did...

1) Downloaded python source (2.3.4)
2) Modified source, so that sys.path would pull from a registry key
setup by my installer.
2) Compiled python
3) Compiled wxPython 2.5.3.1
4) Bundled my app along with the custom python installation using NSIS.

My `setup.exe' file was 6654281 bytes -- not bad. Considering its the
entire python distribution (I may have missed a couple of modules --
but i don't think so) and wxPython.

I chose not to use py2exe because it made updating my app a bit
messier. For instance, suppose I don't use the smtplib module in
version 1 of my software. Py2exe realizes that and doesn't 'package'
smtplib with my executable. Now, if I release version 1.1 which does
use smtplib, then I'd have to figure out how to get the updates out
without having the user redownload the entire application. Granted, I
didn't put much thought into an update mechanism, but it seemed to be
messy at the time.

If I have my own distribution, I can simply give the users an "update"
program that will query my webserver which will download the latest
version for them automagically. Because my distribution has all of
the modules already available, I don't have to worry about sending
them any missing modules. Simply download the latest version of my
app and it works with my custom rolled distribution.

But, this only works for Windows...

jw

On Wed, 02 Mar 2005 09:12:26 -0500, Phillip Mills
<ph************ @acmdelete.org> wrote:
I've learned enough of the Python language to be mildly dangerous and
have used it in a few personal projects. All my development of
commercial (or production) products over the past dozen years have been
done with C++ or Java.

For a program I'm planning -- to begin during the summer -- having an
interpreter as part of the application would be very desirable to allow
sophisticated users to provide their own extensions. Java would be
do-able, but....

My problems are:
- I'd like the process of installing the application to be one step;
no "first download a Python interpreter then a GUI library" kind of
thing.
- I also need the core part of the application to be reasonably
protected. I'm not looking to defeat hackers, but something equivalent
to the way Java's class files stored in jars stay where they're supposed
to be and aren't immediately readable.

I've looked at various web sites for this topic, but most I've found are
just arguments for using the Python language. OK, I'll pretend I'm
convinced...now any comments or references on the mechanics of creating
a self-contained distribution?

--
Phillip Mills
Multi-platform software development
(416) 224-0714

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
--
http://mail.python.org/mailman/listinfo/python-list

Jul 18 '05 #3
Phillip Mills wrote:
I've learned enough of the Python language to be mildly dangerous and
have used it in a few personal projects. All my development of
commercial (or production) products over the past dozen years have been
done with C++ or Java.

For a program I'm planning -- to begin during the summer -- having an
interpreter as part of the application would be very desirable to allow
sophisticated users to provide their own extensions. Java would be
do-able, but....

My problems are:
- I'd like the process of installing the application to be one step;
no "first download a Python interpreter then a GUI library" kind of
thing.
For creating a self-contained installation/distribution under Windows,
use py2exe:

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

If you want to create a nice Windows installer for your module(s):

http://www.python.org/doc/current/di...on-script.html

- I also need the core part of the application to be reasonably
protected. I'm not looking to defeat hackers, but something equivalent
to the way Java's class files stored in jars stay where they're supposed
to be and aren't immediately readable.
Hmm, not sure about that one. You mean that those users who write
extensions should not be able to modify the core code you wrote? Are you
talking about a restricted execution environment for untrusted code?
I'd rather make it so to only accept code which is signed by a trusted
party or something like that.
I've looked at various web sites for this topic, but most I've found are
just arguments for using the Python language. OK, I'll pretend I'm
convinced...now any comments or references on the mechanics of creating
a self-contained distribution?

Jul 18 '05 #4
Jaime Wyant wrote:
I chose not to use py2exe because it made updating my app a bit
messier. For instance, suppose I don't use the smtplib module in
version 1 of my software. Py2exe realizes that and doesn't 'package'
smtplib with my executable. Now, if I release version 1.1 which does
use smtplib, then I'd have to figure out how to get the updates out
without having the user redownload the entire application. Granted,
I didn't put much thought into an update mechanism, but it seemed to
be messy at the time.
I don't follow you. How is that different compared to adding a module
to your application? Let's say version 1.1 of your software has
module1.py updated, module2.py added and it needs smtplib. You just
bundle three compiled files and unpack them let's say to
\program files\my software\module 1.pyc
\program files\my software\module 2.pyc
\program files\my software\python \smtplib.pyc

I don't see any mess.

If I have my own distribution, I can simply give the users an "update"
program that will query my webserver which will download the latest
version for them automagically. Because my distribution has all of
the modules already available, I don't have to worry about sending
them any missing modules. Simply download the latest version of my
app and it works with my custom rolled distribution.

But, this only works for Windows...


Why? As I understand "update" program was written by you, so what
prevents it from working on other platforms besides testing?

Serge.

Jul 18 '05 #5
First, thanks to all the people who have answered so far for the
suggestions.

In article <U3************ *********@news0 00.worldonline. dk>,
André Søreng <ws******@tisca li.no> wrote:
Phillip Mills wrote:
My problems are:
[...]
http://starship.python.net/crew/theller/py2exe/


Apparently I had more problems than I mentioned. :-) One of them being
that a Windows-only solution is only a partial solution.
- I also need the core part of the application to be reasonably
protected. I'm not looking to defeat hackers, but something equivalent
to the way Java's class files stored in jars stay where they're supposed
to be and aren't immediately readable.

Hmm, not sure about that one. You mean that those users who write
extensions should not be able to modify the core code you wrote?


Partly that and partly a file management thing. For most end users a
..jar is one thing to deal with; it's the most recent one or it's not;
it's present in the right location or it's not....

--
Phillip Mills
Multi-platform software development
(416) 224-0714

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 18 '05 #6
On 2 Mar 2005 10:43:38 -0800, Serge Orlov <Se*********@gm ail.com> wrote:
Jaime Wyant wrote:
I chose not to use py2exe because it made updating my app a bit
messier. For instance, suppose I don't use the smtplib module in
version 1 of my software. Py2exe realizes that and doesn't 'package'
smtplib with my executable. Now, if I release version 1.1 which does
use smtplib, then I'd have to figure out how to get the updates out
without having the user redownload the entire application. Granted,
I didn't put much thought into an update mechanism, but it seemed to
be messy at the time.


I don't follow you. How is that different compared to adding a module
to your application? Let's say version 1.1 of your software has
module1.py updated, module2.py added and it needs smtplib. You just
bundle three compiled files and unpack them let's say to
\program files\my software\module 1.pyc
\program files\my software\module 2.pyc
\program files\my software\python \smtplib.pyc

I don't see any mess.


The way I *think* about it is this --> To update my app, I only have
to download a new version of it... Being written in python, the app
itself is pretty small....

Suppose the following are true:
1) when the user installs my custom built python distribution they
also get version 1.0 of the app.
2) Suppose it is installed in c:\myapp (for simplicity).
3) I've just released version 1.1

Because *all* of the modules are in my custom built distribution, I
don't have to actively scan for new modules between releases. So....
I can write a simple "updater" script that will:
1) download a new myapp.zip
2) remove the c:\myapp directory and its subdirs
3) unzip it to c:\myapp, overwriting what is there

After those three steps are complete, then my app is updated. Super
simple. All I have to do is "zip" up my application and post it to a
website somewhere...

IIRC, py2exe bundles things up in a .zip file. So in order to update
a py2exe app i'd have to ->
1) check for new module dependencies
2) get the newly imported modules AND my newly updated modules back to
the client
3) update the zip file with the new modules.

This becomes especially hairy when someone is updating from 1.0 to say
1.5. Then I have to keep track of all the deltas between 1.0/1.5. My
way is much simpler because I don't have to keep up with *anything*.
As long as I test my code against my custom built distribution, it
ought to JUST WORK.

I don't trust myself to keep up with anything ;).

However, if you have an idea on updating py2exe bundled apps, I'm all ears...

If I have my own distribution, I can simply give the users an "update"
program that will query my webserver which will download the latest
version for them automagically. Because my distribution has all of
the modules already available, I don't have to worry about sending
them any missing modules. Simply download the latest version of my
app and it works with my custom rolled distribution.

But, this only works for Windows...


Why? As I understand "update" program was written by you, so what
prevents it from working on other platforms besides testing?


Yes, but the *update* program runs in the context of my distribution
which is strictly bundled for windows. Now, someone *could* build a
distributable version for Linux somehow (I guess) and then the update
techniques I mentioned would probably work there.

jw
Jul 18 '05 #7
I'm fairly new to python myself (with about 16 years of various
languages); I found py2exe fairly straightforward to use.
The instructions are ok, but if you care to see it I took some notes and
threw them into an article on my company site.

<http://home.agilemarku p.com/index.php?optio n=content&task= view&id=64&Item id=27>

Regards

- Mitch

Phillip Mills wrote:
I've learned enough of the Python language to be mildly dangerous and
have used it in a few personal projects. All my development of
commercial (or production) products over the past dozen years have been
done with C++ or Java.

For a program I'm planning -- to begin during the summer -- having an
interpreter as part of the application would be very desirable to allow
sophisticated users to provide their own extensions. Java would be
do-able, but....

My problems are:
- I'd like the process of installing the application to be one step;
no "first download a Python interpreter then a GUI library" kind of
thing.
- I also need the core part of the application to be reasonably
protected. I'm not looking to defeat hackers, but something equivalent
to the way Java's class files stored in jars stay where they're supposed
to be and aren't immediately readable.

I've looked at various web sites for this topic, but most I've found are
just arguments for using the Python language. OK, I'll pretend I'm
convinced...now any comments or references on the mechanics of creating
a self-contained distribution?

Jul 18 '05 #8
Phillip Mills wrote:
First, thanks to all the people who have answered so far for the
suggestions.

In article <U3************ *********@news0 00.worldonline. dk>,
André Søreng <ws******@tisca li.no> wrote:
Phillip Mills wrote:
My problems are:
[...]
http://starship.python.net/crew/theller/py2exe/


Apparently I had more problems than I mentioned. :-) One of them
being that a Windows-only solution is only a partial solution.


There is also py2app for Mac. Still partial? :) Then follow Jaime's
way: build and bundle python with your application.
- I also need the core part of the application to be reasonably protected. I'm not looking to defeat hackers, but something
equivalent to the way Java's class files stored in jars stay
where they're supposed to be and aren't immediately readable.
Hmm, not sure about that one. You mean that those users who write
extensions should not be able to modify the core code you wrote?


Partly that and partly a file management thing. For most end users a

.jar is one thing to deal with; it's the most recent one or it's not; it's present in the right location or it's not....


Python byte code is like java byte code and python supports importing
from zip files like java. Since python comes with a liberal license
you can change the importing code to decrypt your modules with a
"secret" key. That will be much safer than java. Of course that won't
stop real hackers.

Serge.

Jul 18 '05 #9
Jaime Wyant wrote:
This becomes especially hairy when someone is updating from 1.0 to
say 1.5. Then I have to keep track of all the deltas between
1.0/1.5. My way is much simpler because I don't have to keep up with
*anything*. As long as I test my code against my custom built
distribution, it ought to JUST WORK.

I don't trust myself to keep up with anything ;).


Now I follow you :) I agree that updating py2exe apps requires package
management utilities. I don't think they will be messy, it's just
more code to maintain compared to your way. You only need to track
one delta (1.0 -> 1.1 ... -> latest) and publish two files latest.exe
and update.zip

Serge.

Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1741
by: David | last post by:
I have been going around in circles trying to understand the method of creating a database in VB.Net 2003 and distributing that application and database. It seems if I use the Server Explorer to create the pledbConnection etc, the link to the database works ok on the local machine but when the application is distributed, the program points to the original path (which of course is different to the target system). Is there any way to...
10
7425
by: John Phelan | last post by:
I read an article by, by Mike Groh, in Access-VB-SQL Advisor Magazine, Week 37 that concerns me quite a bit on distributing Access Applications commercially. First I need to describe a "commercial version" of my application that I hope to distribute after completing all the beta testing: A. It was developed using MS AccessXP Pro (developers edition), B. It has a front end MyApplication.mdb and a MyAppBbackend_be.mde; the front end is...
5
1740
by: MLH | last post by:
I have little or no knowledge as to how a runtime Access database application might be distributed from a website. I am sure that I'm about to find out. I do have one question for you wizards though... My experience has shown that when I have installed applications from the web, my browser generally asks what I want to do with the file... Do I wanna save it? or Do I wanna run it? The browser generally warns about the dangers of executing...
2
1796
by: John Welch | last post by:
It happens much too often that I have to tell a client how to fix up missing references when I send them an application, especially if the client is distributing it to different users. It makes me look unprofessional (which I guess I am to some extent). I've tried the fixuprefs() function I got from the knowledge base (that uses the qryTestRefs and checks for error 3075), but it doesn't seem to get called, and I still get the problem. I'm...
6
1454
by: Brett | last post by:
Is there a restriction with the academic version of VS.NET 2003 in the way of distributing an EXE? Or, what is the difference in this version and the commercial versions with respect to distribution? Is there some mechanism in place that prevents distribution? Thanks, Brett
2
1203
by: Michelle | last post by:
Hi I have an Access background and I wish to create a window application which will use a SQL connection for its data. I use VS 2005 Professional and know that the SQL Servicer Express edition is part of it. I'm used to distributing my applications split and putting the backend on the server. 1. How do I distribute SSExpress with my application? 2. Is it the same as installing on the client's server machine or does my
5
2709
by: xkenneth | last post by:
Hi All, I'll shortly be distributing a number of python applications that use proprietary. The software is part of a much larger system and it will need to be distributed securely. How can i achieve this? Regards, Ken
1
1414
by: PurpleServerMonkey | last post by:
Working on a rather large open source python application that I want to release for Linux and BSD and was wondering what methods others are using to distribute large and complex applications. Setuptools and friends seem to be focused on distributing modules, I'm at the other end of the scale where I want to distribute an entire application so that an Administrator can run a single install and have a fully operational product. A key...
9
1510
by: eliben | last post by:
Hello, I'm getting into Python now after years of Perl, and as part of my research I must understand how to do some common tasks I need. I have a bunch of Windows PCs at work to which I want to distribute an application I've developed on my PC. All these PCs have Python 2.5 installed. If my application contains only code I've developed, I simply zip its
10
1026
by: Anthony P. | last post by:
Hello Again Everyone, I finished a very simple application and have published it to a local directory. I then went to the published directory and zipped all of the files up into a .ZIP archive. I uploaded the file to my server and, for some reason. when anyone downloads my zip file and tries to install the program, they are told by their archiver that it reached an 'unexpected end of archive'. The weird thing is when I try to install it...
0
9531
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9957
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7332
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.