Re: Python not showing correct version

2023-03-31 Thread Sumeet Firodia
Thanks Barry. One more thing is that pip --version also refers to python 3.10 C:\Users\admin>pip --version pip 23.0.1 from C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip (python 3.10) The issue here i

Re: Python not showing correct version

2023-03-31 Thread Barry Scott
> On 31 Mar 2023, at 09:33, Sumeet Firodia wrote: > > Thanks Barry. > > One more thing is that pip --version also refers to python 3.10 > > C:\Users\admin>pip --version > pip 23.0.1 from > C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\lo

Windows installer from python source code without access to source code

2023-03-31 Thread Jim Schwartz
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

Re: Windows installer from python source code without access to source code

2023-03-31 Thread Chris Angelico
On Fri, 31 Mar 2023 at 23:01, Jim Schwartz 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 avail

Re: Python not showing correct version

2023-03-31 Thread Sumeet Firodia
Hi Barry, This is getting more complicated. As per the command you shared, below is the output C:\Users\admin>py -3.8 -m pip --version pip 19.2.3 from C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\site-packages\pip (python 3.8) For pip --version below is the output C:\Users\admin>pi

Re: Python not showing correct version

2023-03-31 Thread Thomas Passin
On 3/31/2023 8:27 AM, Sumeet Firodia wrote: Hi Barry, This is getting more complicated. As per the command you shared, below is the output C:\Users\admin>py -3.8 -m pip --version pip 19.2.3 from C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\site-packages\pip (python 3.8) For pip --

When is logging.getLogger(__name__) needed?

2023-03-31 Thread Loris Bennett
Hi, In my top level program file, main.py, I have def main_function(): parser = argparse.ArgumentParser(description="my prog") ... args = parser.parse_args() config = configparser.ConfigParser() if args.config_file is None: config_file = DEFAULT_CONFI

Re: Windows installer from python source code without access to source code

2023-03-31 Thread jkn
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 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. > > > > > > > >

Re: Windows installer from python source code without access to source code

2023-03-31 Thread Thomas Passin
On 3/31/2023 10:14 AM, jkn wrote: 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 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 cod

Re: When is logging.getLogger(__name__) needed?

2023-03-31 Thread Peter Otten
On 31/03/2023 15:01, Loris Bennett wrote: Hi, In my top level program file, main.py, I have def main_function(): parser = argparse.ArgumentParser(description="my prog") ... args = parser.parse_args() config = configparser.ConfigParser() if args.config_f

Re: Windows installer from python source code without access to source code

2023-03-31 Thread Alan Gauld
On 31/03/2023 13:00, Jim Schwartz 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. Others have commented that at some level it will always be thre but on a more pragmatic level tools like py2

Re: Windows installer from python source code without access to source code

2023-03-31 Thread Eryk Sun
On 3/31/23, Jim Schwartz 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 link

Re: Python not showing correct version

2023-03-31 Thread Eryk Sun
On 3/31/23, Sumeet Firodia wrote: > > One more thing is that pip --version also refers to python 3.10 > > C:\Users\admin>pip --version > pip 23.0.1 from > C:\Users\admin\AppData\Local\Packages > \PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0 > \LocalCache\local-packages\Python310\site-package

Re: built-in pow() vs. math.pow()

2023-03-31 Thread Peter J. Holzer
On 2023-03-31 07:39:25 +0100, Barry wrote: > On 30 Mar 2023, at 22:30, Chris Angelico wrote: > > It's called math.pow. That on its own should be a strong indication > > that it's designed to work with floats. > > So long as you know that the math module is provided to give access > the C math.h f

Re: Python not showing correct version

2023-03-31 Thread Thomas Passin
On 3/31/2023 2:18 PM, Eryk Sun wrote: On 3/31/23, Sumeet Firodia wrote: One more thing is that pip --version also refers to python 3.10 C:\Users\admin>pip --version pip 23.0.1 from C:\Users\admin\AppData\Local\Packages \PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0 \LocalCache\local-pack

Re: Python not showing correct version

2023-03-31 Thread Eryk Sun
On 3/31/23, Thomas Passin wrote: > > The store app doesn't install py.exe, does it? That's a significant downside of the store app. You can install Python 3.7-3.11 from the store, and run them explicitly as "python3.7.exe", "pip3.7.exe", "python3.11.exe", "pip3.11.exe", etc. But without the launc

RE: Windows installer from python source code without access to source code

2023-03-31 Thread Jim Schwartz
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 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

Re: Windows installer from python source code without access to source code

