473,575 Members | 3,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python programs always open source?

Hi,

I was wondering if Python programs always need to include the source code
with the program itself. I'm asking this because I don't want my program to
be open-source and so far all the Python programs I've seen included the
source code.

Is it possible to make an executable with only bytecode?

Thanks in advance!

GF

--
Posted via a free Usenet account from http://www.teranews.com

Sep 17 '06 #1
20 2263
Guy Fawkes wrote:
I was wondering if Python programs always need to include the source code
with the program itself. I'm asking this because I don't want my program to
be open-source and so far all the Python programs I've seen included the
source code.
You can include the source code but still not be open source; it's not
unusual for python programs to have licenses prohibiting the
modification or redistribution of the source code.
Is it possible to make an executable with only bytecode?
You can import and use the .pyc files with a few caveats. They're
pretty trivial to disassemble though, so it's rarely worth it; just
make clear what's allowed (and what's not allowed) in your license.

Sep 17 '06 #2
"Guy Fawkes" <sp***********@ spoilthechild.c omwrites:
I was wondering if Python programs always need to include the source
code with the program itself. I'm asking this because I don't want
my program to be open-source and so far all the Python programs I've
seen included the source code.
You can license your own work to anyone you like, under any terms you
choose. The source code to a work is necessary for users to exercise a
free software license, but that doesn't mean that distributing source
code necessarily grants a free software license.

You're right that there is a great amount of Python code available
under free software licenses. No-one can force you to join us, but
you're welcome to.

--
\ "My girlfriend has a queen sized bed; I have a court jester |
`\ sized bed. It's red and green and has bells on it, and the ends |
_o__) curl up." -- Steven Wright |
Ben Finney

Sep 17 '06 #3
Jay
Speaking of the bytecode, how does one create it?
Ben Finney wrote:
"Guy Fawkes" <sp***********@ spoilthechild.c omwrites:
I was wondering if Python programs always need to include the source
code with the program itself. I'm asking this because I don't want
my program to be open-source and so far all the Python programs I've
seen included the source code.

You can license your own work to anyone you like, under any terms you
choose. The source code to a work is necessary for users to exercise a
free software license, but that doesn't mean that distributing source
code necessarily grants a free software license.

You're right that there is a great amount of Python code available
under free software licenses. No-one can force you to join us, but
you're welcome to.

--
\ "My girlfriend has a queen sized bed; I have a court jester |
`\ sized bed. It's red and green and has bells on it, and the ends |
_o__) curl up." -- Steven Wright |
Ben Finney
Sep 17 '06 #4
"Jay" <ja*******@gmai l.comwrote:
Speaking of the bytecode, how does one create it?
http://effbot.org/zone/python-compil...python-modules

</F>

Sep 17 '06 #5
Guy Fawkes schrieb:
Is it possible to make an executable?
Hi GF!

http://www.python.net/crew/atuining/cx_Freeze/

Regards,
Gerold
:-)

--
_______________ _______________ _______________ _______________ ____________
Gerold Penz - bcom - Programmierung
ge*********@tir ol.utanet.at | http://gerold.bcom.at | http://sw3.at
Ehrliche, herzliche Begeisterung ist einer der
wirksamsten Erfolgsfaktoren . Dale Carnegie
Sep 18 '06 #6
Guy Fawkes schrieb:
I don't want my program to
be open-source and so far all the Python programs I've seen included the
source code.
That's one of the great freedoms of Python and its licence: You are
free to chose the licence for your product. No GPLish "you must be as
free as we", more BSDish: "Do what you want, do not come crying"
Is it possible to make an executable with only bytecode?
I use py2exe with its "new" (~1 year) single file feature with great
success. I even succeeded in including a virtual static directory for a
webserver within that file.

To be exact, it is not really 1 file, but 2, as you often have to
distribute msvcr71.dll with it - except for those computers having
i.e. MS Office 11 installed, there it is allready present.

Combining py2exe's single file distributable and upx compression I
achieve fairly compact "just drop and use" applications without a real
need for installation. I do not care about people decompiling
(customers get the source code on request, if they are interested).
It would be possible - but those who have the time and knowledge to
dissect and decompile those upxed py2exed files and still make a profit
would probably not see a reason to buy my software anyway :)

Harald

Sep 18 '06 #7
"GHUM" <ha************ **@gmail.comwri tes:
That's one of the great freedoms of Python and its licence: You are
free to chose the licence for your product. No GPLish "you must be
as free as we", more BSDish: "Do what you want, do not come crying"
This has nothing to do with the license of Python. Whether Python was
distributed under the GPL, BSD or Jack's Own Oddball License, the
copyright holder of Python has no say over what license you choose for
your own work.

So long as you're not distributing some or all of Python itself, or a
derivative work, the license for Python has no legal effect on what
license you choose for your own work.

--
\ "He that would make his own liberty secure must guard even his |
`\ enemy from oppression." -- Thomas Paine |
_o__) |
Ben Finney

Sep 18 '06 #8
Ben Finney wrote:
So long as you're not distributing some or all of Python itself, or a
derivative work, the license for Python has no legal effect on what
license you choose for your own work.
How many Python programs use nothing from the standard library?
Sep 18 '06 #9
Leif K-Brooks wrote:
Ben Finney wrote:
>>So long as you're not distributing some or all of Python itself, or a
derivative work, the license for Python has no legal effect on what
license you choose for your own work.


How many Python programs use nothing from the standard library?
That doesn't matter either. The required copyright statements are
included in the Python interpreter. There is no reason to fear
distributing Python as a part of either open source or proprietary
works, and Guido framed the original license to allow precisely such
uses. Later versions have retained the same spirit.

The official license doesn't take a lot of understanding or legalese.
Try it:

http://www.python.org/download/releases/2.4.2/license/

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Sep 18 '06 #10

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

Similar topics

7
4989
by: Catalin | last post by:
How can I make executables with python? I found some utilities that claim they can do something like that like Installer and py2exe but they actualy pack the code in a huge arhive! This solves the problem of giving python programs to users who don't have python but doesn't solve the problem of the source "secrecy" (copyright). And the...
0
1554
by: Emile van Sebille | last post by:
QOTW: "Oddly enough it is in Python that I have had the most fun programming. It is in Python that I find myself not only the most expressive but the most elegant in my programming. In Python my code is the clearest and most concise. I don't for one instant feel constrained by Python. I feel liberated by it." -- Steve Lamb "After a few...
114
9756
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
31
2698
by: poisondart | last post by:
Hi, I'm not sure if this is the right group to post this. If not, then I would appreciate if somebody could point me to the correct group. This is my first time releasing software to the public and I'm wanting to release a Python program I wrote for review (and critique) and testing on other platforms, but also I would like to explore the...
0
1553
by: Fuzzyman | last post by:
It's finally happened, `Movable Python <http://www.voidspace.org.uk/python/movpy/>`_ is finally released. Versions for Python 2.3 & 2.4 are available from `The Movable Python Shop <http://voidspace.tradebit.com/groups.php>`_. The cost is £5 per distribution, payment by PayPal. £1 from every distribution goes to support the development of...
0
7845
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...
0
8281
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...
1
7868
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...
0
8143
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...
0
6515
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...
1
5664
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...
0
3778
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...
0
3797
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1382
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.