Tiny Core Base > Raspberry Pi
How can I get an apscheduler extension?
Rich:
Hi Terry_J_C
--- Quote from: Terry_J_C on August 20, 2016, 01:25:31 PM ---
--- Quote from: bmarkus on August 20, 2016, 12:47:22 PM ---However, you may review your design whether this package is really needed or not. Probably you can use asyncio module in Python >= 3.4 if looking for a Pythonic solution, or just use Linux cron as advicxed by Paul.
--- End quote ---
I couldn't see an asyncio extension either.
--- End quote ---
I think bmarkus might have been referring to one of these:
--- Code: ---usr/local/lib/python3.5/asyncio/unix_events.py
usr/local/lib/python3.5/asyncio/transports.py
usr/local/lib/python3.5/asyncio/test_utils.py
usr/local/lib/python3.5/asyncio/tasks.py
usr/local/lib/python3.5/asyncio/subprocess.py
usr/local/lib/python3.5/asyncio/streams.py
usr/local/lib/python3.5/asyncio/sslproto.py
usr/local/lib/python3.5/asyncio/selector_events.py
usr/local/lib/python3.5/asyncio/queues.py
usr/local/lib/python3.5/asyncio/protocols.py
usr/local/lib/python3.5/asyncio/proactor_events.py
usr/local/lib/python3.5/asyncio/log.py
usr/local/lib/python3.5/asyncio/locks.py
usr/local/lib/python3.5/asyncio/futures.py
usr/local/lib/python3.5/asyncio/events.py
usr/local/lib/python3.5/asyncio/coroutines.py
usr/local/lib/python3.5/asyncio/constants.py
usr/local/lib/python3.5/asyncio/compat.py
usr/local/lib/python3.5/asyncio/base_subprocess.py
usr/local/lib/python3.5/asyncio/base_events.py
usr/local/lib/python3.5/asyncio/__init__.py
--- End code ---
from:
http://tinycorelinux.net/7.x/armv6/tcz/python3.5.tcz.list
Terry_J_C:
--- Quote from: Rich on August 20, 2016, 01:50:37 PM ---I think bmarkus might have been referring to one of these:
--- Code: ---usr/local/lib/python3.5/asyncio/unix_events.py
usr/local/lib/python3.5/asyncio/transports.py
....
usr/local/lib/python3.5/asyncio/__init__.py
--- End code ---
from:
http://tinycorelinux.net/7.x/armv6/tcz/python3.5.tcz.list
--- End quote ---
Ahh! I see. Ill have to see what can be done with asyncio.
Thanks.
bmarkus:
asyncio is the most important addition to Pyton's built-in module set. It makes possible to schedule a coroutine execution after a specified delay (which can be 0) or at absolute time. Coroutines can reschedule themselve, so you have a flexible tool to execute Python code in a future. It is built into distributions stating with 3.4 no external modules needed. See
https://docs.python.org/3/library/asyncio.html#module-asyncio
Terry_J_C:
--- Quote from: bmarkus on August 20, 2016, 04:21:04 PM ---asyncio is the most important addition to Pyton's built-in module set. It makes possible to schedule a coroutine execution after a specified delay (which can be 0) or at absolute time. Coroutines can reschedule themselve, so you have a flexible tool to execute Python code in a future. It is built into distributions stating with 3.4 no external modules needed. See
https://docs.python.org/3/library/asyncio.html#module-asyncio
--- End quote ---
Thanks. I did discover that page after you mentioned asyncio yesterday. My problem is, as originally mentioned, I was never a software engineer so my understanding of what the documentation is telling me is somewhat limited by my understanding of the terminology used. I came out of the Test Industry, so I am fairly comfortable with sequential programming and I can grasp some of the principles of object oriented and threaded programming, but I'm afraid that documentation leaves me a trifle baffled. To a lesser extent I have the same problem with the Tiny Core documentation which explains how to add an extension to the system. Last year, for example, I wanted to used the wiringpi2 Python Library, but was unable to build it as an extension so I ended up recoding in C; which turned out to be relatively easy in that case.
With the Raspberry Pi my skills have mainly been used on the system design and the development of the peripheral hardware. The code used has largely been based on modifying bits of existing code that I've been able to find on the Internet. I've done this quite a few times now with great success, and in this instance I found it extremely easy to build Python code that would do something at specific times, such as on the hour and at certain minutes before and after the hour. I did try using the sched Python Module, but as others found on various tech sites I found, apscheduler made for a much simpler and more flexible solution.
So the bottom line for me at the moment is either I work out how to build an extension for apscheduler or I stumble across an example of how to do what I want with asyncio.
Thanks for trying to help.
bmarkus:
You are right, it is not easy to understand asyncio at first and need some time spent with experimenting. But once you understand, you will like it for sure :)
I will check modules you are missing and if no complication add them to repo.
is your code written in 2.7 or 3.x?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version