Re: [Tutor] create 1000 000 variables

2006-07-14 Thread Etienne Robillard
nswer that question and you should be close of knowing the answer to your own question. HTH, Erob -- Etienne Robillard <[EMAIL PROTECTED]> JID: incidah AT njs.netlab.cz YMS/MSN: granted14 AT yahoo.com TEL: +1 514.962.7703 __ Do You Yahoo!? Ti

Re: [Tutor] (*args, **kwargs)

2006-08-04 Thread Etienne Robillard
der the following data structure: class Foo: def __init__(self, **kw): # do something with kw objects here. pass Then here's how to pass the whole kw object as a argument list: Foo(**kw) HTH, Etienne > Apologies for the gross stupidity, P.S - There's no such t

[Tutor] asyncio and wsgiref problem

2017-11-08 Thread Etienne Robillard
Hi, I'm trying to implement the asyncio.coroutine decorator in my wsgi app. Here's my server code: class AsyncIOController(WSGIController): def __init__(self, settings=None, executor=None, loop=None ): super(AsyncIOController, self).__init__(settings) # asyncio confi

Re: [Tutor] asyncio and wsgiref problem

2017-11-08 Thread Etienne Robillard
This code is compatible with PEP- on Python 3.5.3: @asyncio.coroutine def app(environ, start_response): try: result = (yield from AsyncIOController().application(environ, start_response)) except: raise else: #XXX result is a generator. this should not be

Re: [Tutor] asyncio and wsgiref problem

2017-11-09 Thread Etienne Robillard
a third-party extension? Anyways, I'm now using uWSGI for development and testing. Etienne Le 2017-11-08 à 15:30, Etienne Robillard a écrit : This code is compatible with PEP- on Python 3.5.3: @asyncio.coroutine def app(environ, start_response):     try:     result = (yield fr

[Tutor] How to debug a memory leak in a wsgi application?

2017-12-06 Thread Etienne Robillard
Hi I think my wsgi application is leaking and I would like to debug it. What is the best way to profile memory usage in a running wsgi app? Best regards, Etienne -- Etienne Robillard tkad...@yandex.com https://www.isotopesoftware.ca/ ___ Tutor

Re: [Tutor] How to debug a memory leak in a wsgi application?

2017-12-06 Thread Etienne Robillard
nt pooling handler. Etienne Le 2017-12-06 à 10:00, Alan Gauld via Tutor a écrit : On 06/12/17 09:21, Etienne Robillard wrote: Hi I think my wsgi application is leaking and I would like to debug it. What is the best way to profile memory usage in a running wsgi app? This is probably a bit advanc

Re: [Tutor] How to debug a memory leak in a wsgi application?

2017-12-13 Thread Etienne Robillard
esponding block of memory? There are many ways to create a memory leak, all of them eliminated by letting python handle your memory allocations. But, back to your original question, check out "valgrind". HTH -- James On 6 December 2017 at 16:23, Etienne Robillard <mailt

Re: [Tutor] How to debug a memory leak in a wsgi application?

2017-12-14 Thread Etienne Robillard
of ctypes. I'm guessing the memory leak was not caused by the Cython-generated C code, but from the uWSGI backend. Cheers, Etienne -- James On 13 December 2017 at 18:30, Etienne Robillard <mailto:tkad...@yandex.com>> wrote: Hi James, Thank for your reply. Are you sug

[Tutor] How to create a python extension module from a shared library?

2017-12-27 Thread Etienne Robillard
.show() FileAST: (at None) Ideally, it would be really cool if CFFI could parse a C header and generate a AST with libclang. Another possibility I haven't explored yet is to use cppyy. So, could you please advise on the most robust approach to reflect a shared library int