473,883 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

program deployment

hi to all folks here,

i am learning Python, just finished a book and i am starting to write
programs.
I just want to ask, is the "correct" way to deploy my programs to other
computers, the .pyc files ??

I now that with the "-m compileall ." switch can compile a .py file
into bytecodes. So i suppose that if Python has to run a .pyc file, it
will load and execute it faster. And if i have some "sensitive" data in
my source, like passwords (and the source of cource!) they will be more
secure in a compiled file.

Is that correct ?

Thanks a lot for any help!

Jan 5 '07 #1
19 1476

king kikapu wrote:
hi to all folks here,

i am learning Python, just finished a book and i am starting to write
programs.
I just want to ask, is the "correct" way to deploy my programs to other
computers, the .pyc files ??

I now that with the "-m compileall ." switch can compile a .py file
into bytecodes. So i suppose that if Python has to run a .pyc file, it
will load and execute it faster. And if i have some "sensitive" data in
my source, like passwords (and the source of cource!) they will be more
secure in a compiled file.

Is that correct ?

Thanks a lot for any help!
Python code is normally deployed as straight source code. It gets
compiled automatically on its first run and will subsequently load
this quickly. Passwords do not belong in the source code and they are
not secure simply by distributing bytecode instead. This applies to any
language, native or byte code compiled. Distributing bytecode may deter
non-technical users but that's just about it.

Jan 5 '07 #2
Python code is normally deployed as straight source code.

But isn't this a problem of its own ?? I mean, many people do not feel
good if the know that their source code is lying around on other
machines...

Jan 5 '07 #3
king kikapu wrote:
>Python code is normally deployed as straight source code.

But isn't this a problem of its own ?? I mean, many people do not feel
good if the know that their source code is lying around on other
machines...
This has been discussed a bazillion times on this list - the summary is (at
least from my POV):

- it is possible to decompyle python pretty easy. So, spare yourself the
hassle just distributing only the pyc

- it is easy enough to hack even C-written apps, if anything is _worth_
being hacked, it will be hacked

- 99% of all code isn't worth being hacked or ripped. Really. Even though
the result of cobbling together lots of unimaginative code might be
impressive, there are only very few areas of coding (like e.g.
sophisticated compression algorithms and the like) that are worth ripping -
the rest is bound to be runnable in one app only anyway, as it is coupled
closely

- if you have something you really, really, really need to be as secure as
possible, go use a remote service - otherwise, it _will_ be compromised.
Diez
Jan 5 '07 #4
On 2007-01-05, king kikapu <ab********@pan afonet.grwrote:
i am learning Python, just finished a book and i am starting
to write programs. I just want to ask, is the "correct" way to
deploy my programs to other computers, the .pyc files ??
That depends on the platform. Under Linux, one usually just
provides the source.

Under Windows, I ususally use py2exe+inno-setup.
I now that with the "-m compileall ." switch can compile a .py
file into bytecodes. So i suppose that if Python has to run a
.pyc file, it will load and execute it faster.
A little bit, yes.
And if i have some "sensitive" data in my source, like
passwords (and the source of cource!) they will be more secure
in a compiled file.
Not really.

--
Grant Edwards grante Yow! I represent a
at sardine!!
visi.com
Jan 5 '07 #5
On 2007-01-05, king kikapu <ab********@pan afonet.grwrote:
>Python code is normally deployed as straight source code.

But isn't this a problem of its own? I mean, many people do not feel
good if the know that their source code is lying around on other
machines...
Are they embarassed by their code?

--
Grant Edwards grante Yow! Can I have an IMPULSE
at ITEM instead?
visi.com
Jan 5 '07 #6

Are they embarassed by their code?
hehehe...no, just worried about stealing their ideas...

Jan 5 '07 #7
Grant Edwards schrieb:
On 2007-01-05, king kikapu <ab********@pan afonet.grwrote:
>>Python code is normally deployed as straight source code.
But isn't this a problem of its own? I mean, many people do not feel
good if the know that their source code is lying around on other
machines...

Are they embarassed by their code?
hehehe, but what I am thinking: Is it somehow possible to _really_ hide
the source from being viewed by other persons when using python? Not
that I want to do that ( I am an Open Source friend ), but that might
get others that rely on that (commercial) to use python for more
projects as it is done now.

Thomas
Jan 5 '07 #8
On 2007-01-05, king kikapu <ab********@pan afonet.grwrote:
Are they embarassed by their code?

hehehe...no, just worried about stealing their ideas...
They're deluding themselves.

The vast majority of ideas aren't worth stealing.

