You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython
Hi everyone. Who is learning python right now? How is it situation on searching job ?
Читать полностью…ah yes , sorry, already solving it by combining selected time, to gain the final result 🙏, thanks for the motivation
Читать полностью…these are details. I try to understand if I can to "parallelize" my loop iterations or I should use asyncio.gather only
Читать полностью…Paste the entire damn code. Where are you using the imported requests and datetime libraries in your code ?
Читать полностью…Asyncio is running in kinda of loop
Its called event loop
If its running as its supposed to, in the event loop, when it encounters await()
it leaves that function and executes the next task in the loop, until it again encounters await()
then it again switches context
You can think of it as switching from one task to another when encountering await()
If you have only one task in the event loop, guess it makes sense to switch context from it, but as it doesnt have any more tasks to do, it just waits for that one task to complete
I have found this video to be helpful to understand the mechanics of asyncio
https://m.youtube.com/watch?v=K56nNuBEd0c&pp=ygUHQXN5bmNpbw%3D%3D
then I tried to use async for
with the same result... I got what I expected just when used asyncio.gather(*tasks)
I thought it leaves await
call and goes on the next iteration but it turned wrong during tests
Python groups in other languages
(⚠️Not managed by us ‼️)
Amharic @python_amharic
Arabic @arabipython
Azerbaijani @azepug
Chinese @pythonzh
French @python_francais
German @pythonde
Hebrew @pythonisraelHindi @pyhindi_ot
Tamil @pythontamilcommunity
Indonesian @pythonid
Italian @python_ita @pythonita
Kazakh @python_kz
Malaysia @pythonmalaysia
Persian @pyfarsi
Portuguese @pythonbr
Russian @ru_python_beginners @ru_python @python_scripts
Spanish @PythonEsp
Swahili @python_eafrica
Turkish @python_tr
Uzbek @python_uz
If you have an active and well managed group that you want to be listed there, ask in the Meta group, link in the rules page.
Prove it, read his mind and show us the code he didn't want to share
Читать полностью…and how do you expect to get help if not giving the information?
Читать полностью…"Hi", "hello" and all other socializing goes to @pythonofftopic! Feel free to chat there, and ask for help with Python code here. Don't forget to delete your message from this group!
Читать полностью…You should use asyncio.gather
for multiple tasks
And async is not parallel, it only seems that way
It jumps from one task to another, but it is still on one single proccess and one single thread
If you have I/O bound operations, use asyncio or threads
If you have CPU bound tasks, then multiproccessing is the way to go
Not really, it leaves that function and in the next iteration, it checks if the result is there or not
Await doesnt signal asyncio that its done, asyncio event loop checks it each time for result
I may have mispelled that, it should leave that operation and go to next one
It may not leave function if it has multiple awaits in that function
Oooh... Then it leaves a whole function... and async for
does not matter?
hi. It seems I do not completely understand a behavior of asyncio await and async instructions... If a have await of asynchronous function in the loop body where a interpreter goes during awaiting this?
Читать полностью…I tried but couldn't install it. I installed weasyprint itself with pip, but I didn't know how to install the other required items. Do you have any tips for installing it?
Читать полностью…i would like to create
Weekly Pivot PointЧитать полностью…
for weekly timeframe