2023-03-31 Thread Thomas Passin
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?

Python 3.9 asyncio: Task cancel() throws asyncio.exceptions.CancelledError instead of asyncio.CancelledError

2023-03-31 Thread Clint Olsen
I'm having some issues with task cancellation inside a signal handler. My tasks do get cancelled, but I see odd behavior: Traceback (most recent call last): File "/home/utils/release/sw/tools/python-3.9.7/lib/python3.9/site-packages/grpc/aio/_call.py", line 406, in _consume_request_iterator

Re: When is logging.getLogger(__name__) needed?

2023-03-31 Thread dn via Python-list
On 01/04/2023 02.01, Loris Bennett wrote: Hi, In my top level program file, main.py, I have def main_function(): parser = argparse.ArgumentParser(description="my prog") ... args = parser.parse_args() config = configparser.ConfigParser() if args.config_f

Re: Python 3.9 asyncio: Task cancel() throws asyncio.exceptions.CancelledError instead of asyncio.CancelledError

2023-03-31 Thread Chris Angelico
On Sat, 1 Apr 2023 at 09:19, Clint Olsen wrote: > > I'm having some issues with task cancellation inside a signal handler. My > tasks do get cancelled, but I see odd behavior: > > Traceback (most recent call last): > File > "/home/utils/release/sw/tools/python-3.9.7/lib/python3.9/site-packages

Re: Python 3.9 asyncio: Task cancel() throws asyncio.exceptions.CancelledError instead of asyncio.CancelledError

2023-03-31 Thread Clint Olsen
On Friday, March 31, 2023 at 3:23:24 PM UTC-7, Chris Angelico wrote: > On Sat, 1 Apr 2023 at 09:19, Clint Olsen wrote: > > Attempting to catch asyncio.CancelledError or asyncio.CancelledError does > > not work. The function in question looks like: > >>> asyncio.exceptions.CancelledError is asyn

Re: Python 3.9 asyncio: Task cancel() throws asyncio.exceptions.CancelledError instead of asyncio.CancelledError

2023-03-31 Thread Chris Angelico
On Sat, 1 Apr 2023 at 10:05, Clint Olsen wrote: > > On Friday, March 31, 2023 at 3:23:24 PM UTC-7, Chris Angelico wrote: > > On Sat, 1 Apr 2023 at 09:19, Clint Olsen wrote: > > > Attempting to catch asyncio.CancelledError or asyncio.CancelledError does > > > not work. The function in question lo

Re: Windows installer from python source code without access to source code

2023-03-31 Thread Jim Schwartz
Yea. You’re right. I probably need a lawyer someday. Thanks. Sent from my iPhone > On Mar 31, 2023, at 5:12 PM, Thomas Passin 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 i

Re: Windows installer from python source code without access to source code

2023-03-31 Thread Chris Angelico
On Sat, 1 Apr 2023 at 10:34, Jim Schwartz 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

Re: Python 3.9 asyncio: Task cancel() throws asyncio.exceptions.CancelledError instead of asyncio.CancelledError

2023-03-31 Thread Clint Olsen
On Friday, March 31, 2023 at 4:14:51 PM UTC-7, Chris Angelico wrote: > Okay, so that deals with the part from the subject line, leaving a > slightly different problem: The caught exception is not of the same > type as you were expecting. First question: Can you reproduce the > issue on command?

Re: built-in pow() vs. math.pow()

2023-03-31 Thread Oscar Benjamin
On Fri, 31 Mar 2023 at 20:24, Peter J. Holzer wrote: > > On 2023-03-31 07:39:25 +0100, Barry wrote: > > On 30 Mar 2023, at 22:30, Chris Angelico wrote: > > > It's called math.pow. That on its own should be a strong indication > > > that it's designed to work with floats. > > > > So long as you kn

Re: Python 3.9 asyncio: Task cancel() throws asyncio.exceptions.CancelledError instead of asyncio.CancelledError

2023-03-31 Thread Chris Angelico
On Sat, 1 Apr 2023 at 11:42, Clint Olsen wrote: > > On Friday, March 31, 2023 at 4:14:51 PM UTC-7, Chris Angelico wrote: > > Okay, so that deals with the part from the subject line, leaving a > > slightly different problem: The caught exception is not of the same > > type as you were expecting. Fi

Re: Windows installer from python source code without access to source code

2023-03-31 Thread 2QdxY4RzWzUUiLuE
On 2023-04-01 at 10:49:18 +1100, Chris Angelico 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 servic