If they are worth stealing, you don't need the source code to
do it.

You can figure out the ideas behind almost all software by
running the program for 30 seconds (or just by reading a
description of what it's supposed to do).

Even sophisticated and intricate algorithms and protocols can be
reverse-engineered with or without the source code. Having the
source code often doesn't even help very much.

--
Grant Edwards grante Yow! Join the PLUMBER'S
at UNION!!
visi.com
Jan 5 '07 #9
On 2007-01-05, king kikapu <ab********@pan afonet.grwrote:
>Under Windows, I ususally use py2exe+inno-setup.

Xmmm...i have downloaded this and try a (very) simple project
and it is working great. Of your experience, does it also
working great when you have more complex solutions,
e.x. many 3rd party modules like wxWidgets and so ??
Yes. I use it to deply wxPython apps that use a lot of third
party packages like pyserial, numpy, scipy, scientific python,
pygnuplot, plotlib.

The resulting setup.exe files seem awfully large to somebody
who cut his teeth on Unix Version 7 on a PDP-11 with 256KB of
RAM and a 20MB hard drive (and who still writes programs for
platforms with 256 bytes of RAM).

But, by windows standards they're not all that large. Nobody
cares anymore that a program won't fit on a floppy disk...

--
Grant Edwards grante Yow! I think my CAREER
at is RUINED!!
visi.com
Jan 5 '07 #10

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

Similar topics

5
4685
by: smjmitchell | last post by:
Hi All, I have written a program in VB 6.0 that I would like to distribute to many users (most likely via freeware / shareware). The program is a relatively simple and does not call any external DLL's etc - it compiles to a single EXE. The program runs fine on my computer under Windows 2000 Professional and a few other machines that I have tried including two running Windows XP. Should the same code work on all versions of windows...
7
18604
by: Dave | last post by:
I created a program using VB6 under WIN 98. The program uses an ado database. When I use the package and deployment program in VB6 on this program and then install it on a machine with XP Pro on it, I get the Provider can not be found error.. Any Ideas....I Hope
1
1938
by: Dik van der Zwan | last post by:
I have made a Setup for a ms-access program with the package and deployment wizard of ms-office 2000. When installing my program with the Setup, it will make a shortcut to start the program. Question: Is it possible to make a Setup that also arrages my own icon in the shortcut, and how??
0
1207
by: adolph | last post by:
Over the last two years I've written an MS accedd based program. The back end is also backend. It is a realestate inventory management program. It uses a third party program to manipulate photos. I can't seem to figure out how to create a deployment CD that I can market. I've tried using The Microsoft deployment wizard in both 97 and 2000. Neither creates an error free deployment. I then looked for third party software and tried 2....
2
1220
by: Brian | last post by:
If I wrote a VB.Net program for another person then is there an install program that comes with VB.net that allows me to add the NET framework so that when my program is installed by another person then the NET framework is also installed on his computer? What size is the NET framework? Regards Briahn
7
3350
by: Jack Russell | last post by:
Can anyone tell me if there is a .net way of doing these things. I have VB6 code but assume there is a new way. Thanks
0
2220
by: processendnow | last post by:
I have a vb.net form application, it works inside Visual Baisc Express Debugger, packages without errors or warning, and is publishable. Click on the setup.exe to install and it installs, but it cannot run, the details of the error are here: PLATFORM VERSION INFO Windows : 5.1.2600.131072 (Win32NT) Common Language Runtime : 2.0.50727.42 System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200) mscorwks.dll : 2.0.50727.42...
1
1426
by: steve | last post by:
Hi All I have a program which is installed on users computers via an msi from vb.net 2005 deployment project At the end of the install (.net framework and my application) I want to auto launch another program of mine from the same CD which contains logic to install sql server express depending on the users needs How do I launch it from the CD when the initial setup program has completed
3
12904
by: Bill Cart | last post by:
We are using c# windows forms and just trying to get started with .net. I want to do something that should be easy but I can't find any way to make it work. We are using Click Once to publish to a network drive and I need to be able to check if a program is the current version. Because the users can choose to not download the latest version this may be a problem. I just want to show what version they are running. I found some code that...
2
4711
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= | last post by:
I want to display the program version shown on the "Publish Version" of the "Publich" tab on the project properties screen. My.Application.Info.Version.ToString only ever shows 1.0.0.0. My.Application.Deployment.CurrentVersion.ToString raises an error in the IDE. How can I get the 1.0.0.52 that Click Once uses? -- John Austin
0
9933
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
9787
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11128
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
10408
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9568
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7964
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...
1
4607
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
2
4212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3230
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.