Re: [Tutor] Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread marc nicole via Python-list
Hello Alan, Thanks for the reply, Here's the code I tested for the debug: import time from multiprocessing import Process def do_Something(): print('hello world!') def start(fn): p = Process(target=fn, args=()) p.start() def ghello(): print ("hello world g") def fhello(): pr

Re: Python told me a Joke

2024-09-03 Thread Mild Shock via Python-list
You can try: >>> 1,2 == 2,2 (1, True, 2) Its the same as: >>> 1, (2 == 2), 2 (1, True, 2) Hope this helps! Alan Bawden schrieb: Python 3.10.5 (v3.10.5:f37715, Jul 10 2022, 00:26:17) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>>

Python told me a Joke

2024-09-03 Thread Alan Bawden via Python-list
Python 3.10.5 (v3.10.5:f37715, Jul 10 2022, 00:26:17) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> x,_,z = [1,2,3] Works as expected. Now I didn't expect the following to work (but Python sometimes surprises me!), so I tried: >>

Re: Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread geodandw via Python-list
On 9/2/24 11:36, Barry Scott wrote: On 2 Sep 2024, at 15:00, marc nicole via Python-list wrote: I am using Python 2.7 on Windows 10 Why? Install Python 3.12 and it will be easier to get help and support. If you have legacy that still needs porting then you can install 3.12 along side the

Synchronise annotations -> docstring

2024-09-03 Thread Albert-Jan Roskam via Python-list
Hi, Are there any tools that check whether type annotations and Numpydoc strings are consistent? I did find this Vim plugin: https://lxyuan0420.github.io/posts/til-vim-pydocstring-plugin. Looks incredibly useful, but I haven't tried it yet. Thanks! AJ -- https://mail.python

Re: Process.start

2024-09-03 Thread Keith Thompson via Python-list
r...@zedat.fu-berlin.de (Stefan Ram) writes: > marc nicole wrote or quoted: >>Thanks for the reply, Here's the code I tested for the debug: >>print("executed") >>but neither "Hello World" or "Executed" are displayed in the console which > > It shouldn't spit out "Executed" 'cause there's a lower

Trouble with mocking

2024-09-03 Thread Norman Robins via Python-list
I'm somewhat new to mocking for unit tests. I have some code like this: In foo/bar/baz.py I have 2 function I want to mock, one calls the other" def function1_to_mock(): . . . def function2_to_mock(): function1_to_mock() In foo/bar/main.py I import 1 of these and call it" from .baz

RE: [Tutor] Getting a Process.start() error pickle.PicklingError: Can't pickle : it's not found as __builtin__.module with Python 2.7

2024-09-03 Thread AVI GROSS via Python-list
Unfortunately, Alan, even though 2.7 was considered pickled, people keep taking it back out of the bottle and wondering why it does not work so well! There are companies like Microsoft and Samsung that let people know their OS on their devices will no longer be supported with updates and some apps