Search found 15 matches
- Wed Nov 25, 2020 8:52 am
- Forum: General Discussion and Questions
- Topic: Accessing function arguments
- Replies: 2
- Views: 1457
Re: Accessing function arguments
Yeah, there are a lot of things that the runtime can't do in order to stay "micro". Functions do actually know a little bit about their number of arguments (positional and keyword) but it's handled differently depending on the type of the function (Python bytecode, Python native, builtin, etc), and...
- Mon Nov 23, 2020 1:15 am
- Forum: General Discussion and Questions
- Topic: Accessing function arguments
- Replies: 2
- Views: 1457
Accessing function arguments
I was wondering if any work has been done to allow further inspection of objects like the python Inspect module. I have been trying to get the arguments for functions to correctly render on the frontend dynamically, normally you would use inspect.getargspec(func) to achieve this, but I see that ther...
- Thu Oct 15, 2020 12:16 pm
- Forum: Programs, Libraries and Tools
- Topic: Asyncio - function type
- Replies: 4
- Views: 3064
Re: Asyncio - function type
Thanks Peter, I sailed right over that when I was looking through your docs, nice. I have it loaded in because I was going to use your scheduling module, started writing my own then came across yours and its far superior. I just need to write a small driver to interact with my main system, enabling ...
- Thu Oct 15, 2020 12:30 am
- Forum: Programs, Libraries and Tools
- Topic: Asyncio - function type
- Replies: 4
- Views: 3064
Re: Asyncio - function type
The only thing I can think of seems a bit of a hack:
This works but it would be cool if the was a native uasyncio function like asyncio.iscoroutine() that was implemented.
Code: Select all
def iscoroutine(func):
async def gen():
print('generator')
return type(gen) == type(func)
- Wed Oct 14, 2020 11:17 pm
- Forum: Programs, Libraries and Tools
- Topic: Asyncio - function type
- Replies: 4
- Views: 3064
Re: Asyncio - function type
I see and are not used in uasyncio, is there another way to query a generator object?
Code: Select all
asyncio.iscoroutine()
Code: Select all
asyncio.iscoroutinefunction()
- Wed Oct 14, 2020 12:24 pm
- Forum: Programs, Libraries and Tools
- Topic: Asyncio - function type
- Replies: 4
- Views: 3064
Asyncio - function type
Hi everyone, I am stumped on this project that uses a task to call driver functions based on commands sent via mqtt. The part that is a pain is the drivers contain some asynchronous functions and some standard functions. I need the task that calls these functions to be able to identify the Async fun...
- Sun Feb 09, 2020 1:08 am
- Forum: ESP32 boards
- Topic: Trouble getting a Serial Repl
- Replies: 5
- Views: 2859
Re: Trouble getting a Serial Repl
Well, it was the usb-uart bridge, desoldered it and I am able to get a REPL fine in all applications using my own bridge on UART0.
Bit of pain and detective work, sucks when its the hardware
Bit of pain and detective work, sucks when its the hardware
- Sun Feb 09, 2020 12:30 am
- Forum: ESP32 boards
- Topic: Trouble getting a Serial Repl
- Replies: 5
- Views: 2859
Re: Trouble getting a Serial Repl
Ok some more detecting over the weekend, I have noticed I can't get a serial connection through the Arduino serial monitor if I use directly onboard power to either 3.3v or using the onboard regulator with 5v to the vcc pin. It only works with Arduino serial monitor if the board is powered via the U...
- Wed Feb 05, 2020 7:06 am
- Forum: ESP32 boards
- Topic: Trouble getting a Serial Repl
- Replies: 5
- Views: 2859
Re: Trouble getting a Serial Repl
Also just tried to serial in via Python with the serial module,
This connected to the port but nothing was received back when I sent a couple of bytes, this worked fine with my other flashed micropython nodemcu.
This connected to the port but nothing was received back when I sent a couple of bytes, this worked fine with my other flashed micropython nodemcu.
- Wed Feb 05, 2020 5:29 am
- Forum: ESP32 boards
- Topic: Trouble getting a Serial Repl
- Replies: 5
- Views: 2859
Re: Trouble getting a Serial Repl
Just to clarify -- what you're saying is that the Arduino serial monitor works (both with the onboard uart/usb adaptor, and with an external one wired directly to the TX/RX pins on the ESP32), and PuTTY / uPyCraft don't work in either configuration? Yes, that is exactly correct. My guess is that it...