Re: Is there a log file that tracks every statement that is being executed when a program is running?

2020-10-25 Thread Maxime S
Hi, You can use the trace module for that: https://docs.python.org/3.8/library/trace.html Personally I tend to put print statement at strategic places instead, I find that easier to analyse than a full trace but YMMV. Maxime Le dim. 25 oct. 2020 à 01:25, Steve a écrit : > This would seriousl

Re: Fun with IO

2020-01-21 Thread Maxime S
Hi, Le ven. 17 janv. 2020 à 20:11, Frank Millman a écrit : > It works perfectly. However, some pdf's can be large, and there could be > concurrent requests, so I wanted to minimise the memory footprint. So I > tried passing the client_writer directly to the handler - > > await pdf_handler(

Re: psutil.boot_time() ... doesn't ?

2019-11-06 Thread Maxime S
Hello, You may want to read PEP 418 which nicely summaries the different clock available on each platform and their limitations. It looks like CLOCK_BOOTTIME is what you want but it is only available on Linux. Regards, Maxime. Le mer. 6 nov. 2019 à 18:23, R.Wieser a écrit : > Hello all, > >

Re: Why no '|' operator for dict?

2018-02-05 Thread Maxime S
2018-02-05 9:14 GMT+01:00 Ian Kelly : > On Mon, Feb 5, 2018 at 12:35 AM, Frank Millman wrote: >> 2. Is there a better way to do what I want? > > The dict.items() view is explicitly set-like and can be unioned, so > you can do this: > > py> dict(d1.items() | d2.items()) > > As to the question of wh

Re: comapring 2 sequences of DNA ouput the silent and non mutations

2016-10-30 Thread Maxime S
2016-10-29 21:38 GMT+02:00 : > > Code: > > [...] > > for i in range (len(protein) & len(seq1)) : > > if protein[i] != mutantPRO[i] : >print (protein[i] + str(i) + mutantPRO[i]) >A+= 1 > else: > if seq1[i:i+3] != mutant[i:i+3]: >

Re: UserList - which methods needs to be overriden?

2016-06-10 Thread Maxime S
2016-06-10 10:37 GMT+02:00 Peter Otten <__pete...@web.de>: > > Nagy László Zsolt wrote: > > > I'm not sure wich one is the best. Peter wrote that UserList was left in > > collections only for backward compatiblity. This might be a point > > I'll take that back. I looked around and found no evidence

Re: Cannot step through asynchronous iterator manually

2016-01-30 Thread Maxime S
2016-01-30 11:51 GMT+01:00 Frank Millman : > "Chris Angelico" wrote in message > news:CAPTjJmoAmVNTCKq7QYaDRNQ67Gcg9TxSXYXCrY==s9djjna...@mail.gmail.com... > > >> On Sat, Jan 30, 2016 at 7:22 PM, Frank Millman >> wrote: >> > We had a recent discussion about the best way to do this, and ChrisA >>

Re: Question about asyncio and blocking operations

2016-01-28 Thread Maxime S
2016-01-28 17:53 GMT+01:00 Ian Kelly : > On Thu, Jan 28, 2016 at 9:40 AM, Frank Millman wrote: > > > The caller requests some data from the database like this. > > > >return_queue = asyncio.Queue() > >sql = 'SELECT ...' > >request_queue.put((return_queue, sql)) > > Note that since thi

Re: Function decorator having arguments is complicated

2015-04-27 Thread Maxime S
Le lun. 27 avr. 2015 à 04:39, Makoto Kuwata a écrit : > > If function decorator notation could take arguments, > decorator definition would be more simple: > > def multiply(func, n): > def newfunc(*args, **kwargs): > return n * func(*args, **kwargs) > return newfunc > > @multiply

Re: Broken IF statement

2015-01-13 Thread Maxime S
2015-01-12 22:19 GMT+01:00 : > > https://bpaste.net/show/93be9e15634b <--- Line 19 through 22 > > At all times, my program is assigning the object priority of 0, even if one already exists in the database with a priority of 0 (it's supposed to be assigning it a priority of 1 in those cases). > > I'