Ok, that makes sense, thanks!
On Sunday, January 18, 2015, Guido van Rossum gu...@python.org wrote:
Yes. It's a bit like memory allocation -- if you don't own it, don't free
it.
On Sun, Jan 18, 2015 at 3:41 PM, Luciano Ramalho luci...@ramalho.org
javascript:_e(%7B%7D,'cvml','luci
On Mon, Jan 19, 2015 at 12:02 PM, Victor Stinner
victor.stin...@gmail.com wrote:
2015-01-19 12:52 GMT+01:00 Luciano Ramalho luci...@ramalho.org:
In a non-trivial program, how do I know mine was the first call to
get_event_loop?
It doesn't matter who called it first. You may even call close
, delegating the decision to actually close() the loop to the
same infrastructure level that makes the decision to create a new loop
or give me an existing one when I call get_event_loop.
What do you think?
Best,
--
Luciano Ramalho
Twitter: @ramalhoorg
Professor em: http://python.pro.br
Twitter
In my previous message the crucial word NOT was missing from this sentence:
Even a trivial program running in iPython Notebook under Qt will get
an event loop that already existed, and that it should NOT close.
Sorry...
Best,
Luciano
On Mon, Jan 19, 2015 at 9:52 AM, Luciano Ramalho luci
it.
[1] http://bugs.python.org/issue19860#msg205062
Can I conclude that in practice, close() should not be called at all
unless your own code actually created the loop instead of merely
fetching it with asyncio.get_event_loop()?
Is that a sensible recommendation?
Cheers,
Luciano
--
Luciano
as such?
The asyncio code often uses the inspect module to determine the kind
of function, right?
Best,
Luciano
--
Ludovic Gasc
On Thu, Feb 12, 2015 at 6:24 PM, Luciano Ramalho luci...@ramalho.org
wrote:
On Thu, Feb 12, 2015 at 2:35 PM, Ben Darnell b...@bendarnell.com wrote:
But then the coroutine
Rossum (python.org/~guido)
--
Luciano Ramalho
Twitter: @ramalhoorg
Professor em: http://python.pro.br
Twitter: @pythonprobr
Reviving the thread... if I understand correctly, there is no portable way
to do disk I/O asynchronously (and the gist [1] provided by the OP is
bogus: the read_data function will block the event loop). Is my
understanding correct?
[1] https://gist.github.com/kunev/f83146d407c81a2d64a6
a new one (unless I'm missing something), but this seems like a good
addition for the next version of sphinx.
You are right, Ben, the best solution seems to be a sphinx extension
to generate markup like those classmethod tags.
Cheers,
Luciano
--
Luciano Ramalho
Twitter: @ramalhoorg
Professor em
I use?
Thanks!
Luciano
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Professor em: http://python.pro.br
| Twitter: @ramalhoorg
/examples/crawl.py
Which permantent URL should I use?
Thanks!
Luciano
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Professor em: http://python.pro.br
| Twitter: @ramalhoorg
--
--Guido van Rossum (python.org
asyncio.async
is deprecated?
The docs seem to imply ever-so-slightly that create_task is better and
async should be used to support also older Python versions.
Cheers,
Luciano
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
could not
find the chapter where asyncio is covered. I'd like to link to that
too.
I will link to the aosabook repo for the code.
Cheers,
Luciano
On Wed, Mar 18, 2015 at 10:14 AM, Luciano Ramalho luci...@ramalho.org
wrote:
I want to link to Guido's web crawler example in my book, Fluent
/fs.html
For convenience, some functions have a non-callback synchronous
version. Those have a Sync suffix, e.g.
fs.stat(path, callback)
fs.statSync(path)
Cheers,
Luciano
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
a task that behaves better with some other framework
(e.g. Tornado).
Also note that async() calls create_task(), but only when it decides to
create a new task.
Maybe the docs need an upgrade, please submit a patch.
On Sun, Mar 22, 2015 at 7:32 AM, Luciano Ramalho luci...@ramalho.org
wrote
is indeterminate
until a result is ready.
Excellent, thank you for that!
Best,
Luciano
On Fri, Feb 27, 2015 at 12:42 PM, Luciano Ramalho luci...@ramalho.org
wrote:
Hello, in the docs for the asyncio.as_completed function [1] there's a
note that says The futures f are not necessarily members of fs.
[1
/error of the new future will be the same as the original
future.
[1] https://docs.python.org/3/library/asyncio-task.html#asyncio.as_completed
Best,
Luciano
On Fri, Feb 27, 2015 at 12:42 PM, Luciano Ramalho luci...@ramalho.org
wrote:
Hello, in the docs for the asyncio.as_completed function [1
last message to that thread. I even wrote to
you in private asking for a permanent URL for it, so I can link to
it from my book.
Cheers,
Luciano
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Professor em: http
():
yield from some async code
class Y:
def __init__():
some sync code
def init():
yield from some async code
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Professor em: http://python.pro.br
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Professor em: http://python.pro.br
| Twitter: @ramalhoorg
.
Thank you Guido and Alan for helping me with this, and Dino for the
awesome talk and example!
Victor: I made a pull request so you can merge this with the
haypo/asyncio_staging repo on Bitbucket.
Thanks!
Best,
Luciano
On Sun, Jan 25, 2015 at 10:39 PM, Luciano Ramalho luci...@ramalho.org wrote:
I
On Sun, Apr 5, 2015 at 10:12 AM, Luciano Ramalho luci...@ramalho.org wrote:
Alan Cristhian (@AlanCristhian on Github) fixed the hang-on-exit bug
by turning the asyncio event loop thread into a daemon; see
guievents.py, method GuiEventLoop._start_io_event_loop.
Ah, yes, my code is in this repo
with
understanding how to read() continuously since the documentation examples
are just reading
single lines or to the EOF.
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Professor em: http://python.pro.br
| Twitter
hurry now.
Despite that Q mishap, I think the talk is a pretty good
introduction to the way asyncio works. What do you think? Your
feedback is most welcome!
Cheers,
Luciano
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Pr
it still works with Tornado.
>
> Peace,
> Jesse
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Professor em: http://python.pro.br
| Twitter: @ramalhoorg
> demonstrate, considering the time constrains including a minimal explanation
> or the possibility to include complimentary textual resources to be read
> afterwards the workshop?
>
> As an example, I would focus in an application client, probably to web
> context, but it is not a defi
26 matches
Mail list logo