I want a windows installer to install my application that's written in python, but I don't want the end user to have access to my source code.
Is that possible using python? I was using cx-freeze, but that has the source code available. So does pyinstaller. I think gcc does, too.
Does anyone know of a way to do this?
On Fri, 31 Mar 2023 at 23:01, Jim Schwartz <jsc...@sbcglobal.net> wrote:
I want a windows installer to install my application that's written in python, but I don't want the end user to have access to my source code.
Is that possible using python? I was using cx-freeze, but that has the source code available. So does pyinstaller. I think gcc does, too.
Does anyone know of a way to do this?
Fundamentally no, it's not. Python code will always be distributed as
some form of bytecode. The only way to make it available without
revealing anything is to put it on a server and let people access it
without running it themselves.
But why is that a problem? Copyright law protects you from people
stealing your code and making unauthorized changes to it, and if
you're not worried about them making changes, there's no reason to
hide the source code (whatever you distribute would be just as
copiable). Are you concerned that people will see your bugs? We all
have them.
ChrisA
On Friday, March 31, 2023 at 1:09:12 PM UTC+1, Chris Angelico wrote:
On Fri, 31 Mar 2023 at 23:01, Jim Schwartz <jsc...@sbcglobal.net> wrote:
Fundamentally no, it's not. Python code will always be distributed as
I want a windows installer to install my application that's written in
python, but I don't want the end user to have access to my source code.
Is that possible using python? I was using cx-freeze, but that has the
source code available. So does pyinstaller. I think gcc does, too.
Does anyone know of a way to do this?
some form of bytecode. The only way to make it available without
revealing anything is to put it on a server and let people access it
without running it themselves.
But why is that a problem? Copyright law protects you from people
stealing your code and making unauthorized changes to it, and if
you're not worried about them making changes, there's no reason to
hide the source code (whatever you distribute would be just as
copiable). Are you concerned that people will see your bugs? We all
have them.
ChrisA
The OP is asking for source code not to be available, not bytecode.
There are obfuscating tools like PyArmor you might want to have a look at.
I want a windows installer to install my application that's written in python, but I don't want the end user to have access to my source code.
I want a windows installer to install my application that's written in python, but I don't want the end user to have access to my source code.
I want a windows installer to install my application that's written in python, but I don't want the end user to have access to my source code.
Is that possible using python? I was using cx-freeze, but that has
the source code available. So does pyinstaller. I think gcc does, too.
Does anyone know of a way to do this?
What license do I have to choose so people can't use my code? I don't know this stuff.
-----Original Message-----
From: Python-list <python-list-bounces+jschwar=sbcglobal.net@python.org> On Behalf Of Chris Angelico
Sent: Friday, March 31, 2023 7:09 AM
To: python-list@python.org
Subject: Re: Windows installer from python source code without access to source code
On Fri, 31 Mar 2023 at 23:01, Jim Schwartz <jschwar@sbcglobal.net> wrote:
I want a windows installer to install my application that's written in
python, but I don't want the end user to have access to my source code.
Is that possible using python? I was using cx-freeze, but that has
the source code available. So does pyinstaller. I think gcc does, too.
Does anyone know of a way to do this?
Fundamentally no, it's not. Python code will always be distributed as some form of bytecode. The only way to make it available without revealing anything is to put it on a server and let people access it without running
it themselves.
But why is that a problem? Copyright law protects you from people stealing your code and making unauthorized changes to it, and if you're not worried about them making changes, there's no reason to hide the source code (whatever you distribute would be just as copiable). Are you concerned that people will see your bugs? We all have them.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Yea. You’re right. I probably need a lawyer someday. Thanks.
On Mar 31, 2023, at 5:12 PM, Thomas Passin <list1@tompassin.net> wrote:
On 3/31/2023 5:16 PM, Jim Schwartz wrote:
What license do I have to choose so people can't use my code? I don't know >> this stuff.
It would help if you would explain what you want to accomplish and why. Do you expect to make money off your software? If not, why do want so badly to protect it?
The most basic answer is that your code is automatically protected by copyright law unless you say differently. But it is still a good idea to state outright what actions would be allowed and what would be forbidden.
If you do expect to make money, you could look at what phone apps developers include with their apps. And it would be good to consult a lawyer who practices in this field.
-----Original Message-----
From: Python-list <python-list-bounces+jschwar=sbcglobal.net@python.org> On >> Behalf Of Chris Angelico
Sent: Friday, March 31, 2023 7:09 AM
To: python-list@python.org
Subject: Re: Windows installer from python source code without access to
source code
On Fri, 31 Mar 2023 at 23:01, Jim Schwartz <jschwar@sbcglobal.net> wrote: >>>Fundamentally no, it's not. Python code will always be distributed as some >> form of bytecode. The only way to make it available without revealing
I want a windows installer to install my application that's written in
python, but I don't want the end user to have access to my source code.
Is that possible using python? I was using cx-freeze, but that has
the source code available. So does pyinstaller. I think gcc does, too. >>>
Does anyone know of a way to do this?
anything is to put it on a server and let people access it without running >> it themselves.
But why is that a problem? Copyright law protects you from people stealing >> your code and making unauthorized changes to it, and if you're not worried >> about them making changes, there's no reason to hide the source code
(whatever you distribute would be just as copiable). Are you concerned that >> people will see your bugs? We all have them.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
[...] I don't have access to the Gmail source code but I'm using the
service [...]
On 2023-04-01 at 10:49:18 +1100,
Chris Angelico <rosuav@gmail.com> wrote:
[...] I don't have access to the Gmail source code but I'm using the service [...]
You have access to Gmail's front end source code. Your web browser runs
it every time you use the service (and probably while you aren't using
the service, too).
My educated guess is that Google expended some
effort to hinder you from looking at and/or analyzing (or do you say analysing?) that code, and that their lawyers will come knocking at your metaphorical door if they so much as think you are using that code in
some way other than running it inside your web browser. If only this situation were a cruel April Fool's Day joke.
You don't have access to Gmail's back end source code.
Many/Most web apps follow this pattern to varying degrees. I do not
know whether this setup meets the OP's requirements.
On Mar 31, 2023, at 6:52 PM, Chris Angelico <rosuav@gmail.com> wrote:
On Sat, 1 Apr 2023 at 10:34, Jim Schwartz <jschwar@sbcglobal.net> wrote:
Yea. You’re right. I probably need a lawyer someday. Thanks.
If your needs are basic, you shouldn't need a lawyer. Copyright law
and treaties DO protect you. But it's important to be aware that no
amount of legal protection - whether you hire a lawyer or not, and
whether you identify copyright and license or not - will stop people
from copying your code. NOTHING will stop people from copying your
code if they have access to it. All you can do is discourage them.
So that brings us back to the original question: Why protect your
*source code* specifically? There are two extremes available to
everyone:
1) Distribute the source code. Let everyone see it. Stick a license on
it that permits them to use it, modify it, distribute modified
versions. Set your code free and let it be used.
2) Don't distribute the program *at all*. Don't distribute the source
OR the binary. Instead, permit people to *access* the program - which,
in today's world, usually means a web service.
Both of these are very popular and work well. I don't have access to
the Gmail source code but I'm using the service. I don't have access
to the Twitch.tv source code but I'm using the service. Meanwhile, I
have Python programs running on a Debian system using the Linux
kernel, invoked using bash, served from an ext4 mass storage device,
etc, etc. I have the binary code for all of these, and I'm legally
guaranteed access to the source if I want it, so there's no incentive
to steal it.
The middle ground of "distribute binaries but stop people from
accessing the source" is a much narrower use-case, and I would say
that it's not actually a single use-case but a family of them, each
with different needs and requirements. So it's essential to know what
you're actually trying to protect, and why.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
I am writing an app but I’m not sure I’ll sell it yet. I have it in a private GitHub location and GitHub prompts me for a license. I don’t really understand licenses so I just picked Apache 2.0. Maybe I’m going too far with my worry about whichlicense I pick. I’m not selling it now so it doesn’t matter. I have to do a lot more work before I get to that point
I am writing an app but I’m not sure I’ll sell it yet. I have it in a private GitHub location and GitHub prompts me for a license. I don’t really understand licenses so I just picked Apache 2.0. Maybe I’m going too far with my worry about whichlicense I pick. I’m not selling it now so it doesn’t matter. I have to do a lot more work before I get to that point
I want a windows installer to install my application that's written in python, but I don't want the end user to have access to my source code.
On 4 Apr 2023, at 16:28, Jim Schwartz <jschwar@sbcglobal.net> wrote:
Where can I download that cl program? I've used gcc before, but I hear that cl can use a setup.py program to run the compile and link and create a windows .msi installer. Is that true?
-----Original Message-----doesn't use.
From: Eryk Sun <eryksun@gmail.com>
Sent: Friday, March 31, 2023 12:55 PM
To: Jim Schwartz <jschwar@sbcglobal.net>
Cc: python-list@python.org
Subject: Re: Windows installer from python source code without access to source code
On 3/31/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
I want a windows installer to install my application that's written in
python, but I don't want the end user to have access to my source code.
Cython can compile a script to C source code for a module or executable (--embed). The source can be compiled and linked normally.
For example, the following builds a "hello.exe" executable based on a "hello.py" script.
cython -3 --embed hello.pyHello, World!
set "PYI=C:\Program Files\Python311\include"
set "PYL=C:\Program Files\Python311\libs"
cl /I"%PYI%" hello.c /link /libpath:"%PYL%"
copy hello.exe embed
embed\hello.exe
I extracted the complete embeddable distribution of Python 3.11 into the "embed" directory. You can reduce the size of the installation, if needed, by minimizing the zipped standard library and removing pyd extensions and DLLs that your application
The generated "hello.c" is large and not particularly easy to read, but here are some snippets [...]:
[...]
/* Implementation of 'hello' */
static PyObject *__pyx_builtin_print;
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_Hello_World[] = "Hello, World!";
[...]
/* "hello.py":1
* print("Hello, World!") # <<<<<<<<<<<<<<
*/
__pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_Hello_World);
if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 1, __pyx_L1_error)
[...]
/* "hello.py":1
* print("Hello, World!") # <<<<<<<<<<<<<<
*/
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple_,
NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
[...]
int wmain(int argc, wchar_t **argv) {
[...]
if (argc && argv)
Py_SetProgramName(argv[0]);
Py_Initialize();
if (argc && argv)
PySys_SetArgv(argc, argv);
[...]
m = PyInit_hello();
[...]
if (Py_FinalizeEx() < 0)
return 2;
[...]
return 0;
[...]
--
https://mail.python.org/mailman/listinfo/python-list
On 4 Apr 2023, at 16:28, Jim Schwartz <jschwar@sbcglobal.net> wrote:
Where can I download that cl program? I've used gcc before, but I hear that cl can use a setup.py program to run the compile and link and create a windows .msi installer. Is that true?
-----Original Message-----doesn't use.
From: Eryk Sun <eryksun@gmail.com>
Sent: Friday, March 31, 2023 12:55 PM
To: Jim Schwartz <jschwar@sbcglobal.net>
Cc: python-list@python.org
Subject: Re: Windows installer from python source code without access
to source code
On 3/31/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
I want a windows installer to install my application that's written
in python, but I don't want the end user to have access to my source code.
Cython can compile a script to C source code for a module or executable (--embed). The source can be compiled and linked normally.
For example, the following builds a "hello.exe" executable based on a "hello.py" script.
cython -3 --embed hello.pyHello, World!
set "PYI=C:\Program Files\Python311\include"
set "PYL=C:\Program Files\Python311\libs"
cl /I"%PYI%" hello.c /link /libpath:"%PYL%"
copy hello.exe embed
embed\hello.exe
I extracted the complete embeddable distribution of Python 3.11 into the "embed" directory. You can reduce the size of the installation, if needed, by minimizing the zipped standard library and removing pyd extensions and DLLs that your application
The generated "hello.c" is large and not particularly easy to read, but here are some snippets [...]:
[...]
/* Implementation of 'hello' */
static PyObject *__pyx_builtin_print;
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_Hello_World[] = "Hello, World!";
[...]
/* "hello.py":1
* print("Hello, World!") # <<<<<<<<<<<<<<
*/
__pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_Hello_World);
if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 1, __pyx_L1_error)
[...]
/* "hello.py":1
* print("Hello, World!") # <<<<<<<<<<<<<<
*/
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple_,
NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
[...]
int wmain(int argc, wchar_t **argv) {
[...]
if (argc && argv)
Py_SetProgramName(argv[0]);
Py_Initialize();
if (argc && argv)
PySys_SetArgv(argc, argv);
[...]
m = PyInit_hello();
[...]
if (Py_FinalizeEx() < 0)
return 2;
[...]
return 0;
[...]
--
https://mail.python.org/mailman/listinfo/python-list
Could someone please help Carlos? I’m not sure how to answer his[snip]
question
Sent from my iPhone
On Apr 6, 2023, at 3:53 PM, Carlos Fulqueris <cafulque@gmail.com> wrote:
Hello Jim,
How can I unsubscribe to this email list?
I'm waiting for your response.
Thanks
Carlos
https://mail.python.org/mailman/listinfo/python-list
On 4 Apr 2023, at 16:28, Jim Schwartz <jschwar@sbcglobal.net> wrote:
Where can I download that cl program? I've used gcc before, but I hear that cl can use a setup.py program to run the compile and link and create a windows .msi installer. Is that true?
-----Original Message-----doesn't use.
From: Eryk Sun <eryksun@gmail.com>
Sent: Friday, March 31, 2023 12:55 PM
To: Jim Schwartz <jschwar@sbcglobal.net>
Cc: python-list@python.org
Subject: Re: Windows installer from python source code without access
to source code
On 3/31/23, Jim Schwartz <jschwar@sbcglobal.net> wrote:
I want a windows installer to install my application that's written
in python, but I don't want the end user to have access to my source code.
Cython can compile a script to C source code for a module or executable (--embed). The source can be compiled and linked normally.
For example, the following builds a "hello.exe" executable based on a "hello.py" script.
cython -3 --embed hello.pyHello, World!
set "PYI=C:\Program Files\Python311\include"
set "PYL=C:\Program Files\Python311\libs"
cl /I"%PYI%" hello.c /link /libpath:"%PYL%"
copy hello.exe embed
embed\hello.exe
I extracted the complete embeddable distribution of Python 3.11 into the "embed" directory. You can reduce the size of the installation, if needed, by minimizing the zipped standard library and removing pyd extensions and DLLs that your application
The generated "hello.c" is large and not particularly easy to read, but here are some snippets [...]:
[...]
/* Implementation of 'hello' */
static PyObject *__pyx_builtin_print;
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_Hello_World[] = "Hello, World!";
[...]
/* "hello.py":1
* print("Hello, World!") # <<<<<<<<<<<<<<
*/
__pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_Hello_World);
if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 1, __pyx_L1_error)
[...]
/* "hello.py":1
* print("Hello, World!") # <<<<<<<<<<<<<<
*/
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple_,
NULL);
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
[...]
int wmain(int argc, wchar_t **argv) {
[...]
if (argc && argv)
Py_SetProgramName(argv[0]);
Py_Initialize();
if (argc && argv)
PySys_SetArgv(argc, argv);
[...]
m = PyInit_hello();
[...]
if (Py_FinalizeEx() < 0)
return 2;
[...]
return 0;
[...]
--
https://mail.python.org/mailman/listinfo/python-list
Never mind. I found it on the web. I needed to point my PYTHONPATH to sitepackages:
Never mind. I found it on the web. I needed to point my PYTHONPATH
to
sitepackages:
On 2023-04-06 23:14, Jim Schwartz wrote:
Could someone please help Carlos? I’m not sure how to answer his >> question[snip]
Sent from my iPhone
On Apr 6, 2023, at 3:53 PM, Carlos Fulqueris
<cafulque@gmail.com> wrote:
Hello Jim,
How can I unsubscribe to this email list?
I'm waiting for your response.
Thanks
Carlos
At the bottom of the post is a link to the page that explains how to unsubscribe. It's the link:
https://mail.python.org/mailman/listinfo/python-list
Never mind. I found it on the web. I needed to point my PYTHONPATH
to
sitepackages:
Never mind. I found it on the web. I needed to point my PYTHONPATH
to
sitepackages:
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 165:48:59 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,528 |